Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

AJAX COMBOBOX APPENDS TEXTBOX VALUE TO DROPDOWNLIST ON POSTBACK

$
0
0

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:ComboBoxID="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:SqlDataSourcerunat="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

    


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>