473,396 Members | 2,024 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,396 software developers and data experts.

Life without ViewState

The life with ViewState is difficult - say 70kB of mess....

The life without View State is very difficult:
1. No access to Field.Value or Field.Text at Page_Load (are empty)
2. No access to Request.Form["Field"], because "Field" becomes "_ctl1:Field"
or sth
3. No change events, or events without arguments.
4. Cannot assign the values to fields, as they are filling itself
automagically (although ViewState is disabled). See:
http://support.microsoft.com/default...b;en-us;316813

Let's say, that after change of the value of <SELECT> I want to change some
other fields.
The only method to work without ViewState, I found so far is:
1. at Page_Load get the data:
string _fieldvalue = Request.From[Field.UniqueId]
2. Check if _fieldvalue is correct
3. Compare _fieldvalue to the previous value stored in Session
4. Correct fields' values
5. Save _fieldvalue to Session variable
6. at Page_PreRender:
Field.Value = _fieldvalue

Stupid, yeah? Any comments?

Regards.

Piotr.

Nov 17 '05 #1
0 991

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

Similar topics

14
by: qaz | last post by:
I've always used session cookies in my web sites. However, since more and more people (including me) are starting to disable cookies, I'm beginning to think that I should change my ways and design...
0
by: Jonah Olsson | last post by:
Hi guys, How can I change the following code to work without using Viewstate? Thanks Jonah ** file.aspx ** <asp:datagrid ID="dgEmails" runat="server" Width="95%"
0
by: Johan Åhlén | last post by:
Hi, Using a treeview with viewstate enabled easily generates very big viewstates (hundreds of Ks). Does anyone have any experience of running treeviews without viewstate? To keep track of...
1
by: andla | last post by:
Hi, I'm desperate to know what I'm doint wrong. If I enable viewstate on a datagrid then i get events to update, edi and cancel. If i disable viewstate then i must display the grid everytime in...
1
by: Lisa | last post by:
I have a web app that gets a recordset from the database and fills a grid. You can drilldown from this table to a detail table. Because the tables sometimes get huge, and because I have to go...
9
by: Man-wai Chang | last post by:
How do/would you implement a pop-up window for user to pick a value out of a searchable list and then pass it back to the textbox? -- iTech Consulting Services Limited Expert in ePOS...
12
by: Nick C | last post by:
Hi How can i reduce the viewstate for my asp.net application. It is getting very large now. What is a good solution? thanks N
2
by: Vijay | last post by:
Hi, I am working on an Asp.net 2.0 web application that uses master pages, according to our application architecture we should not use Viewstate. Is there a work around to raise the events fired...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.