User1343581070 posted
Hi,
I am using the Ajax Combobox in vs2012 to enter Product Names. On entering the data and pressing the submit button , if there is an error I display the message and the focus is set to the combobox. However now the
Product Name is added to the list even though i havent saved it to database because of the error. I want to display only those items which are in the database
My html is
<ajaxToolkit:ComboBox
ID="ajxCbxProdName"
DataSourceID="SqlDataSource1"
RenderMode="Block"
CssClass="txtBoxClass1 WindowsStyle"
AutoCompleteMode="SuggestAppend"
runat="server"
DataTextField="PRODUCT_NAME"
DataValueField="ID"
MaxLength="0"
AppendDataBoundItems="true"
DropDownStyle="Simple">
</ajaxToolkit:ComboBox>
<asp:SqlDataSource
runat="server"
ID="SqlDataSource1"
ConnectionString='<%$
ConnectionStrings:conString %>'
SelectCommand="SELECT [PRODUCT_NAME], [ID] FROM [PRODUCT_MAST] WHERE PRODUCT_TYPE='RM' ORDER BY [PRODUCT_NAME]"></asp:SqlDataSource>
Please help
regards
Sanjish