How to access HTML controls in C# code behind..?
I have one contact form contains html TextBoxs and Submit button. How can i access control values in button click event..?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Nov 28, 2014, 10:46 PM EST
There are two method u can use
1. By making it server control just by adding runat="server" in your html control
2. By using following example.
Example:
HTML declaration:
C# Code:
string strValue = Page.Request.Form["name of the control"].ToString();