Reputation: 363
I called 'alert' box from C#
Response.Write("<script>alert('Click Checkbox'); </script>");
and I want to get this text from 'alert' box in jQuery. Text what I want is 'Click Checkbox'. How can I get it?
Upvotes: 1
Views: 783
Reputation: 82241
You should rather set a variable from code behind and access the value. contents of alert do not have the scope of accessing it.
Response.Write("<script>var alerttext='Click Checkbox'; alert('Click Checkbox'); </script>");
Upvotes: 2