I see what you are trying to do; get the reply from the js function and save it to a hidden field on the form. No problem there but. . . how do I call this js function from C#? I tried doing this in my code-behind but that didn't work.
string script = "<script language=\"java script\">functi on getMessage(){va r ans;ans=window. confirm('Is it your confirmation... ..?');if (ans==true){doc ument.MLSInput. jsReturnValue=' Yes';}else{docu ment.MLSInput.j sReturnValue='N o';}}</script>";...
User Profile
Collapse
-
How do you get reply back from javascript in asp.net ???
I have this code:
if (dr.HasRows)
{
dr.Read();
TxtHouseNbr.Val ue = dr.GetOracleStr ing(5).ToString ();
}
else
{
string msgDesc = "That number does not exist. Add it?";
string script = "<script language=\"java script\">confir m('" + msgDesc + "');</script>";
ClientScript.Re gisterStartupSc ript(typeof(Pag e),...
No activity results to display
Show More
Leave a comment: