----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: PriyaPejavar Message 2 in Discussion Try using the repeater's ItemDataBound event to modify the drop down <%@ Page Language="C#" %> <%@ import Namespace="System" %> <%@ import Namespace="System.Data" %> <%@ import Namespace="System.Data.SqlClient" %> <%@ Import Namespace="System.Collections" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> runat="server"> protected void Page_Load(Object sender, EventArgs e) { if (!IsPostBack) { BindMyData(); } } void BindMyData() { //Connect to Database and get the data .. PublishArticles.DataSource = dr; PublishArticles.DataBind(); } xyz(Object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType = ListItemType.Item) { DropDownList ddl = (DropDownList) e.Item.FindControl("mydropdown") // Creation of Hashtable here .. ddl.DataSource = hshDepartment; ddl.DataTextField = "Key"; ddl.DataValueField = "Value"; ddl.DataBind(); } } .. <body> .. < <asp:Repeater ID="PublishArticles" Runat="Server" OnItemDataBound="xyz"> <ItemTemplate> .. // Display of Items retrieved from DB goes here <asp:DropDownList ID="mydropdown" runat="Server" /> </ItemTemplate> </asp:Repeater> .. </body> </html> ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/bdotnet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
