views:

675

answers:

2

Using VS2005, ASP.Net 2.0, AjaxControlToolKit

I have a LinkButton in a Panel that contains an UpdatePanel with a GridView. The link button is outside the UpdatePanel. The OnClick event has this code:

protected void lnkOk_Click(object sender, EventArgs e)
{
    foreach (GridViewRow row in grdProductSearch.Rows)
    {
        CheckBox chk = row.Cells[0].Controls[0] as CheckBox;
        if (chk != null && chk.Checked)
        {
            // ...
        }
    }

    Server.Transfer(Page.Request.RawUrl);

}

I need it to pass the selected values of the grid back to the Parent page in a post back. But all it does is close the Panel.

Any ideas why this is happening? or how can I achieve what I am trying to do?

A: 

Try putting everything inside the UpdatePanel. Sometimes this control messes up the page normal behavior.

I've seen several times that UpdatePanel control affect somehow (it's difficult to say where and how) the javascript of the page. For example, When you have the UpdatePanel declared as ChildrenAsTriggers="false" and declared AsyncPostBack triggers, if you have a Validation Summary inside, it never shows the validation errors done in the server.

Sebastian
A: 

What is the purpose of the Server.Transfer? I guess I'm asking about the broader architecture of the page as well... what is the "parent page"?

zakster82