Asp – trigger updatepanel update using

asp.netupdatepanel

I have created a treeview using the following code in my code-behind.

<li><a href=../User/Category.aspx?CategoryID=ff62e353-6eb1-4215-8158-03767d2401de &  isRoot=true>Books</a></li>

When user clicks on Books,Category.aspx page opens and all products with this categoryID are loaded in a user control.

I want to trigger update to a updatepanel using this treeview node.Is this possible.

Please suggest some other way to achieve this.

Best Answer

Try this:

Script:

function UpdateAndRelocate(updatePanel, url)
{
    __doPostBack(updatePanel, '');
    window.location=url;
}

Markup:

<li>
    <a href="javascript:UpdateAndRelocate('../User/Category.aspx?CategoryID=ff62e353-6eb1-4215-8158-03767d2401deisRoot=true','UpdatePanel1'">Books</a>
</li>
Related Topic