Postback and asp:table

Discussion in 'ASP .Net' started by Maria, Dec 17, 2003.

  1. Maria

    Maria Guest

    Hi

    I have a asp:table that I want to hold the values between
    postbacks. Hope some one knows how I can get that to work
    in an easy way. The table is loaded in runtime with
    different textboxes. When i press a button and runs some
    server code the page becomes "quite empty"

    Thanks in advance

    Maria
    Maria, Dec 17, 2003
    #1
    1. Advertising

  2. Maria

    Tammy Guest

    question: are you using "<input type='text'>" or "<asp:textbox id='txt1'
    runat='server'>"

    if i'm not mistaken, the asp textbox have viewstate enabled by default.
    they should re-populate data on postbacks.


    "Maria" <> wrote in message
    news:04db01c3c432$4f684bf0$...
    > Hi
    >
    > I have a asp:table that I want to hold the values between
    > postbacks. Hope some one knows how I can get that to work
    > in an easy way. The table is loaded in runtime with
    > different textboxes. When i press a button and runs some
    > server code the page becomes "quite empty"
    >
    > Thanks in advance
    >
    > Maria
    Tammy, Dec 17, 2003
    #2
    1. Advertising

  3. Maria

    Hermit Dave Guest

    Hey,

    Remember reading about this a while back but if you are adding controls
    dynamically to your grid.... postback wont get 'em back. I suggest you read
    up some tutorials on http://www.asp.net/Tutorials/quickstart.aspx

    and check up on customer server controls.... framework.aspnet.webcontrols
    newsgroup might be a good place to start as well...

    Regards,
    HD

    "Maria" <> wrote in message
    news:04db01c3c432$4f684bf0$...
    > Hi
    >
    > I have a asp:table that I want to hold the values between
    > postbacks. Hope some one knows how I can get that to work
    > in an easy way. The table is loaded in runtime with
    > different textboxes. When i press a button and runs some
    > server code the page becomes "quite empty"
    >
    > Thanks in advance
    >
    > Maria
    Hermit Dave, Dec 17, 2003
    #3
  4. Maria

    Hermit Dave Guest

    meant custom server controls

    a few lines from one of the articles at
    http://www.dotnetjunkies.com/quickstart/aspplus/doc/webctrlauthoring.aspx

    Maintaining State
    Every Web Forms control has a ViewState property (inherited from Control)
    that enables it to participate in ViewState management. The type of
    ViewState is Sytem.Web.UI.StateBag, which is a data structure equivalent to
    a hashtable. A control can save data in ViewState as key/value pairs.
    ViewState is persisted to a string variable by the ASP.NET page framework
    and makes a round trip to the client as a hidden variable. Upon postback,
    the page framework parses the input string from the hidden variable and
    populates the ViewState property of each control in the control hierarchy of
    a page. A control can restore its state (set properties and fields to their
    values before postback) using the ViewState property. Control developers
    should be aware that there is a performance overhead in sending data by
    round trip to the client, and be judicious about what they save in
    ViewState.



    "Hermit Dave" <> wrote in message
    news:...
    > Hey,
    >
    > Remember reading about this a while back but if you are adding controls
    > dynamically to your grid.... postback wont get 'em back. I suggest you

    read
    > up some tutorials on http://www.asp.net/Tutorials/quickstart.aspx
    >
    > and check up on customer server controls.... framework.aspnet.webcontrols
    > newsgroup might be a good place to start as well...
    >
    > Regards,
    > HD
    >
    > "Maria" <> wrote in message
    > news:04db01c3c432$4f684bf0$...
    > > Hi
    > >
    > > I have a asp:table that I want to hold the values between
    > > postbacks. Hope some one knows how I can get that to work
    > > in an easy way. The table is loaded in runtime with
    > > different textboxes. When i press a button and runs some
    > > server code the page becomes "quite empty"
    > >
    > > Thanks in advance
    > >
    > > Maria

    >
    >
    Hermit Dave, Dec 17, 2003
    #4
    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. David Williams
    Replies:
    2
    Views:
    1,113
    Jacob Yang [MSFT]
    Aug 12, 2003
  2. Psych971
    Replies:
    5
    Views:
    4,605
    bruce barker
    Dec 17, 2004
  3. Rio
    Replies:
    4
    Views:
    1,182
  4. Yas
    Replies:
    0
    Views:
    477
  5. Pablo Gutierrez
    Replies:
    0
    Views:
    255
    Pablo Gutierrez
    Oct 3, 2003
Loading...

Share This Page