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

    Retrieving list of data in TextBox in 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.
  • #769375

    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();
    DropDownList1.DataSource = dts;
    DropDownList1.DataTextField = "EmpName";
    DropDownList1.DataValueField = "EmpID";

    hope this will help


  • Sign In to post your comments