Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
master page have a textbox that textvalue call to 5 pages? how to call that textbox value to 5 pages


C#
public TextBox PropertyMasterTextBox1
   {
       get { return lbl_Employee_code.Text; }
       set { lbl_Employee_code.Text = value; }
   }
Posted
Updated 27-May-12 21:49pm
v2

Find textbox present in master page like

TextBox tb = (TextBox)Master.FindControl("txtMaster");

tb.Text = "Hello";
and use tb in your page1 same like find control in page2,3,4,5
 
Share this answer
 
What do you mean by "calling" a textbox value to five pages? You want to pass that value to five different pages in the same time? Well in this case, if it is your code, than your architecture is wrong. You should reconsider handling the value you pass in a single postback, store it (eg: session, database), and reuse. If you want to call different pages with that value (as if you would search for something in different search engines), you should use ajax.
 
Share this answer
 
v2
If you mean to get value of master page text boxs or some other controls then you can get it by following code on the different context pages


ControlClass ...=this.Master.FindControl("Idofthecontrol") ;


TRY

HOPE THIS HELP
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900