Disabling postback repopulation of controls

Discussion in 'ASP .Net' started by Por Belmstedt, May 19, 2005.

  1. How do I disable postback repopulation of non-viewstate controls, such as
    normal textboxes etc? (Surely there must be a more elegant solution than
    manually clearing them on page load...)
     
    Por Belmstedt, May 19, 2005
    #1
    1. Advertising

  2. Yes, but how does that help me? The control that is repopulated on postback
    is an

    <asp:TextBox Runat=server></asp:TextBox>


    "Eliyahu Goldin" <> wrote in message
    news:OK%...
    > Are you aware of IsPostBack property?
    >
    > Eliyahu
    >
    > "Por Belmstedt" <> wrote in message
    > news:%...
    > >
    > > How do I disable postback repopulation of non-viewstate controls, such

    as
    > > normal textboxes etc? (Surely there must be a more elegant solution

    than
    > > manually clearing them on page load...)
    > >
    > >

    >
    >
     
    Por Belmstedt, May 19, 2005
    #2
    1. Advertising

  3. Por Belmstedt

    Martin Guest

    set enableviewstate to false


    "Por Belmstedt" <> wrote in message
    news:%...
    >
    > How do I disable postback repopulation of non-viewstate controls, such as
    > normal textboxes etc? (Surely there must be a more elegant solution than
    > manually clearing them on page load...)
    >
    >
     
    Martin, May 19, 2005
    #3
  4. How, do you mean, is this viewstate related? The control that is
    repopulated on postback is an

    <asp:TextBox Runat=server></asp:TextBox>


    "Martin" <> wrote in message
    news:...
    > set enableviewstate to false
    >
    >
    > "Por Belmstedt" <> wrote in message
    > news:%...
    > >
    > > How do I disable postback repopulation of non-viewstate controls, such

    as
    > > normal textboxes etc? (Surely there must be a more elegant solution

    than
    > > manually clearing them on page load...)
    > >
    > >

    >
    >
     
    Por Belmstedt, May 19, 2005
    #4
  5. Are you aware of IsPostBack property?

    Eliyahu

    "Por Belmstedt" <> wrote in message
    news:%...
    >
    > How do I disable postback repopulation of non-viewstate controls, such as
    > normal textboxes etc? (Surely there must be a more elegant solution than
    > manually clearing them on page load...)
    >
    >
     
    Eliyahu Goldin, May 19, 2005
    #5
  6. In code :
    Response.Cache.SetCacheability(HttpCacheability.NoCache)

    Someone recently reported doing this globally, for all pages, by modifying
    the global.asax.cs file, adding SetCacheability(HttpCacheability.NoCache)
    in the Application_BeginRequest event.

    Per page :
    <%@ OutputCache Location="None" %>



    Juan T. Llibre
    ASP.NET MVP
    http://asp.net.do/foros/
    Foros de ASP.NET en EspaƱol
    Ven, y hablemos de ASP.NET...
    ======================

    "Por Belmstedt" <> wrote in message
    news:%...
    >
    > Yes, but how does that help me? The control that is repopulated on postback
    > is an
    >
    > <asp:TextBox Runat=server></asp:TextBox>



    > "Eliyahu Goldin" <> wrote in message
    > news:OK%...
    >> Are you aware of IsPostBack property?
    >>
    >> Eliyahu
    >>
    >> "Por Belmstedt" <> wrote in message
    >> news:%...
    >> >
    >> > How do I disable postback repopulation of non-viewstate controls, such

    > as
    >> > normal textboxes etc? (Surely there must be a more elegant solution

    > than
    >> > manually clearing them on page load...)
    >> >
    >> >

    >>
    >>

    >
    >
     
    Juan T. Llibre, May 19, 2005
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. john
    Replies:
    1
    Views:
    6,528
    bruce barker
    Apr 20, 2004
  2. Dan  =o\)
    Replies:
    3
    Views:
    3,558
    Dan Bass
    Nov 9, 2004
  3. Psych971
    Replies:
    5
    Views:
    4,654
    bruce barker
    Dec 17, 2004
  4. fredd00

    validator disabling postback ???

    fredd00, May 17, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    430
    fredd00
    May 18, 2005
  5. Wael_Bakr

    stop postback in postback events for server controls ??

    Wael_Bakr, Nov 30, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    512
    Wael_Bakr
    Nov 30, 2005
Loading...

Share This Page