Click here to Skip to main content
15,898,374 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How Can I Access HTML5 control from code behind
Posted

 
Share this answer
 
Suppose you want to access this textbox value in code behind than add attribute - runat="server"



now in code behind-

string username = UserName.Value;
 
Share this answer
 
Use runat="server" attribute for the Control which makes it a Server Control and can accessed it with the Id of the Control.
 
Share this answer
 
runat="server" attribute used in Control.
 
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