Re: Reload user control?
- From: Mats Lycken <MatsL@xxxxxxxxxxxxxxxxx>
- Date: Wed, 28 Dec 2005 19:01:31 +0100
Sorry, I'm still not sure what you mean
Elton Wang wrote:
What I mean is that each time you load usecontrol dynamically depending on condition, even from begining.
HTH
"Mats Lycken" <MatsL@xxxxxxxxxxxxxxxxx> wrote in message news:%23ZfjikkCGHA.1124@xxxxxxxxxxxxxxxxxxxxxxx
Hi, thanks for the reply.
The thing is that the other user control already has been added when the other one has parsed its postback...
I use LoadControl() to load the usercontrols.
Elton W wrote:
You can dynamally load usercontrol by UserControl userControl = this.LoadControl("virtualPath");
And put a PlaceHolder to hold the userControl
PlaceHolder.Controls.Add(userControl);
HTH
Elton Wang
"Mats Lycken" wrote:
Hi,
I'm working on a webproject where I have several different user controls loaded on a WebForm.
A problem arises when I in one webcontrol makes a change that should be picked up by another user control.
For example a webshop. I have a datagrid of products in the shopping cart in one user control. In another I have an overview of the shopping cart (lists the products and a shows an order total).
When I remove a product from my datagrid I want the overview to reflect the changes. The only solution I could think of was to do a Server.Transfer() in the postback to "reload" the page, but it sounds to me like a complete waste of resources to load the page twice for a single postback.
Does anyone have any tips on how I could do it differently?
My shopping cart overview does not have an if(!IsPostBack) clause.
Thanks in advance /Mats
.
- References:
- Reload user control?
- From: Mats Lycken
- Re: Reload user control?
- From: Mats Lycken
- Re: Reload user control?
- From: Elton Wang
- Reload user control?
- Prev by Date: Re: Reload user control?
- Next by Date: RE: Set selected node in Treeview control in ASP:NET 2.0 ? Anyone know
- Previous by thread: Re: Reload user control?
- Next by thread: Re: Reload user control?
- Index(es):
Relevant Pages
|
Loading