Sometimes we executes some server-side code first and then executes javascripts from the server-side code in button click event of the modal window (or new window) . If we execute javascript using
Response.write(“javascript code here”);
.
.
Response.write(“javascript code here”);
inside our server-side code, then the parent page will get flashing.
To control this, we can put a Literal control on the form of the modal dialog page and then put your javascript code in that literal and call Response.Write(Literal1.Text) .
Literal1.Text=”java script here”;
Response.Write(Literal1.Text) ;