示例#1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string[] rolestrings = UserIdentity.GetAllRoles(Server);
         roleList.Items.Add("Select role");
         foreach (string role in rolestrings)
         {
             roleList.Items.Add(role);
         }
         ViewState["EmailAddress"] = "";
         ViewState["FirstName"]    = "";
         ViewState["LastName"]     = "";
         ViewState["Password1"]    = "";
         ViewState["Password2"]    = "";
         btnCreateUser.Enabled     = false;
     }
 }