Friends i have created multi selected dropdown list ..its fineworking properly..
i have used like a user control...
if its used one usercontrol its working properly but when use multiple user control then its not working..
the code like this...
in usecontrol.ascx
in .aspx
it is not working can any one knows this sol,,
Hemant KumarPosted Oct 31, 2011, 8:55 AM
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestPage.aspx.cs" Inherits="WebApplication2010.TestPage" %>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
namespace WebApplication2010
{
public partial class TestPage : System.Web.UI.Page
{
String connectionString = ConfigurationManager.ConnectionStrings["TESTDB"].ConnectionString;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
using (NorthwindEntities ne = new NorthwindEntities())
{
var data = from cust in ne.Customers select new { cust.ContactName, cust.CustomerID };
ddl.DataSource = data;
ddl.DataTextField = "ContactName";
ddl.DataValueField = "CustomerID";
ddl.DataBind();
}
}
}
}
}