Click here to Skip to main content
15,914,444 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have created web user control using Text box, Image Button and calendar control to get selected Date. I want to show the selected value from TextBox to Lable, which is on Web Form.
How to access User Control TextBox value?
Posted
Comments
Mohibur Rashid 19-Oct-11 5:12am    
You have created a webcontrol. why didnt you create the method to access value?

 
Share this answer
 
TextBox txt = (TextBox)onlyNumber3.FindControl("txtText1");
string s = txt.Text;

Here OnlyNumber3 id web user control id
textText1 is web user control textbox id
 
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