Hi,
Sasa Popovic:Modify web part and user control so that:
the only property I'm using is already being set into ViewState within the connection consumer method. I'm not currently looking at the other user control's property ('EndDate').
Sasa Popovic:
I wanted that the user control and web part were independent from each other. I mean, I didn't want to set the values of the controls inside my user control from the web part... that's why I've exposed the user control properties...
Also, I've taken a look at the order of the events when I click the user control's button and here is what is happening:
- WebPart1: CreateChildControls
- testcontrol.ascx: OnLoad
- testcontrol.ascx: EventBtOkClicked
- WebPart1: GetProvider
- WebPart1: ReceiveParameters
- WebPart1: OnPreRender
So, this is why I'm not getting the most actual value in the textbox, because when the value is being accessed (EventBtOkClicked) I haven't received the parameters from the connection (it only happens on step 5). In OnPreRender, I'm setting the user control's property but this will only be accessed the next time EventBtOkClicked fires, thus the delay...
Actually, this situation with the TextBoxes inside the user control is just for testing purposes. What I want to achieve is that when the button is clicked I can used the value of the user control's properties as arguments for a series of calculations that will be performed inside the user control. The web part would only serve as wrapper for the user control, passing it the values obtained from other web parts in that page. That's why I don't think that setting the values of the ASP.NET controls in OnPreRender would solve my problem.
Is is possible to achieve what I've described?
Thanks in advance.