1,105,417 Community Members

Ajax combo box data fill in ASP.NET application

Member Avatar
weeraa
Junior Poster in Training
97 posts since Oct 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

I'm Developing application using ASP.NET and VB.NET. It is used Ajax controls as well. I added dropdownlist (Standard controller) and databind to it. It is working well. But if i added Ajax combo box, it is not working. (It means data not filling to combobox) No any errors showing.

This is my ASP code

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
       <ContentTemplate>
           <asp:ComboBox ID="ComboBox1" runat="server" AppendDataBoundItems="True"
       AutoCompleteMode="SuggestAppend" AutoPostBack="True" MaxLength="10">
           </asp:ComboBox>
       </ContentTemplate>
      </asp:UpdatePanel>

This is my VB code in form load event

ComboBox1.DataSource = ds.Tables(0)
ComboBox1.DataValueField = "PT_ID"
ComboBox1.DataTextField = "PT_PartName"
ComboBox1.DataBind()

In above code, dataset (defined as ds) has values. If i added Dropdownlist controller name instead of combobox1, data fill to the dropdownlist.

What's wrong with my code. no any errors are showing...

Other details.
VS2008
.NET frame work 3.5
AjaxControlToolkit.Binary.NET35

LastMitch
Deleted Member
 
0
 

What's wrong with my code. no any errors are showing...

I'm no familiar with VB. But for your combo box code you should have included something this which I notice you didn't post it so I assume you don't have it bind:

http://asp-net-example.blogspot.com/2011/02/ajax-combobox-how-to-data-bind-combobox_05.html

Member Avatar
ggamble
Junior Poster
151 posts since Mar 2006
Reputation Points: 1 [?]
Q&As Helped to Solve: 17 [?]
Skill Endorsements: 4 [?]
 
0
 

Debug your code and make sure its being called.

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article