CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: DropDownList

  1. #1
    Join Date
    Jul 2006
    Posts
    141

    DropDownList

    Hi, i am a new bee in asp.net.I have a questiob to ask over here.

    My table structure are as below:

    EmpCode EmpName
    0001 John
    0002 Mike
    0003 Steve


    I pump the EmpName to the dropDownList and and let the user to select the employee.Is it possible when user select the employee, instead from getting the Empname as a result, the dropDownList return the empCode for me as a result.
    Does anyone has idea to do this?

  2. #2
    Join Date
    Jun 2004
    Location
    Kashmir, India
    Posts
    6,808

    Re: DropDownList

    A drop down list has two properties, DataValueField and DataTextField. You can set the first one as EmpCode and the second one as EmpName. While retrieving you can just retrieve the DataValueField.

  3. #3
    Join Date
    Jul 2006
    Posts
    141

    Re: DropDownList

    hi, got it.Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured