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

Reusing data controls

P: n/a
Vik
I use the same dataadapters and datasets on a few aspx pages. Currently I
create these data controls on each page. Is it possible to create these
controls only once and then use them on the different pages?

Thanks.
Nov 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Everything is torn down and rebuilt with each new page, so the only way to
"create once" is to persist them across the pages--i.e. use session
variables. For a dataadapter, that's likely not worth the trouble, but for a
dataset it might be (depending on how large it is, how intense the i/o,
whether you want to keep it at the application level, etc.).

"Vik" wrote:
I use the same dataadapters and datasets on a few aspx pages. Currently I
create these data controls on each page. Is it possible to create these
controls only once and then use them on the different pages?

Thanks.

Nov 18 '05 #2

P: n/a
Vik
I meant reusing the data controls in design time, not in run time. That is
creating the data controls in one place and referring to them in other
pages. Now if I redesign a table in a database I have to recreate the
dataadapters and datasets in all the pages that use that table. I'm looking
for a way to make these changes only once in one place.

Vik

"Bill Borg" <Bi******@discussions.microsoft.com> wrote in message
news:29**********************************@microsof t.com...
Everything is torn down and rebuilt with each new page, so the only way to
"create once" is to persist them across the pages--i.e. use session
variables. For a dataadapter, that's likely not worth the trouble, but for a dataset it might be (depending on how large it is, how intense the i/o,
whether you want to keep it at the application level, etc.).

"Vik" wrote:
I use the same dataadapters and datasets on a few aspx pages. Currently I create these data controls on each page. Is it possible to create these
controls only once and then use them on the different pages?

Thanks.

Nov 18 '05 #3

P: n/a
Sorry, I'm not much help there. I always roll my own dataadapters at
run-time, and I don't strongly type the data.

"Vik" wrote:
I meant reusing the data controls in design time, not in run time. That is
creating the data controls in one place and referring to them in other
pages. Now if I redesign a table in a database I have to recreate the
dataadapters and datasets in all the pages that use that table. I'm looking
for a way to make these changes only once in one place.

Vik

"Bill Borg" <Bi******@discussions.microsoft.com> wrote in message
news:29**********************************@microsof t.com...
Everything is torn down and rebuilt with each new page, so the only way to
"create once" is to persist them across the pages--i.e. use session
variables. For a dataadapter, that's likely not worth the trouble, but for

a
dataset it might be (depending on how large it is, how intense the i/o,
whether you want to keep it at the application level, etc.).

"Vik" wrote:
I use the same dataadapters and datasets on a few aspx pages. Currently I create these data controls on each page. Is it possible to create these
controls only once and then use them on the different pages?

Thanks.


Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.