Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 SqlDataSource

Author  Topic 

jtwork
Yak Posting Veteran

82 Posts

Posted - 2008-12-03 : 13:55:46

I'm trying to pass the result of a drop down list into a select command. I have the following but it doesn't seem to work

Dim MySQL
MySQL = "SELECT * FROM [Data] WHERE [Report_Num] = " & DropDownList1.SelectedValue

<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString=" & MySQL<%$ ConnectionStrings:server %>" SelectCommand=MySQL></asp:SqlDataSource>

cvraghu
Posting Yak Master

187 Posts

Posted - 2008-12-04 : 01:11:49
Why does ConnectionString contain MySql, the select statement. It shd contain only the connection string to db.
Go to Top of Page

sanjay.yadav
Starting Member

2 Posts

Posted - 2008-12-12 : 01:21:11
nice example
Go to Top of Page
   

- Advertisement -