B
Ben
I tried to pass in a query string to a open window via
the following codes :
string strName = tbName.Text.Trim();
Response.Write("<SCRIPT> javascript:window.open
('Search.aspx?Name=" + strName
+ "', 'Search', 'width=600,height=550,left=280,top=100,scr
ollbars=1,resizable=1,status=1') </SCRIPT>");
It works fine if the var value is for eg. John. However
when the var value contains the ' char, it hits into
error.
How do you escape the ' char in this case?
Thanks,
Ben
the following codes :
string strName = tbName.Text.Trim();
Response.Write("<SCRIPT> javascript:window.open
('Search.aspx?Name=" + strName
+ "', 'Search', 'width=600,height=550,left=280,top=100,scr
ollbars=1,resizable=1,status=1') </SCRIPT>");
It works fine if the var value is for eg. John. However
when the var value contains the ' char, it hits into
error.
How do you escape the ' char in this case?
Thanks,
Ben