Javascript Model Window Wont Fire Page_Load

I have a page that fires a popup window and in that popup window I have some logic that I need to perform in the Page_Load.

Works great the first time as the popup window gets created, the problem is each subsequent call does not fire the Page_Load event. This is because the form is still in memory and has not disposed.

So the secret to making the form go away on close code like this;


        // a script to be run in client-side
        string scriptStr = “<script>window.close();</script>”;

        // send the script to output stream
        ClientScript.RegisterClientScriptBlock(typeof(string), “closing”, scriptStr);


On the ASPX page put this as the very first line (as in line #1);

[code:html]<% Response.Expires = -1;%>[/code]



Secret sauce for Nice Looking GridView

Here is the ingredients for making the Datagrid view have a nice mouse rollover to change colors.


protected void gv_RowDataBound(object sender, GridViewRowEventArgs e)
    if (e.Row.RowType == DataControlRowType.DataRow)
        e.Row.Attributes.Add(“onmouseover”, “’pointer’;;’#EEFF00′”);
        e.Row.Attributes[“onclick”] = ClientScript.GetPostBackClientHyperlink(this.gv, “Select$” + e.Row.RowIndex);


So yellow when the mouse is pointing at the row then back to whatever it was before the mouse was when the mouse leaves.