down votefavorite Hello all
I have the next code of ddl (asp.net , c#):
<asp:DropDownList ID="ddl1" runat="server" AutoPostBack="True"
DataSourceID="LinqDataSource1" DataTextField="CarName1"
DataValueField="id" onselectedindexchanged="ddl1_SelectedIndexChanged"
<asp:LinqDataSource ID="LinqDataSource1" runat="server"
ContextTypeName="DataClassesDataContext" EntityTypeName="" TableName="CarNames">
</asp:LinqDataSource>
as you see , the ddl get the values from sql table... i want that the first value display --select car-- ...
I have tried many options and answers here, include the listitem option with AppendDataBoundItems = "true" but the page shown me an error .. somthing about int32, obj .... when i succed that was with the code behind:
Go to the complete details ...