Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
User Controls When to set the value of controls
Message
From
30/07/2009 12:46:56
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
ASP.NET
OS:
Windows XP SP2
Application:
Web
Miscellaneous
Thread ID:
01414924
Message ID:
01415532
Views:
22
Hi Paul,

Would this take care of the control issue of having to add the old control and then remove it?
MyPlaceHolder.Controls.Clear();
MyPlaceHolder.Controls.Add(myNewControl);
>I'll try walking through this code in more detail to see if I see anything. The one thing that I did see was your Page_Load code (it's possible you removed this before posting) - the call to DisplayCurrentArrest, which loads the user control is only being run if IsPostBack = false. You need to load the control on every hit, not just on the initial load.
>
>>
>>protected void Page_Load(object sender, EventArgs e)
>>{
>>     this.oArrest = (Arrest)RegisterBizObj(new Arrest());
>>     // Lots of code removed
>>
>>     if (!IsPostBack) 
>>     {
>>           // Verify we have a Case Record
>>           if (this.oCase.Entity.HasValues)
>>          {
>>               this.DisplayCurrentArrest(arrestID);
>>          }
>>     }
>>}
>
Timothy Bryan
Previous
Reply
Map
View

Click here to load this message in the networking platform