How refresh gridview when open link to _blank target?

ASP.NET email web app...

Gridview with inbox of emails and "View Message" template column.  All "unread" messages have yellow as the color for the gv row.  When you click on "View Message" it opens the message in a new window basically.

I would like to automatically refresh the gridview after they click on the "View Message" link.  How can I do this?

The gridview "View Message" column is defined as follows...
                <asp:TemplateField HeaderText="Msg" ItemStyle-Width="10px">
                        <asp:HyperLink ID="hlViewMsg" Target="_blank" runat="server" NavigateUrl='<%# Eval("MsgId", "autoactions.aspx?action=mark_as_read&msgid={0}") %>'
                            Text='Open' Visible='True') %>'></asp:HyperLink>

Autoactions.aspx basically marks the db record as "read" then redirects to the message contents.  
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Just have a javascript function

say function mysubmit()


register this event as a click event for the link
Here is a good link to handle postbacks in java script
RobertNZanaAuthor Commented:
Can you provide an example of registering the event as a click event for the link?  Remember the link is a template field in a gridview...
Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

The example I have is for a check box in grid view.But you can do the same for link

protected void GridView1_RowDataBound(object sender,
GridViewRowEventArgs e)
if (e.Row.RowType == DataControlRowType.DataRow)
CheckBox CheckBox1 = (CheckBox)e.Row.FindControl("CheckBox1");
CheckBox1.Attributes["onclick"] = string.Format("alert({0});",

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RobertNZanaAuthor Commented:
I'm dont know js.  So, instead of "alert" I would call "mysubmit"?  That will refresh the page basically?  Thanks!
RobertNZanaAuthor Commented:
I ended up doing this...

            Dim l As HyperLink = CType(e.Row.FindControl("hlViewFile"), HyperLink)
            l.Attributes.Add("onClick", "window.location.reload()")

Since you started the good ideas flowing i will credit u.  Thanks!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.