0
asp.net populate dropdown problem
New Here
,
/t5/dreamweaver-discussions/asp-net-populate-dropdown-problem/td-p/763540
Apr 01, 2009
Apr 01, 2009
Copy link to clipboard
Copied
Hello,
I am having difficulty in trying to populate a dropdown, I can do this fine untill i add WHERE to the statement.
I have created a page where the user logs in and the username is then displayed in a text field called 'user' - i want the sql statement to do this:
SELECT regnumber
FROM regdetails
WHERE username = user
If i substitute the user for the actual user for eg
WHERE username = 'Peter'
then it works fine
i have tried using Dreamweaver dataset complier but can not get it to work. (also its in C#)
Hope somebody can help or advise
many thanks
Lance
I am having difficulty in trying to populate a dropdown, I can do this fine untill i add WHERE to the statement.
I have created a page where the user logs in and the username is then displayed in a text field called 'user' - i want the sql statement to do this:
SELECT regnumber
FROM regdetails
WHERE username = user
If i substitute the user for the actual user for eg
WHERE username = 'Peter'
then it works fine
i have tried using Dreamweaver dataset complier but can not get it to work. (also its in C#)
Hope somebody can help or advise
many thanks
Lance
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Explorer
,
LATEST
/t5/dreamweaver-discussions/asp-net-populate-dropdown-problem/m-p/763541#M182545
Apr 06, 2009
Apr 06, 2009
Copy link to clipboard
Copied
Lance,
Can you provide me with the page error? Also some of your C# code, I might be able to help. How are you binding the dropdown box or textbox?
If you are using a sqldatasource control you can binding the textbox with the username:
<asp:TextBox ID="user" runat="server" Text='<%# Bind("username") %>' />
David Pearson
www.saludalabs.com
www.workhorsecreative.net
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

