SQL DataSource parameters

G

Guest

I am a VB and SQL developer but new to ASP.Net world.
I have a SQL Datasource that returns an ID of the Current user.
I've setup a second SQL Datasource that performs a SELECT statement to a
table but now need to use the WHERE criteria to capture the ID from the 1st
datasource mentioned above to query the results for the current user. Please
what is the best way or ways to accomplish this? I know I need a parameter
that is bound to a control in the form but dont know how to do this.
Also I would also like to know how to create a FUNCTION in SOURCE code that
captures the ID from the first SQL DataSource. thanks for any assistance.
 
D

David Wier

It all depends on where you're storing your ID - - if you have it visible,
using a control, or have it assigned to a session, etc.
As you go through the sql wizard (vs.net 2005) in configuring the
datasource, you assign the parameters, then, at that point, you choose where
the parameter is getting its data.
 
G

Guest

thanks for your reply David.
Okay, I would like to store the the ID in a label or text box then, how do I
display the ID results in these controls?
 

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,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top