Click here to Skip to main content
14,428,429 members
Rate this:
Please Sign up or sign in to vote.
See more:
I have an ASP.NET webform on which I use a DropDownList control as searchby i also have 3 textboxes such as enter Quotation number,enter quote date,enter customer code..... when the user selects one item from dropdown, first textbox should be displayed...when id number is entered in textbox and clicks on submit button the data from the database should be displayed by using gridview

==================================================

Design example
==============

search by - Dropdownlist

i have 3 items in dropdown ,When a user selects an item from dropdown,automatically a textbox should be displayed as

Enter Quotation Number - TextBox

so,when the user types the quotation number and clicks on submit button a gridview must be displayed by showing all the details from database table

----------------------------------------------
search by - Dropdownlist
Enter Quotation Number - TextBox
Grid view details from database
Posted
Comments
[no name] 23-Aug-11 8:18am
   
What difficulties are you having? Have you tried anything?
Syed SufiyanUddin 23-Aug-11 8:20am
   
I dont Understand What to do please help me in details....by the am fresher to Development field.
Syed SufiyanUddin 23-Aug-11 8:21am
   
I dont Understand What to do .., Please Help in Detail....By the Way am fresher to development field.
digimanus 23-Aug-11 10:51am
   
read books about asp.net, c# and ado.net! we do not do the work for you!
Syed SufiyanUddin 23-Aug-11 8:32am
   
I have tried, but unable to success......plz help me

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Initially, the textboxes are hidden, and will be shown when the SelectedIndexChanged[^] event of the DropDownList has been triggered. You do this by setting the Visible[^] property of the textbox to true. You should have some condition on your code that checks what textbox to show/hide. As for the retrieval from your database, you may want to read more about ADO.Net. Its actually pretty straightforward, and there are a lot of articles out there if you only use Google, so I leave that as a homework for you. Now I hope I have left some points for you to get started. Try writing the code now and let us know if you have issues along the way. Good luck.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100