c# - Gridview should display dropdownlist "Text" which is selected instead of "Value" -
i have form in have 2 dropdownlist "status" & "shelf" both have sql datasources , dependent. when ever insert record, enters "status" & "shelf" columns contain "values" instead of "text".
since set parameters using selectedvalue
property, datavaluefield
bounded droupdown list. if need datatextfield
, try below
command.parameters.addwithvalue("@status", ddlstatus.selecteditem.text); command.parameters.addwithvalue("@shelf", ddlshelf.selecteditem.text);
Comments
Post a Comment