Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Postback and asp:table

Reply
Thread Tools

Postback and asp:table

 
 
Maria
Guest
Posts: n/a
 
      12-17-2003
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
 
Reply With Quote
 
 
 
 
Tammy
Guest
Posts: n/a
 
      12-17-2003
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" <(E-Mail Removed)> wrote in message
news:04db01c3c432$4f684bf0$(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
 
Hermit Dave
Guest
Posts: n/a
 
      12-17-2003
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" <(E-Mail Removed)> wrote in message
news:04db01c3c432$4f684bf0$(E-Mail Removed)...
> 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



 
Reply With Quote
 
Hermit Dave
Guest
Posts: n/a
 
      12-17-2003
meant custom server controls

a few lines from one of the articles at
http://www.dotnetjunkies.com/quickst...authoring.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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:04db01c3c432$4f684bf0$(E-Mail Removed)...
> > 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

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using callback, I fill dorpdownlist without postback but it gets empty when a postback is executed Fabio Mastria ASP .Net 5 01-30-2008 09:07 PM
ShowDialogModal postback on close (this is not related to multiple dialogs opening upon postback) Jacky Chau ASP .Net 2 06-08-2005 05:49 PM
Can I raise a postback ? Session variable only visible after postback. Please help gce ASP .Net 2 05-08-2005 05:55 AM
Postback not being set to True on first postback =?Utf-8?B?Q2hhZA==?= ASP .Net 2 04-04-2005 06:17 PM
effecting postback without auto postback controls Psych971 ASP .Net 5 12-17-2004 08:53 PM



Advertisments