473,395 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 1663
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John Lau | last post by:
Hi, Is there documentation that talks about the page lifecycle, the lifecycle of controls on the page, and the rendering of inline code, in a single document? Thanks, John
1
by: Angel | last post by:
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...
1
by: Mad Scientist Jr | last post by:
I don't know how this is happening, but a dropdown control I have is resetting to the 2nd value on the list anytime a postback occurs. I have no initiation code outside of If Not (IsPostBack) ...
4
by: Remi Hugnon | last post by:
Hi, I want to build an expandable treeview. I saw some code on VB but I know only C# I plan for my class that each nodes has its own id (using span for example). Into a single aspx page...
1
by: Rob Meade | last post by:
Hi all, I have a loop in my code which builds the controls on the page. I at one stage need to add some hidden input controls dynamically, I have achieved this, and I have set their...
3
by: Patrick | last post by:
I am dynamically creating TextArea and drop-down lists in ASP.NET using something like HtmlTextArea eachTextArea = new HtmlTextArea(); I tried to set the "name" of these TextAreas, etc. (e.g....
8
by: David Lozzi | last post by:
Howdy, I have a user control that is a report to display data. On the page the control is inserted in, I have filter options to filter the report. When I try to do something like this, nothing...
8
by: Mats Lycken | last post by:
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...
5
by: Finn Stampe Mikkelsen | last post by:
Hi How can i set a focus to a textbox in my codebehind page?? I have this WebForm, that takes information from a user and 2 buttons on the form. One that takes action on the entered...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.