TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mark Uy
NA
130
0
searching with a dropdownlist
Nov 22 2009 6:39 AM
hey guys!
im having trouble of making a gridview work. the functionality is simple but im a little lost on how to make it work.
my interface looks like
this
________________________________________________________________________________
now each item inside the dropdownlist is declared like this:
<asp:ListItem Value="UnitDesc">Description</asp:ListItem>
the value up there indicates a field name within my "unit" table.
_____________________________________________________________________
heres my code under my btn_click event:
SqlDataSource1.SelectCommand = "SELECT * FROM [Unit] WHERE (' @DropDownList1 ' LIKE '%' + @UnitDesc + '%')";
SqlDataSource1.DataBind();
btw @UnitDesc is the name of the textbox for the search input.
although it doesnt show any error, it doesnt work though. my datagrid wont show up.
what am i doing wrong?
Reply
Answers (
3
)
How to find an assembly reference
smtp server configuration on web application..