[Original] Use Microsoft.Web.ui.WebControls to easily resolve permission tree issues (unlimited level permission management) 4

xiaoxiao2021-03-05  25

Purview_User_Manage_Top.aspx.cs: Select the User rights management using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using System.Web.SessionState; using System. Web.ui; using system.web.ui.webcontrols; using system.web.ui.htmlcontrols;

Namespace Yljweb._admin.purview_manage {///

/// purview_user_manage_top summary description. /// public class Purview_User_Manage_Top: System.Web.UI.Page {protected System.Web.UI.WebControls.Label lbl_Select_Username; protected System.Web.UI.WebControls.DropDownList ddl_username; private void Page_Load (object sender, System.EventArgs e) {// Place the user code here to initialize the page this.ddl_username.attributes.add ("onchange", "JavaScript: Self.Location = /" UserName = / " this.Options [THIS. SELECTEDINDEX] .Value "); if the page is generated to respond to the client or whether it is for the first time, the system automatically generates {Dropbind ();} if (Request [" Username " ! = null) {Session [ "Purview_User_Username"] = Request [ "username"];. this.lbl_Select_Username.Text = Session [ "Purview_User_Username"] ToString ();. this.ddl_username.SelectedValue = Session [ "Purview_User_Username"] ToString (); This.Response.write ("