473,386 Members | 1,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Can't get the updated value on the postback

Ann
Hi

I have html table control runat = 'sever'

I run some client side javacript to insert rows of data into the htmltable,
does anyone know how to get the inserted value on the postback?

I did try to set the control's enableviewstate to true, no luck.

Please help!

Thanks
Ann
Nov 19 '05 #1
2 1046
I don't think EnableViewState is going to help you.

The viewstate is stored in a hidden field thats injected into the page
on creation. You can see this by looking at the page source of any aspx
produced page.

""""
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="RnkBWQQvIlCaelwoFv66rW/69Hkq0jfasNnUiaYpmZOayYK/.......
""""""

Unless you can produce some JS to correctly alter the viewstate field
(bad idea), then nothing your JS is doing to the document is going to
magically post back. Even if you could alter the viewstate, I doubt
that any information related to HtmlTable is stored in there, as
HtmlTable is really only intended for data display, not editing.

Are the rows been added in responce to user actions, or as part of the
page setup?

If it's just page setup, you're better off adding to rows to the aspx
page, or using the PageLoad method to call HtmlTable.Rows.Add()

If the users are adding data, have you considered using GridView? It
can be bound to an ObjectDataSource or XmlDataSource as well as a SQL
database.

As a general note, mixing fancy 3rd party JS with ASP.NET is never
going to be clean and easy.

Nov 19 '05 #2
What do you post ? Only field forms are posted to the server...

Patrice

--

"Ann" <An*@discussions.microsoft.com> a écrit dans le message de
news:87**********************************@microsof t.com...
Hi

I have html table control runat = 'sever'

I run some client side javacript to insert rows of data into the htmltable, does anyone know how to get the inserted value on the postback?

I did try to set the control's enableviewstate to true, no luck.

Please help!

Thanks
Ann

Nov 19 '05 #3

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

Similar topics

1
by: Mike | last post by:
I create a dynamic control and added it to a panel. I get the selected value of the control via a btn_click() but my problem is everytime the page is postback the selected values go back to the...
4
by: CaptRR | last post by:
I think this is the right group to post to, so here goes. My problem is this, I cannot update the datarow to save my life. Been on this for 2 days now, and still am no closer to figuring it out...
1
by: Mad Scientist Jr | last post by:
I don't know how this is happening, but a dropdown control I have is resetting to the 2nd value on the list anytime a postback occurs. I have no initiation code outside of If Not (IsPostBack) ...
10
by: Calvin X | last post by:
Hi all I have the following code in the page load event. The function in this code works get to populate the 4 dropdownlists on my webform. I have enabled postback because when the user selects...
1
by: Wanda | last post by:
Hi, I am trying to read the DropDownList's selectedIndex when it fires the event "SelectedIndexChanged", however, the index value is always 0 no matter what I've clicked. I just wonder what...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
0
by: Tuomo | last post by:
Hi! I have a form (System.Web.UI.Page) that contains a DataGrid control and a DataTable that contains values for the data grid and that is data bound to the DataGrid. When I switch the grid to...
2
by: pallaw | last post by:
Hello All, My web Client is using a COM component with connection point enabled.my client is getting call back from this component.now I have to update a text control in handler of this...
3
by: John Kotuby | last post by:
Hi all, I am converting an ASPX 3.5 page in VB and VS 2008 from the standard postback to callbacks using an UpdatePanel. I had originally been adding an onload attribute to the Body tag in the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.