I have ajax combobox in vb.net aspx page, on page load, I am assigning a value to combobox box, eg

combobox1.text = "abc"

but it does not accept this value and reverts to default value. the value I am assigning is not an item of the combobox.

here is some code: in aspx page

                <cc1:ComboBox ID="ComboBox1" runat="server" BackColor="#FFFFEA" Font-Bold="True" Height="25px" Width="300px">
                    <asp:ListItem Selected="True">customer</asp:ListItem>
                    <asp:ListItem>client</asp:ListItem>
                    <asp:ListItem>applicant</asp:ListItem>
                    <asp:ListItem>student</asp:ListItem>
                    <asp:ListItem>patient</asp:ListItem>
                    <asp:ListItem>citizen</asp:ListItem>
                </cc1:ComboBox>

in page_Load

If IsNothing(servedTitle) = False Then ComboBox1.Text = servedTitle

Thanks

Related posts

Recent Viewed