After loging open the file for user connnected [modified]
-
Hi, I used the code for this pageDeveloping custom ASP.NET Membership and Role providers reading users from custom section in the web.config[^] [] modified code that supports multiple roles per user I have several folders one folder for each role I do not know how to modify the code to open the file that corresponds to user connected and not the default.aspx page. Thanks
modified on Tuesday, February 1, 2011 6:18 AM
-
Hi, I used the code for this pageDeveloping custom ASP.NET Membership and Role providers reading users from custom section in the web.config[^] [] modified code that supports multiple roles per user I have several folders one folder for each role I do not know how to modify the code to open the file that corresponds to user connected and not the default.aspx page. Thanks
modified on Tuesday, February 1, 2011 6:18 AM
Hi, I dont work with vb.net I added this code in the file Default.aspx.vb
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load fldRoles.Text = String.Format("User {0} has in the following roles:", My.User.Name) For Each arole As String In Roles.GetRolesForUser(My.User.Name) fldRoles.Text += String.Format("<br/>{0}", arole) Next If My.User.IsInRole("AdminModule1") Then Response.Redirect("adminM1/nn.aspx") Response.End() ElseIf My.User.IsInRole("AdminModule2") Then Response.Redirect("adminM2/nn.aspx") Response.End() ElseIf My.User.IsInRole("AdminModule3") Then Response.Redirect("adminM3/nn.aspx") Response.End() End If End Sub
but no result Thanks