Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. After loging open the file for user connnected [modified]

After loging open the file for user connnected [modified]

Scheduled Pinned Locked Moved ASP.NET
asp-netcsharpcomtutorialquestion
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    amina89
    wrote on last edited by
    #1

    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

    A 1 Reply Last reply
    0
    • A amina89

      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

      A Offline
      A Offline
      amina89
      wrote on last edited by
      #2

      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 Subbut no result Thanks

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups