views:

105

answers:

1

First, I'm really new to Asp.Net Ajax

I got an user control that have a propertie named Year.

<uc:MyUserControl ID="myUserControl1" runat="server" Year="200" />

I also got some Html like that :

<a href="MyPage.Aspx?Year=2009"> < </a>
       2009
<a href="MyPage.Aspx?Year=2010"> > </a>

In my Page_Load event, I take the year url parameter and set it to my user control.

What I would like to do now it's doing it without refreshing the page.

I think that possible with the help of Ajax ?

A: 

Yes. The easiest solution would be to put your UserControl inside of an UpdatePanel. Then change your hyperlinks to a LinkButton control.

If the LinkButton is also inside of the UpdatePanel then when it posts back to the page, you can update your UserControl.

If the LinkButton is outside of your UpdatePanel, then just add it to the list of triggers in the UpdatePanel code.

Jim W

related questions