Thursday, December 11, 2008

Getting Contant Page Value To Master Page


Now I am going to describe How we can pass the value from content Page to its Master Page.
This code is given by One of my Best Friend Mr. Shameem Pundeer.

on master page:
< asp:Label ID="lblGetVal" Visible="false" runat="server" Text="0">
I want to get text value from content page then i have to write on content page as below
((Label)Master.FindControl("lblGetVal")).Text = Convert.ToString(star_overall);
//Where star_overall is a variable on .cs file of content page
//use this on master page

GetvalfromContant = Convert.ToInt32(lblGetVal.Text);

Enjoy Coding...
Sanjeev Chauhan
HelpOnDesk Team

No comments: