Re: User Controls not keeping property values

Tech-Archive recommends: Speed Up your PC by fixing your registry



That works great. Any precautions I should be aware of when using the
ViewState? Does it empty itself?

Thanks,

--
David Lozzi
Web Applications Developer
dlozzi@(remove-this)delphi-ts.com



"Steven Cheng[MSFT]" <stcheng@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:IR72bcRBGHA.3764@xxxxxxxxxxxxxxxxxxxxxxxx
> Hi David,
>
> I think Christopher's consideration are reasonable. ASP.NET web pages are
> request/response based, and all the in-memory page variables are not
> persisted between mulitple page requests(postback....). So if we want some
> certain member varriables to be persisted and shared between postbacks, we
> need to store them into some persistent storage, such as SessionState or
> Viewstate....
>
> e.g:
> ===============
> Public Property Height() As Integer
> Get
>
> Return ViewState("__HEIGHT")
>
> End Get
>
> Set(ByVal Value As Integer)
>
> ViewState("__HEIGHT") = value
>
> End Set
>
> End Property
> =================
>
> Also, you can add some additional code to do bad value protection in the
> property accessor....
>
> Hope helps. Thanks,
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>
>
>
>
>
> --------------------
> | From: "David Lozzi" <DavidLozzi@xxxxxxxxxxxxx>
> | References: <OaAav7LBGHA.1676@xxxxxxxxxxxxxxxxxxxx>
> <#dvTdzMBGHA.2300@xxxxxxxxxxxxxxxxxxxx>
> | Subject: Re: User Controls not keeping property values
> | Date: Mon, 19 Dec 2005 18:48:40 -0500
> | Lines: 18
> | X-Priority: 3
> | X-MSMail-Priority: Normal
> | X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
> | X-RFC2646: Format=Flowed; Response
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
> | Message-ID: <eTV1TbPBGHA.1180@xxxxxxxxxxxxxxxxxxxx>
> | Newsgroups: microsoft.public.dotnet.framework.aspnet
> | NNTP-Posting-Host: c-24-63-42-200.hsd1.ma.comcast.net 24.63.42.200
> | Path:
> TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fa
> stwebnet.it!tiscali!newsfeed1.ip.tiscali.net!news.glorb.com!newsfeed.hal-mli
> net!feeder1.hal-mli.net!news.alt.net!msrtrans!TK2MSFTNGP08.phx.gbl!TK2MSFTN
> GP09.phx.gbl
> | Xref: TK2MSFTNGXA02.phx.gbl
> microsoft.public.dotnet.framework.aspnet:365834
> | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
> |
> | It is not, its just part of a form.
> |
> | --
> | David Lozzi
> | Web Applications Developer
> | dlozzi@(remove-this)delphi-ts.com
> |
> |
> |
> | "Ben Dewey" <AspiringMVP@xxxxxxxxxxx> wrote in message
> | news:%23dvTdzMBGHA.2300@xxxxxxxxxxxxxxxxxxxxxxx
> | > Is your user control inside a databound control? a repeater or a
> | > datagrid?
> | >
> | > If so what kind? and when/how are you setting the UserControl data?
> | >
> |
> |
> |
>


.



Relevant Pages

  • Re: User Controls not keeping property values
    ... David Lozzi ... Web Applications Developer ... > As for ViewState, you may need to read some other reference so as to ... > |> Microsoft Online Support ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: My Code isnt working, why?!?!
    ... while the other fields return the correct information. ... > David Lozzi ... > Web Applications Developer ... >>> update command doesn't process the new information. ...
    (microsoft.public.dotnet.framework.aspnet.buildingcontrols)
  • Re: My Code isnt working, why?!?!
    ... thanks for bearing with my insanity. ... > David Lozzi ... > Web Applications Developer ... still battleing the stupid update command. ...
    (microsoft.public.dotnet.framework.aspnet.buildingcontrols)
  • Re: My Code isnt working, why?!?!
    ... I setup this column as the others and called the ID the same way: ... > David Lozzi ... > Web Applications Developer ... still battleing the stupid update command. ...
    (microsoft.public.dotnet.framework.aspnet.buildingcontrols)
  • Re: 0x80190193 on Windows 2003 Server
    ... windows update doesnt work with mozilla..... ... > David Lozzi ... > Web Applications Developer ...
    (microsoft.public.windowsupdate)