469,610 Members | 1,494 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,610 developers. It's quick & easy.

Setting Control Properties before postback

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.
Nov 18 '05 #1
6 1553
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" <An***@discussions.microsoft.com> wrote in message
news:2E**********************************@microsof t.com...
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.

Nov 18 '05 #2
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

"One Handed Man ( OHM#)" wrote:
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" <An***@discussions.microsoft.com> wrote in message
news:2E**********************************@microsof t.com...
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.


Nov 18 '05 #3
Give me one change example in detail

OHM

"Angel" <An***@discussions.microsoft.com> wrote in message
news:69**********************************@microsof t.com...
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

"One Handed Man ( OHM#)" wrote:
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" <An***@discussions.microsoft.com> wrote in message
news:2E**********************************@microsof t.com...
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.


Nov 18 '05 #4
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?

"One Handed Man ( OHM#)" wrote:
Give me one change example in detail

OHM

"Angel" <An***@discussions.microsoft.com> wrote in message
news:69**********************************@microsof t.com...
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

"One Handed Man ( OHM#)" wrote:
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" <An***@discussions.microsoft.com> wrote in message
news:2E**********************************@microsof t.com...
> 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.


Nov 18 '05 #5
"Angel" <An***@discussions.microsoft.com> wrote in message
news:A9**********************************@microsof t.com...
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?
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #6
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
"John Saunders" <jo**************@notcoldmail.com> wrote in message
news:uh**************@TK2MSFTNGP12.phx.gbl...
"Angel" <An***@discussions.microsoft.com> wrote in message
news:A9**********************************@microsof t.com...
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?
--
John Saunders
johnwsaundersiii at hotmail

Nov 18 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by John Lau | last post: by
1 post views Thread by Angel | last post: by
1 post views Thread by Rob Meade | last post: by
3 posts views Thread by Patrick | last post: by
8 posts views Thread by David Lozzi | last post: by
8 posts views Thread by Mats Lycken | last post: by
5 posts views Thread by Finn Stampe Mikkelsen | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.