By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,526 Members | 2,189 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,526 IT Pros & Developers. It's quick & easy.

Problem with Dataset value persistance across postbacks

P: n/a
Hi,

This is something weird I noticed recently in ASP.Net.

I have created typed dataset and I have filled the data.

when a postback happens, the data of the dataset is lost. Is there a workaround for this.

I have a databound listbox. When a postback happens the values in the listbox are still there.

I would like to know how and why this is happenning and also it's different for a dataset and a listbox.

Any help would be appreciated

Thanks
Kiran
Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Kiran,

Between postbacks a web page doesn't exist anywhere. Every postback builds it up again and again. If you want page members to persist, you have to take care about it. Some members persist because they arrive back from the client with every postback. Your ddl is one of them. The dataset doesn't travel to client and back, although you can make it to in the ViewState. More appropriate persistance mechanism for a dataset is either re-populating it on every postback or saving it in a session variable.

Eliyahu

"Kiran" <ki**********@gmail.com> wrote in message news:uq****************@tk2msftngp13.phx.gbl...
Hi,

This is something weird I noticed recently in ASP.Net.

I have created typed dataset and I have filled the data.

when a postback happens, the data of the dataset is lost. Is there a workaround for this.

I have a databound listbox. When a postback happens the values in the listbox are still there.

I would like to know how and why this is happenning and also it's different for a dataset and a listbox.

Any help would be appreciated

Thanks
Kiran
Nov 19 '05 #2

P: n/a
Thanks a lot
"Eliyahu Goldin" <re*************@monarchmed.com> wrote in message news:Oh**************@TK2MSFTNGP09.phx.gbl...
Kiran,

Between postbacks a web page doesn't exist anywhere. Every postback builds it up again and again. If you want page members to persist, you have to take care about it. Some members persist because they arrive back from the client with every postback. Your ddl is one of them. The dataset doesn't travel to client and back, although you can make it to in the ViewState. More appropriate persistance mechanism for a dataset is either re-populating it on every postback or saving it in a session variable.

Eliyahu

"Kiran" <ki**********@gmail.com> wrote in message news:uq****************@tk2msftngp13.phx.gbl...
Hi,

This is something weird I noticed recently in ASP.Net.

I have created typed dataset and I have filled the data.

when a postback happens, the data of the dataset is lost. Is there a workaround for this.

I have a databound listbox. When a postback happens the values in the listbox are still there.

I would like to know how and why this is happenning and also it's different for a dataset and a listbox.

Any help would be appreciated

Thanks
Kiran
Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.