haibec Posted July 14, 2007 Share Posted July 14, 2007 Hi all!I have table Product includes field : ID,Product,Price and table Customer include field: JID,Name. I want write a procedure SQL for search. In my page Search.aspx (by C#) include a textbox (ID=name) and a DropDownlist ( include two values: Customer and Product) and a Submit button. I want when user type a name into textbox and selected a value in DropDownlist and click submit. If value of DropDownlist = Product then my procedure will run SQL command " Selec * from Product......" . If value of DropDownlist = Customer then my procedure will run SQL " Select * from Customer.....". The result will a GridView. Please help me Link to comment Share on other sites More sharing options...
aspnetguy Posted July 19, 2007 Share Posted July 19, 2007 You need to have this in a stored procedure???why not just do a simple if else in C# and run the correct query? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.