pass parameters from components to aspx pages.

Results 1 to 2 of 2

Thread: pass parameters from components to aspx pages.

  1. #1
    Join Date
    Dec 1969

    Default pass parameters from components to aspx pages.

    Hi,<BR>My web application contains VB components used for all DB code. On many page_load functions I need to retrieve a number of parameters from the database. In the old days I would just return a rs and get my parameters. Such as<BR>If Not oRS.EOF and Not oRS.BOF Then<BR> param1 = oRS("param1")<BR> param2 = oRS("param2")<BR>End If<BR><BR>Is there any preferred way to send parameter values from a component to the aspx page? I was thinking the component could get a dataReader object from the db and then cycle through it building a collection of some sort. This collection would be then returned to the aspx page. Any ideas? The aspx page could then just run through the collection. Is there a cleaner way?<BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: pass parameters from components to aspx pages.

    Yeah exactly... Ive seen it done many different ways I dont know the most effecient... One way is to create classes with Each field Name set each field to the fieldname and return the class back. This takes awhile but its probably the most effecient memory wise. Or Create a NameValueCollection object and fill the data in there and return it. Or pass a dataset to the function and have it fill it. Dont return a dataset. Fill the dataset. The beauty of datasets are you can keep passing them to all sorts of routines and it will keep getting filled with data. Its scalable that way. A little mini database that can keep getting populated with data.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts