views:

292

answers:

3

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.

+1  A: 

Take a look at this article

Easily refresh an UpdatePanel, using JavaScript

rahul
how to use it with <a href>
Rohit
A: 

This is impossible to do using AJAX as it involves a page switch.I am on a different page and i am navigating to a different page using a href.

Ajax is not for page switching scenerios.

Rohit
A: 

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>
rick schott