Programming2007
Programmer
Hello all I have a textbox that takes a string and when a button is clicked the string has to be passed to a method in an asp .net webform. How do I do this? below is my code.
Function in HOME.html (This is what I need help writing)!
<!--
function Button1_onclick() {
document.open("WebForm2.aspx");
WebForm2.keyWordSearch(txtSearch.value);
}
//-->
WebForm2.aspx
public void keyWordSearch(string s)
{
Response.Write(txtSearch.value);
}
Function in HOME.html (This is what I need help writing)!
<!--
function Button1_onclick() {
document.open("WebForm2.aspx");
WebForm2.keyWordSearch(txtSearch.value);
}
//-->
WebForm2.aspx
public void keyWordSearch(string s)
{
Response.Write(txtSearch.value);
}