Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Share Information Between a Page and its UserControls?

Reply
Thread Tools

Share Information Between a Page and its UserControls?

 
 
Axel Dahmen
Guest
Posts: n/a
 
      10-24-2003
I need to share complex data across a page and its Web user controls. Can
someone please enlighten me on how to do this?


My approach doesn't work:

* Create a class,

* add a public reference to that class to the ASPX page and all the Web user
controls (WUCs),

* in the Page's Init() event, create an object of the class, set all its
members and set all the WUCs' references to this object,

* access the object from any of the references.


This and similar approaches (e.g. using only one public reference in the
Page and access it from the WUCs) don't work because the WUCs' Init() event
are called before the Page's Init() event, so I can neither create an object
nor initialize any reference at this central point.

The data to be shared across the WUCs comes from the database, hence it's
quite expensive to create a distinct object from within each of the WUCs. I
can't also use the Load() events because I use the class's data to
dynamically create controls in the WUCs.

Any ideas?

TIA,
Axel Dahmen


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Share-Point-2010 ,Share-Point -2010 Training , Share-point-2010Hyderabad , Share-point-2010 Institute Saraswati lakki ASP .Net 0 01-06-2012 06:39 AM
Its a bird, its a plane, its.. um, an Attribute based System? thunk Ruby 14 04-03-2010 10:08 AM
Its a bird, its a plane, its.. um, an Attribute based System? thunk Ruby 0 04-01-2010 10:25 PM
Its a bird, its a plane, no ummm, its a Ruide thunk Ruby 1 03-30-2010 11:10 AM
Share Information Among a Page and its UserControls? Axel Dahmen ASP .Net Web Controls 0 12-06-2003 03:05 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57