When you need to pass the value from an HTML page to an ASP. NET page, you can use it. It is very basic and saved for beginners who have never learned ASP to do so.
< Html >
< Head >
< Title > HTML start page </ Title >
</ Head >
< Body >
< Form ID = "Form1" Method = "Post" Action = "Webform1.aspx" >
< Input Type = "Text" ID = "Yourtextbox" Name = "Yourtextbox" Value = "This is the HTML page textbox value" />
< Input Type = "Hidden" ID = "Yourhiddenelement" Name = "Yourhiddenelement" Value = "This is the HTML page hidden element value" />
< Input Type = "Submit" Value = "Go" />
</ Form >
</ Body >
</ Html >
Private Void Page_load ( Object Sender, system. eventargs E)
{
If ( ! This . Ispostback)
{
String Textboxvalue = Request [ " Yourtextbox " ];
String Hiddenelementvalue = Request [ " Yourhiddenelement " ];
This . Response. Write ( " Textboxvalue: " + Textboxvalue + " <Br> " );
This . Response. Write ( " Hiddenelementvalue: " + Hiddenelementvalue + " <Br> " );
}
}