SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am very new to Sharepoint and ASP and all of this so I suspect my question is really simple but I am confused.

I am using Sharepoint Designer 2007 and am not allowed to use code behind. The task was sold to me as a simple drag-and-drop exercise and that it would be straight-forward. I am now not so sure.

I created a SqlDataSource that has connected to my table without a problem and I can use a Data View to display that data without much problem. However I now need to do more specific things such as only selecting based on the currently logged in user and perform joins on the table and such.

So, I notice I can get information about the logged in user from an asp:LoginName but how do I pass this into a SQL query string to filter the displayed values? Or is there another way to pass data into SQL?

In the same way is it possible to pass information from drop down lists populated from a database into another dataview in order to filter based on that?

share|improve this question
The datasource you are working with is a separate SQL database I suppose and not tables in a SharePoint content database? – Thomas Vochten Feb 26 '13 at 20:23
@ThomasVochten That is correct, it is a separate SQL database that I connect to – Firedragon Feb 27 '13 at 8:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.