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
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...
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...
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...
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...
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...
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...