Great,
I wasn't aware that form values get re-loaded to form fields, even if the
viewstate for that control is off.
I'll be switching of more viewstates at the page level from now on, because
apparently you don't need viewstate to reload the form fields with the
entered values.
Thanks a million
Tom
--
Tom Vergote / Developer
ORBID / IT Services
Tramstraat 61 / B-9052 GENT
Tel +32 (0)9 244 99 45 / +32 (0)9 244 99 96
http://www.orbid.be
"Saravana [MVP]" <> wrote in message
news:...
> Yes, prerender fires before saveviewstate happens. If you just want to
> persist only the text value of textbox across postback, then just disable
> Viewstate for that controls. Text is a property that does not need to be
> stored in ViewState as this is available through the Form collection and
the
> value will be replaced with the Form value when Postback data is processed
> before the Load Event.
>
>
> --
> Saravana
> Microsoft MVP - ASP.NET
> www.extremeexperts.com
>
>
>
> "Tom Vergote" <> wrote in
message
> news
llyhatesspam.be...
> > Saravana,
> >
> > Thanks for your reply.
> > if I am not mistaken, the prerender method comes before saving the
> > viewstate (at least thats what the trace output tells me)
> >
> > Tom Vergote
> >
> > Was it not Saravana [MVP] who claimed:
> >
> > > Write your code in Page_Prerender method .
> > >
> > > --
> > > Saravana
> > > Microsoft MVP - ASP.NET
> > > www.extremeexperts.com
> > >
> > >
> > >
> > > "Tom Vergote" <tom.vergote@[spamtrap]orbid.be> wrote in message
> > > news:4017887a$0$324$...
> > >> Hi all,
> > >>
> > >> I have this page with quite a few textboxes which require viewstate
ON.
> > >> However, i execute some Control.Addatributes on them so the take very
> much
> > >> viewstate space (three times a normal textbox). Those attributes can
> > > easily
> > >> be readded with every request, so those don't need to be in the
> viewstate,
> > >> only what the user entered in it.
> > >>
> > >> I am looking for a way of having only the value of the textbox saved
> but
> > > not
> > >> the attributes i added.
> > >>
> > >> I know Page_Render comes after saving to the viewstate, but can I use
> that
> > >> to add the attributes after the viewstate has been saved? It doesn't
> work
> > >> for me after a few shots and I don't seem to find any info or
> reference.
> > >>
> > >> Any info would be appreciated
> > >>
> > >> Tom Vergote
> > >> MCsomething and another
> > >>
> > >>
> >
>
>