You must Sign In to post a response.
  • Category: ASP.NET

    Retrieving list of data in TextBox in asp.net webform

    i am working on this project, its backoffice data entry project, here in this checker module client can check what he enter in maker module, and my problem is i want bank list in textbox with select button, and after i select one data, example bank name: state bank of india, i can edit it also. (sorry for bad english) plz help. i have no idea about it i am a student.

    https://i.stack.imgur.com/wGRTR.jpg

    https://i.stack.imgur.com/YFofk.jpg
  • #769375
    Hi,

    As per your Requirement , Retrieving list of data's in Text Box is not possible .you are use Dropdownlist or ListBox.

    SqlConnection con = new SqlConnection(str);
    string com = "Select * from TableName";
    SqlDataAdapter adp = new SqlDataAdapter(com, con);
    DataTable dts = new DataTable();
    adpt.Fill(dts);
    DropDownList1.DataSource = dts;
    DropDownList1.DataBind();
    DropDownList1.DataTextField = "EmpName";
    DropDownList1.DataValueField = "EmpID";
    DropDownList1.DataBind();


    hope this will help

    Regards
    Sriram


  • Sign In to post your comments