AJAX with asp.net user control

P

Paras

Hi,

I have 3 ContentPlaceHolders in the MasterPage. In the 2nd content I have
placed a usercontrol which has anchor link. This loads another page (without
changing loading the content of ContentPlaceHolder1). But currently this is
getting posted back. I have tried in a separate application and tried with 2
ContentPlaceHolders (without user control) by implementing UpdatePanel. That
works fine. But with user control it is getting postedback.

I have ScriptManager in Master page and applied UpdatePanel in each content
section of each content page.

Do I need to set any other property?

-
Paras
 
B

Ben Rush

Hello.

My first question is at which level do you have the UpdatePanel? I mean, do
you have it on the ContentPlaceHolders of the MasterPage, or are you placing
the UpdatePanels actually within the content page?

If you're just dragging the UpdatePanels onto the ContentPlaceHolders of the
master page and then going to your content page and dragging controls into
the content panels, you're more than likely not actually *including* the
controls within the UpdatePanels and therefore not creating the necessary
parent/child relationship between said controls.

.....let me know....
 
P

Paras

Thank you very much Ben.

1. In Master Page I have asp:ScriptManager
2. In Master Page code behind, in Page_Load event, I have included in
the ScriptManager1.RegisterAsyncPostBackControl(Me.FindControl("Control
Name"))
3. In Content pages, I have UpdatePanel inside the content panel.

I have done a small POC and it worked fine. I found what the exact
problem is. I am using a third party control called "obout tree control".
This tree control is in the first content place holder of Master page. In
tree nodes I am setting an anchor which will redirect to some other page. In
my case, if I click the anchor I want only the content place holder 2 and 3
have to be updated. Means, I want to have partial rendering in Master page.

Can the behavior of anchor be changed? And can the Partial update is
achieved in this scenario?

Thanks
Paras
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top