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..?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question.
Manish Kumar ChoudharyPosted Nov 29, 2014, 3:46 AM
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();