Databinding with two datasources....

G

Guest

I have a page that displays a news article in a form view feeding off a
datasource that just picks up the id from a query string. I want to add
functionality for related links - so i created a stored procedure that takes
three parameters. On the page i have added a second datasource which calls my
stored proc, and spits out the results into a Repeater.

Currently however the two datasources are independant - my second data
source takes 3 parameters - one is the ID which i can get from the query
string but the other two are specific to the values of two fields in my form
view; relying on data from the first datasource.

So my question is as follows:
1) Which event should have the code to manipulate the second datasources
input parameters (i was thinking the onDatabound of the primary datasource;
would this be efficient)

2) can i programmatically change the input parameters of my second
datasource dependant on results of the first - if so how?

3) is the approach i am using an OK one? Is there a way of programatically
telling the system not to bother with doing anything ave with the second
datasource until we have filled its input parameters? i dont want it to go
through process the datasources... then when it hits my onDatabound procedure
have to go back and redo the processing of the second datasource - or am i
just not understanding things??

4) can anyone think of a better way of providing my related links?? is my
approach dense??

Regards
Owen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top