Click here to Skip to main content
11,716,938 members (87,120 online)
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 10: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 659
1 F-ES Sitecore 260
2 Maciej Los 185
3 OriginalGriff 175
4 Richard MacCutchan 140
0 Sergey Alexandrovich Kryukov 1,029
1 Maciej Los 464
2 Richard MacCutchan 430
3 CHill60 415
4 OriginalGriff 415

Advertise | Privacy | Mobile
Web01 | 2.8.150901.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