473,395 Members | 1,437 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,395 software developers and data experts.

Where is bound data stored?

Hi,

I am trying to find out where a bound dataset is being stored. I am
fairly new to all this so let me try to explain with an example using
my code:

if( !IsPostBack)
{
grdMyDataGrid.DataSource = GetData();
grdMyDataGrid.DataBind();
}

Since my data persists every time I do a postback, it must be stored
somewhere. Is it stored in my ViewState? In the Session? Some other
mechanism?

Thanks in advance.

Oct 17 '06 #1
3 1126
Hi,

the DataSet itself isn't stored as is, but your grid control is able to
store relevant data in ViewState so that it can reconstruct itself on
postback. E.g the data it gets when databinding.

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
<rb********@armbrotransport.comwrote in message
news:11*********************@e3g2000cwe.googlegrou ps.com...
Hi,

I am trying to find out where a bound dataset is being stored. I am
fairly new to all this so let me try to explain with an example using
my code:

if( !IsPostBack)
{
grdMyDataGrid.DataSource = GetData();
grdMyDataGrid.DataBind();
}

Since my data persists every time I do a postback, it must be stored
somewhere. Is it stored in my ViewState? In the Session? Some other
mechanism?

Thanks in advance.

Oct 17 '06 #2
I know this isn't an answer, but I have got a problem I think is related to
this question. I've got data in a tbl in sql that gets deleted and
repopulated constantly, when I populate this data into a gridview and I
refresh the page, the gridview keeps adding the data sequentially instead of
displaying the actual data in the table...this is with SQL 2000 and ASP.NET
on .NET 2.0

--
The walls between art and engineering exist only in our minds
"Teemu Keiski" wrote:
Hi,

the DataSet itself isn't stored as is, but your grid control is able to
store relevant data in ViewState so that it can reconstruct itself on
postback. E.g the data it gets when databinding.

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
<rb********@armbrotransport.comwrote in message
news:11*********************@e3g2000cwe.googlegrou ps.com...
Hi,

I am trying to find out where a bound dataset is being stored. I am
fairly new to all this so let me try to explain with an example using
my code:

if( !IsPostBack)
{
grdMyDataGrid.DataSource = GetData();
grdMyDataGrid.DataBind();
}

Since my data persists every time I do a postback, it must be stored
somewhere. Is it stored in my ViewState? In the Session? Some other
mechanism?

Thanks in advance.


Oct 17 '06 #3
The data is stored in viewstate, which, by the way, can cause your web
pages to become outrageously bloated when used with a grid.

After rendering your page, select 'view source' from the browser.
Search for the hidden text field called "_VIEWSTATE". All that encoded
data after the = sign is your grid data being persisted between
postbacks. When you submit your form, all that data goes back to the
server from the client so that asp.net can rebuild your grid. It makes
life simple at first for a developer and seems really cool at first...
but after a while, you realize that this is just "wrong" and you'll
figure out ways to get your grid to continue working even after setting
"enableviewstate=false". If you begin to have performance problems,
this is one of the first places to look.

Oct 18 '06 #4

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

Similar topics

1
by: Skip Borland | last post by:
I understand that in .Net, there is no such animal as the "bound OLE" frame available in Access. Unfortunately, as we migrate off of an old (97 - yikes!) application, combine it with functionality...
10
by: serge | last post by:
I am doing a little research on Google about this topic and I ran into this thread: ...
19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
4
by: jon f kaminsky | last post by:
Hi- I've seen this problem discussed a jillion times but I cannot seem to implement any advice that makes it work. I am porting a large project from VB6 to .NET. The issue is using the combo box...
57
by: TC | last post by:
I'd like to open a discussion about the state of the industry. For the past year, I've been unable to find competent Access developers available for hire. I'm worried about that. I think there's...
8
by: Jon Weston | last post by:
I'm setting up an Access2003 database with pictures. I put a bound ole picture ctrl on a form that's source is the table that contains the pictures and follow ALL the directions for embedding a...
2
by: Anonieko | last post by:
Hello ASPNET guru's, What is a clean way to go around the problem of displaying a GridView templated column where data can contain Single Quote ( ' )? I maybe too naive, but this is of course...
5
by: drdave | last post by:
Hi, In a bound column I have currency datatypes, but the client does not like $ 0.00 and wants to show a blank instead.. I'm trying to use an if statement to write out string.empty but it...
43
by: Kislay | last post by:
Which of the following is correct regarding the storage of global variables : 1. Global variables exist in a memory area that exists from before the first reference in a program until after the...
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...
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...

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.