2011-05-13 108 views
-1

我哈瓦DDL和textbox..if我的文本框的值在DDL已经存在意味着在DDL已经存在我应该显示的短信..仍然没有得到解决方案..请帮助我吗?

我想比较calidator..but不工作,,,

<asp:DropDownList ID="ddlmothertongue" AppendDataBoundItems="True" runat="server" 
      CssClass="dd_NoWidth" Width="136px" 
      OnSelectedIndexChanged="ddlmothertongue_SelectedIndexChanged" 
      AutoPostBack="True" DataSourceID="SqlDataSource1" 
      DataTextField="mothertongue" 
      DataValueField="mothertongue"> 
    <asp:ListItem Value="0" Text="-Select-"></asp:ListItem> 
</asp:DropDownList> 
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:NewMatrimonyConnectionString %>" 
    SelectCommand="SELECT distinct [mothertongue] FROM [tbl_mothertongue]union all select 'Others'"></asp:SqlDataSource> 
    <asp:TextBox ID="txtmothertongue" runat="server" 
     Visible="False" AutoPostBack="True"></asp:TextBox> 
<asp:TextBox ID="txtmothertongue" runat="server" Visible="False" 
     AutoPostBack="True"></asp:TextBox> 
+0

那么你在这里有什么问题?请更具体! – 2011-05-13 10:25:07

+2

你的问题含糊不清。很难说出这里要问什么。为此,我投票决定关闭它。 – Steven 2011-05-13 10:25:44

+0

请在主题中提出真正的问题。 – 2011-05-13 10:57:01

回答

4

由于您没有真正提供太多数据,我只能给您提供我拥有的数据的解决方案。

相关问题