Dropdownlist in Formview control RRS feed

  • Question


    Hi All

            I am using ASP.Net 2.0. I have one one FormView control. Within that control, I want to use DropDownList . Though if I bind that control, it doesn't populate with data. Can anybody help me to populate the Dropdownlist with data .



    Thursday, January 31, 2008 5:09 PM

All replies

  • If you have not specified the DropDownList.DataTextField and DropDownList.DataValueField from the Bound source, then it won't load any data into the list.



    Table Columns:




    DropDownList.DataTextField = "UserName"

    DropDownList.DataValueField = "UserId"


    If you have assigned them, check to see if your data source is returning data. You can do this via the DataBound event.


    Thursday, January 31, 2008 5:45 PM