<asp:DropDownList ID="DrpPrefLangauge1" AppendDataBoundItems ="true" OnSelectedIndexChanged="DrpPrefLangauge1_SelectedIndexChanged" runat="server" AutoPostBack="True"> <asp:ListItem Text="----Select----" Value="0"> </asp:ListItem> </asp:DropDownList> <asp:DropDownList ID="DrpPrefLangauge2" AppendDataBoundItems="true" runat="server"> <asp:ListItem Text="----Select----" Value="0"> </asp:ListItem> </asp:DropDownList>
protected void setLangauge() { nsBusinessLogicLayer.LanguageInfo objLanguageInfo = new nsBusinessLogicLayer.LanguageInfo(); nsAbstractLayer.LanguageInfoAbstract objLanguageInfoAbstract = new nsAbstractLayer.LanguageInfoAbstract(); //objLanguageInfoAbstract.Languageid = Convert.ToInt64(DrpPrefLangauge1.SelectedValue); DataTable dt = objLanguageInfo.Search(objLanguageInfoAbstract); DrpPrefLangauge1.DataSource = dt; DrpPrefLangauge1.DataTextField = "LanguageName"; DrpPrefLangauge1.DataValueField = "Languageid"; DrpPrefLangauge1.DataBind(); DrpPrefLangauge2.DataSource = dt; DrpPrefLangauge2.DataTextField = "LanguageName"; DrpPrefLangauge2.DataValueField = "Languageid"; DrpPrefLangauge2.DataBind(); }
protected void DrpPrefLangauge1_SelectedIndexChanged(object sender, EventArgs e) { ListItem value = DrpPrefLangauge1.SelectedItem; //int index=DrpPrefLangauge2.Items.IndexOf(value); DrpPrefLangauge2.Items.Remove(value); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)