UpdatePanel Problem?

Feb 14, 2007

I have a page where the user enters the information, and clicks on submit then the information is saved into the database. Second time, when the same user navigates to that page, the page picks up the data from database and be populated accordingly.

I have implemented ASP.Net Ajax: UpdatePanel into this page. First time (at the time of creation), it works perfectly. But when it comes second time (in edit mode), as the page is popupated as values from the database, it does not work properly.

For example:

- There is a RadioButtonList and TextBox with Submit Button on the page.

- TextBox is disabled by default.

- RadioButtonList has two options (Yes) and (No)

- Selecting (Yes) from RadioButtonList, TextBox is enabled and on selecting (No), TextBox is disabled.

- But RadioButtonList needs a postback and page flickers. So, I decided to implement Ajax:UpdatePanel into the page.

- After implementing UpdatePanel with UpdateMode=Conditional, when you select (Yes) or (No) on RadioButtonList, it only renders TextBox and page does not flicker, it means it works perfectly.

- But second time (in edit mode, when record already exists in database), in Page_Load, it fetches the record from the database and as per values populates the page. Like if RadioButtonList was Yes then it is selected as Yes and TextBox is populated with value. Now you try to select (No) from RadioButtonList, it will disable the TextBox and select again (Yes) option, -- it will not enable the TextBox to enter the value.--

View 3 Replies


ADVERTISEMENT

Problem With UpdatePanel With Trigger, Using MasterPage

Dec 12, 2006

Hi all,

I have a MasterPage with Calendar Control, and a content page with ListBox control.
My plan is to have a post back on the ListBox, when the Calendar control "SelectionChanged" event fires.
Both the Calendar control and the ListBox control are child elements of separate UpdatePanel controls.

I have this code fragment in the content page "Load" event handler.

if (!IsPostBack)
{
Microsoft.Web.UI.AsyncPostBackTrigger trigger = new
Microsoft.Web.UI.AsyncPostBackTrigger();
trigger.ControlID = master.CalendarStartDate.ClientID.ToString();
trigger.EventName = "SelectionChanged";
UpdatePanelItemMovers.Triggers.Add(trigger);
}

But when the page loads, I get this error:

A control with ID 'ctl00_ctl00_RightSidePlaceHolder_calendarStartDate' could not be found for the trigger in UpdatePanel 'UpdatePanelItemMovers'

Can someone tell me why?

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved