Link to home
Start Free TrialLog in
Avatar of shragi
shragiFlag for India

asked on

response. redirect

buffer.Write("<INPUT type=\"submit\" name=\"Save\" value=\"Save\" onclick=\"edit_text();\">" + " ");

buffer.Write("<script type=\"text/javascript\">");
                    buffer.Write("function edit_text(){");
 buffer.Write("var txtVal = ''hello");
          buffer.Write("Response.Redirect(\"abc.aspx?id=" + txtVal );  \")");
               buffer.Write("}");
                         buffer.Write("</script>");



is the above syntax correct...

i am writing the above code in aspx.cs page.... when i click the save button the function should redirect to other page with a variable
ASKER CERTIFIED SOLUTION
Avatar of ingriT
ingriT
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of shragi

ASKER

buffer.Write("<input type=\"text\" name=\"name\" id=\"foredit\" />" + " ");

text entered in textbox should be sent to other form as soon as button is clicked....

buffer.Write("<INPUT type=\"submit\" name=\"Save\" value=\"Save\" onclick=\"document.location'abc.aspx?id=' + foredit.text");\">" + " ");
Avatar of shragi

ASKER

the above two are not working... what should be modified...

Change
 buffer.Write("var txtVal = ''hello");

to

 buffer.Write("var txtVal = 'hello'");