Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: ASP.NET4.0
hi sir;
i want that when i click the search button the value are display or set in combo box. The values retrieved from database?
please solve my problem...
Thanks in advance...
Posted 20-Feb-13 11:30am
ryanb31 at 20-Feb-13 16:31pm
What do you have so far? Where are you stuck?
joshrduncan2012 at 20-Feb-13 16:33pm
My +5.

1 solution

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

Solution 1

first of all you can try by your self , in which line your facing problem just ask that line alone directly you ask code means that's not good for you.
Any one give a code whatever you expect but you can't understand that logic .
Here what i'm trying to do is i have a textbox in that i enter some text and then click on search button then based upon the search the result to be displayed on DDL.
You write your SQL query
 protected void btnSearch_OnClick(object sender, EventArgs e)
protected void Bind_Projects()
        string Search = txtSearch.Text.Trim();
        DataSet dsProj = //what do you want you fetch taht information                           
        ddlSearch.DataSource = dsProj;
        ddlSearch.DataTextField = "Proj_Description";
        ddlSearch.DataValueField = "Proj_Code";
        ddlSearch.Items.Insert(0, "---Select---");

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 175
1 Zoltán Zörgő 160
2 Peter Leow 100
3 CPallini 70
4 Ramza360 51
0 Sergey Alexandrovich Kryukov 9,568
1 OriginalGriff 6,901
2 Peter Leow 4,737
3 Zoltán Zörgő 4,404
4 CHill60 2,932

Advertise | Privacy | Mobile
Web02 | 2.8.150129.1 | Last Updated 20 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

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