Reputation: 921
I have a button event. At the end of the event I am redirecting to another page. But unable to open in new tab.
Giving compilation error -
newline in constant
//Response.Redirect("DeliveryChallanPrint1.aspx?val=" +this.txtPoNo.Text);
Response.Write("<script>");
Response.Write("window.open('DeliveryChallanPrint1.aspx?val="+this.txtPoNo.Text','_blank')");//error - newline in constant
Response.Write("</script>");
Upvotes: 2
Views: 12507
Reputation: 10275
try this:
missing +"
Response.Write("<script type='text/javascript'>");
Response.Write("window.open('DeliveryChallanPrint1.aspx?val="+this.txtPoNo.Text+"','_blank');");
Response.Write("</script>");
Upvotes: 5