Tree View
-
I am filling tree view using dataset, The problem is when i click on expand or colapse control it is not working and in browser it troughs as java error has "contentplaceholder1 treeview1 data is undefined" and some stuff...Can any1 help me thanks in advance
-
I am filling tree view using dataset, The problem is when i click on expand or colapse control it is not working and in browser it troughs as java error has "contentplaceholder1 treeview1 data is undefined" and some stuff...Can any1 help me thanks in advance
i am giving one example which i did..... i hope it will help's you..... ]]> Untitled Page
Style="z-index: 101; left: 555px; position: absolute; top: 266px">
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.SqlClient; public partial class etc : System.Web.UI.Page { SqlConnection cn=new SqlConnection("User ID=sa; password=sa; Initial Catalog=sri; Data Source=TNLMSSRV"); string[] rolesArray; protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { rolesArray = Roles.GetAllRoles(); DropDownList1.DataSource = rolesArray; DropDownList1.DataBind(); } } protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) { PopulateRootLevel(); } private void PopulateRootLevel() { SqlConnection objConn = new SqlConnection("Data Source=TNLMSSRV;Initial Catalog=sri;User ID=sa;Password=sa"); //SqlCommand objCommand=new SqlCommand("select a.groupid,d.featureid,a.name,b.featurename,b.featurepath from groups a,features b,aspnet_roles c,rolesfeatures d where a.groupid=b.groupid and b.featureid = d.featureid and c.roleid = d.roleid and c.roleid = (select roleid from aspnet_usersInRoles where userid=(select userid from aspnet_users where username='sri'))order by a.sorder,3", objConn); SqlCommand objCommand = new SqlCommand("select a.groupid, d.featureid, a.name, b.featurename, b.featurepat