Setting Control Properties before postback

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a button, combo, and custom control that i created. When I click the button i want to set certain display properties of my custom control depending whats in the combo. I set those properties in the Click_Event in the button control. Unfortunately postback is triggered in the click event before I set the display properties of the control. Is there anyway that I can set these properties before the postback is triggered? I'd like to do this without writing any Javascript...

Thanks.
 
Postback happens when you submit a form to the server, the first thing that
happens is that the Page_Load event occurs and then it will service the
event for the control which caused the postback.

OHM



Angel said:
I have a button, combo, and custom control that i created. When I click
the button i want to set certain display properties of my custom control
depending whats in the combo. I set those properties in the Click_Event in
the button control. Unfortunately postback is triggered in the click event
before I set the display properties of the control. Is there anyway that I
can set these properties before the postback is triggered? I'd like to do
this without writing any Javascript...
 
Sorry about the multiple post but everytime i tried posting the message and setting to notify me of a reply I got an error message that the post cannot be processed at this time. Try again. So I did. I later realized there is a problem with the notification of replies...

The problem with the load_event is after the fact. I need before the postback to capture the new properties before the page is rendered again or is sent to the server.

Thanks
 
Give me one change example in detail

OHM

Angel said:
Sorry about the multiple post but everytime i tried posting the message
and setting to notify me of a reply I got an error message that the post
cannot be processed at this time. Try again. So I did. I later realized
there is a problem with the notification of replies...
The problem with the load_event is after the fact. I need before the
postback to capture the new properties before the page is rendered again or
is sent to the server.
 
What i am changing from my custom control is certain custom properties of the control. I put a breakpoint on the button click event and the page load event and it executes after my custom control has been rendered. Maybe its an issue with my custom control?
 
Angel said:
What i am changing from my custom control is certain custom properties of
the control. I put a breakpoint on the button click event and the page load
event and it executes after my custom control has been rendered. Maybe its
an issue with my custom control?

If your custom control is being rendered before Page_Load, then it has a
serious bug. Are you saying that you set a breakpoint on your custom
control's Render method and that breakpoint is hit before the Page_Load
breakpoint?
 
I keep getting the feeling that we are talking at cross purposes with Angel.
I would like Angel to give us a step by step list of what he is expecting to
happen like.

1.) User clicks button and postback is initiated.
2.) Page_Load event is fired.
3.) My code does this in the 'Event' . . .
4.) I expected this to happen . . .
5.) and so on.

I am still a little confused as to what the OP is trying to acheive and
expect to happen.

OHM
 
Back
Top