Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Add parameter URL

2 views
Skip to first unread message

Alberto

unread,
May 18, 2003, 11:13:28 AM5/18/03
to
Hi,

I am trying to develop my treeview server control.
I implemented an event which fires when a users click on a
element (node) of the control.
I need to read a paramenter when the Page_Load event fires
but my server control event fires after the page_load.

Is there a way to pass a parameter on the URL so that I
can get it when the Page_Load event fires when my control
posts the forms?

thanks

Alberto

Victor Garcia Aprea [MVP]

unread,
May 18, 2003, 8:30:15 PM5/18/03
to
Hi Alberto,

I highly recommend that you move any code that is dependant on values that
are updated by your controls events to an event that fires after they're
processed, for example: PreRender.

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET ? Read my blog: http://dotnetweblogs.com/vga

"Alberto" <nos...@nospam.com> wrote in message
news:0d9801c31d50$09445c10$a401...@phx.gbl...

Alberto

unread,
May 19, 2003, 3:44:46 AM5/19/03
to
Hi Viktor,

thanks for your reply but I cannot follow
you.
What do you mean?
Do I have to read value in PreRender of the page?
Can you give me one example?

thanks

Alberto

"Victor Garcia Aprea [MVP]" <v...@NOobiesSPAM.com> wrote in message
news:#7fLH3ZH...@TK2MSFTNGP12.phx.gbl...

Victor Garcia Aprea [MVP]

unread,
May 19, 2003, 11:56:25 PM5/19/03
to
Hi Alberto,

An oversimplified look of the event firing order looks like:

Load -> Postback events -> PreRender

So if your problem is that your code in Load depends on values that are not
updated yet you could move that code to PreRender.

Is it any clear now?

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET ? Read my blog: http://dotnetweblogs.com/vga

"Alberto" <_NOSPAMba...@dauf.ch> wrote in message
news:%23FILJqd...@tk2msftngp13.phx.gbl...

Alberto

unread,
May 20, 2003, 3:22:50 AM5/20/03
to
Thanks Victor,

I tried your solution and it works great.
Can I use PreRender in any situation
as if it was Load ?

Thank you
Alberto

"Victor Garcia Aprea [MVP]" <v...@NOobiesSPAM.com> wrote in message

news:eYhj3OoH...@tk2msftngp13.phx.gbl...

Victor Garcia Aprea [MVP]

unread,
May 20, 2003, 11:30:59 PM5/20/03
to
Hi Alberto,

That really depends on what you're trying to do. What you could assume is
the order events are fired, PreRender will happen always after Load. Take a
look at the docs to see all available events and the order in which they
fire. That would help you get a better idea of the whole picture.

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET ? Read my blog: http://dotnetweblogs.com/vga

"Alberto" <nos...@nospamma.com> wrote in message
news:OW2zGDqH...@TK2MSFTNGP11.phx.gbl...

Alberto

unread,
May 21, 2003, 4:25:24 AM5/21/03
to
Thanks a lot Viktor.

I'm using PreRender after the control event routine and everything seem
to work.
I can even know if it is a PostBack.

thanks
bye

Alberto


"Victor Garcia Aprea [MVP]" <v...@NOobiesSPAM.com> wrote in message

news:#nWdOl0H...@TK2MSFTNGP10.phx.gbl...

0 new messages