473,785 Members | 2,234 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Postback and asp:table

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
Nov 18 '05 #1
3 1810
question: are you using "<input type='text'>" or "<asp:textb ox 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" <an*******@disc ussions.microso ft.com> wrote in message
news:04******** *************** *****@phx.gbl.. .
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

Nov 18 '05 #2
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.aspne t.webcontrols
newsgroup might be a good place to start as well...

Regards,
HD

"Maria" <an*******@disc ussions.microso ft.com> wrote in message
news:04******** *************** *****@phx.gbl.. .
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

Nov 18 '05 #3
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.St ateBag, 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" <he************ @CAPS.AND.DOTS. hotmail.com> wrote in message
news:Oj******** ******@tk2msftn gp13.phx.gbl...
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.aspne t.webcontrols
newsgroup might be a good place to start as well...

Regards,
HD

"Maria" <an*******@disc ussions.microso ft.com> wrote in message
news:04******** *************** *****@phx.gbl.. .
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


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
464
by: Stephen | last post by:
I have been getting on well with help from this forum trying to create an array list and work with it. Everything is working fine apart from displaying my array list items into the labels in my asp table. The asp table has numerous rows and each row has a label item within it. Im finding it impossible to get something to work which adds the newest item in the array list to the next row in the asp table. the first time the button is...
1
2161
by: Stephen | last post by:
I have got the below asp table and I would like to be able to call up the lblAddress1 label with in the asp table in the code behind page. I tried doing this.lblAddress1 and it didn't work and I tried doing this.tblSearchAddresses.lblAddress1 and it didn't work. Has anyone an idea how I call this lable with a asp table. Thanks in advance for any help anyone can give me. <asp:table id="tblSearchAddresses" Runat="server" Width="100%">...
2
2684
by: Kevin | last post by:
I am just learning asp.net and ran into a problem that I have not been able to resolve. I have a web form with an html table that houses an asp:label, asp:textbox and asp:button within. I had the click event of the asp:button working. I then decided to drop an asp:table on the form and then added the three component mentioned above into the asp:table. Now I cannot find a way to set the click even of the asp:button anymore. In fact,...
3
12018
by: Marty McDonald | last post by:
I have <asp:Table... </asp:Table> on my webform. In codebehind, I populate a DataTable whose data should appear in the asp:Table. I created my own code to populate the asp:Table with the DataTable, then I discovered the asp:Table has a DataBind method. But the method takes no args and so I'm confused how to use it. Is there a link to see how DataBind works for asp:Table? Should I just use my own code anyway? Thanks... Here's my...
4
1950
by: coleenholley | last post by:
I asked the question yesterday: > HI All :-) > > I don't know if I will be able to do this type of formatting, but what I > need to do is have a table row where the text wraps (This is easy) the first > line of text is font size 10 pt and the second (wrapped text) is 6 pt. I > know how to create a style sheet to get all of my font one size or the > other, but does any one have any suggestions on how to do this?
0
1396
by: Kristoffer Arfvidson | last post by:
HI! I have the following javascript events in my normal tables. onMouseOver,onMouseOut and onClick Now, when I try to put this in my asp:tablerow it just gets an error msg that literal text is not allowed in tablerow... :( When I tryed to put this table as a normal <table> it works, but, for some reason it automaticly makes an </td></tr> before the new asp:table comes in... therefore not achieving my goals in design... :(
4
3937
by: Nathan Sokalski | last post by:
When editing an ASP Table, Visual Studio does not allow me to edit it in Design View. This makes it harder to add elements, because I must add every element either by using Design View to create the element outside of the table and then using cut & paste in HTML View to move it to the desired location, or by manually typing the code in using HTML View. The first technique sometimes does not automatically update the list of elements...
0
1112
by: Leo Pape | last post by:
Hello, When I place a <asp:table> in a formview (In the edititemtemplate or insertitemtemplate) I'm not able to update data anymore if the bound controls are placed in that table When I place the controls in a general html table it works fine My code that dos not work: <EditItemTemplate>
2
2382
by: clickon | last post by:
I am confused about the way in which asp:table objects work. When a control is within an asp table it generally appears to be in the scope of the tables parent control. E.g. if i have a page that consists of an asp table called MyTable containing a textbox control call MyTextBox then i can access MyTextBox directly from the PageLoad event handler without having to use MyTable.FindControl(MyTextBox). MyTextBox can also be used for a...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9481
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10155
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10095
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7502
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2881
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.