.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Need help redirecting users to personalized page

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

 Hi, first timer here so be gentle.


I've been able to create a cool little website, it's up and running with users logging in and out, I created roles so my administrative team can see sensitive data that's not available to regular and anonymous users.

Now they would like me to create a page specific to each user.  For instance when user A logs in they are redirected to a page that has information that pertains to user A only (like a list of their benefits/ their remaining vacation time). This page needs to be accessible only to user A. 

I've watched a ton of the videos but have yet to see one that covers this topic, any help would be great!!!





View Complete Post

More Related Resource Links

Want to create Page URL rewrite based on Users GUID and Display name?



I am using the asp.net membership. 

On my site I have a Profile.aspx page.

In the code behind of this page,  i get the logged in UserId (Guid) and pass

this to a method in my DAL. GetUserByUserId()


In my database I have a Table called Member which the method gets the data from

and displays details on the page about  the user.


What I want to happen is when they have logged in and are diverted to Profile.aspx,

the page URL shows www.MyWebSite/Profile/UsersName 

for example



is this possible. In my Member table I have FirstName and LastName columns or do I get the

name from the membership table.


even better would be they go straight to www.MyWebsite/JohnSmith.aspx


thank you for any help






Gridview extends past edge of div and page when editing users


I have a gridview pulling all data from one user. This gridview has an edit button and when that is clicked the gridview becomes too wide for the div/screen and I get a scroll bar. Since this gridview can only have one user in it anyway is it possible to display each field on seperate lines instead?

Page View Count And Users Online

Hello forum I have a couple of questions.  How do I go about tracking the number page views for my web page in a sql table?  Secondly, how do I track the number of users currently online? Any help will be greatly appreciated. Thanks  

"Only their own" allows users to edit, then shows access denied page

I am managing a WSS 3.0 portal.  I have created custom lists where a group has contribute permissions.  Under List Settings|Advanced Settings, when I set Edit Access to "Only their own" or "None", my test users can see the Edit Icon and the Edit Item menu option, and bring up the Edit Form.  When they click "OK", they get the Access Denied page.  My experience in that past is that they should not even been shown the option to edit, and they should get Access Denied if they somehow navigate to the EditForm.aspx page.  I even tested this on a brand new site, with three Links lists, each with different Edit Access Levels (All, None, Only their own).  I added one user with contribute permissions.  He had the same result: He could get all the way to EditForm.aspx, but got "Access Denied" when he submitted his changes.  What can I do to fix this?Christopher W. Douglas

I want 404 instead of redirecting to login page

I have implemented the standard Login control and everything works fine.However when i enter an invalid URL it gets redirected to the Login page.e.g. http://www.mywebsite.com/xxx gives a 404but http://www.mywebsite.com/xxx.aspx causes a redirect to the login pageI am using ASP.NET 3.5 on Windows Server 2008.I have set up the web.config with the following<customErrors mode="RemoteOnly" defaultRedirect="/Unauthenticated/GenericErrorPage.htm"> <error statusCode="403" redirect="/Unauthenticated/NoAccess.htm" /> <error statusCode="404" redirect="/Unauthenticated/FileNotFound.htm" /> <error statusCode="500" redirect="/Unauthenticated/FileNotFound.htm" /></customErrors>and also<httpErrors existingResponse="Replace"> <remove statusCode="403" /> <remove statusCode="404" /> <remove statusCode="500" /> <error statusCode="403" path="/Unauthenticated/NoAccess.htm" responseMode="Redirect" /> <error statusCode="404" path="/Unauthenticated/FileNotFound.htm" responseMode="Redirect" /> <error statusCode="500" path="/Unauthenticated/FileNotFound.htm" responseMode="Redirect"

Redirecting to custom page while clicking on the user/group browse button

Hi, i have created a custom visual web part in visual studio 2010 and i deployed it into sharepoint site by creating a new page in my site. The custom page gets the data of users/groups from database and pass the users to the people picker in sharepoint.Here my question i have a document library where we upload document and get the users page popup that consists of people picker and a user/group browse button.when i click on the (book image button)browse button it will redirect to the user and group search page but here i need to replace my custom  user/group search page with the default one so please help me how to redirect to the custom page by clicking on the user/group browse button,and i need to pass the selected users to the people picker text box........please give me some solution whether this can be done or not if possibe please send me the link or some sample code how to do this   thank you.

Permission Errors for Users on Home Page only of SQL Server Reporting Services Report Manager

I have spent days now investigating this problem, so any help very much appreciated! I have a remote web server 2003 running SQL Server R2 Express Edition with Reporting Services installed. I use Report Builder 3.0 locally to build report. If I login via Internet to Report Manager Web Page as an administrator I can perform all the expected and required actions, creating new folders and assigning permissions for users etc. I have added a new user "ReportUser" as a Browser of a child folder. If ReportUser longs on to home page, he receives the all too familiar error: User 'XXXXXXXX\reportuser' does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account Control (UAC) restrictions have been addressed. However, if the user starts at the child folder of home page, and then logs in, he sees the expected page, and can run the report!  This is not very satisfactory. How can I allow user to see home page, without an error message, but not be allowed to click on any folders to which he is not entitled? I am now aware that SQL Server R2 Express Edition has many limitations compared with full Editions (fixed roles, cannot manage Report Service from Management Studio etc) , and many of the "solutions" offered on the web just do not apply.   John Walton

Full Control users only able to edit Shared Version of page in MOSS 2007

Hi, In MOSS 2007 we have a site collection that does not allow the owners to edit pages. There is no broken inheritance in the permissions, and when a user clicks "Site Actions" and then "Edit" they get a toolbar saying they are only editing the Shared Version of the page. No pages are checked out to any other users either and the users attempting this (including the Farm account) are not able to edit these pages. What would be the next steps to debugging this problem as it is not one I have encountered previously?  

Redirecting to another page from an eventhandler on ItemAdding event

Hi,   I want to redirect to another page from an eventhandler on ItemAdding event. So please help me achieve in achieving this.    Thanks in Advance

Forms Authentication sending user to LoginURL on first hit of page even though page has [allow users

On the first hit, and only the first hit, to my page having [ALLOW users="*"] in the web.config, the user is redirected to the LoginUrl, but on all subsequent visits to the page, the user IS allowed access.  The user shoud ALWAYS be allowed access to this page.  I suspect it is a configuration problem, so here are snippets of my web.config... <compilation debug="false" strict="true" explicit="true" /> <trace enabled="false"/> <authentication mode="Forms"> <forms protection="All" cookieless="UseCookies" requireSSL="false" slidingExpiration="false" timeout="20" name="12345678-1234-1234-1234-123456789012" loginUrl="~/Web/Login.aspx" defaultUrl="~/Web/MyPage.aspx" enableCrossAppRedirects="false" /> <authentication> <httpCookies httpOnlyCookies="true" /> <sessionState cookieless="UseCookies" />         <location path="Web/Contact.aspx"> <system.web> <authorization> <allow users="*"/> <authorization> <system.web> <location>   Can you help me figure out why users are not ALWAYS allowed access to the /Web/Contact.aspx page? Thx!      

Redirecting to login page while accessing document from document library In FBA Authentication

Hi all,            I have FBA site. When i open document from share point document library, it takes me to login page. After i enter credentials it will open page in client application ( ex. Microsoft word, microsoft powerpoint).   Regards Milan chauhan

Extended application: how do I specify a separate landing page for Extranet users?

This is the current scenario: http://intra - Normal internal intra. http://intra.foo.fi - Accessible through the firewall. This address extends the http://intra SharePoint application. This is the extranet. I.e. both addresses links to the same location essentially. Now our customer suddenly notified that they'd like to have a separate landing page for users arriving to the http://intra.foo.fi address (extranet users). How would you proceed in making a separate landing page? 

Admin page to manage users, need help with adding roles to this layout


Currently i have a page that has the following  code / layout.. as it is now, i am only displaying the roles and they cant be edited. Since this would be the admin page to manage users, what i would like is to have the Roles display as a checkbox list that shows all our roles and have the roles that the user is assigned to checked. Can that be done, if so are there any examples or tutorials i can review?


            <asp:GridView ID="GridView1" runat="server"  AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="UserName" DataSourceID="ObjectDataSource1" AllowSorting="True" Width="80%">
                    <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" ShowSelectButton="True" />
                    <asp:CheckBoxField DataField="IsOnline" HeaderText="IsOnline" ReadOnly="True" SortExpression="IsOnline" />
                    <asp:CheckBoxField DataField="IsLockedOut" HeaderText="IsLockedOut" ReadOnly="True" SortExpression="IsLockedOut" />
                    <asp:BoundField DataField="UserName" HeaderText="UserName" ReadOnly=&quo

Redirecting Anonymous users IIS 7



I am working on an internal application... i setup IIS 7 to use windows authentication since its behind the firewall and on the domain.. there is a "public" side.. and an "internal" side... if your not part of IT.. you should get the public side.. this is just informational.. my problem is that there is 1 or two pcs that are not on the domain and nobody is logged into them.. how can i just redirect anonymous users to another site???????


everything i read says you can't use anonymous AND windows auth.. so my thought was to just redirect the anonymous users to another site.. how can you do that??  



any help is appreciated!






Permission issue - users not seeing correct master page and css


I have started playing with permission and created a whole that I can not climb out of! Any help will be great!!! Here are my issues:

1. (this one started it all) I added an approval workflow to a library with the thought that a doc would not show to the public until it is approved. Ain't happening...what do I have to do for this process to work?

2. In trying to solve the above I restricted nt auth to the visitors group and then made that group read only. Now members of the visitor group only sees the old master page and css. The only way to fix it so far is to add nt auth to the owners group. that won't fly.


In report manager is it possible to prevent users from going to the "Home" page?

I have created my own menu system and would like to prevent casual users from ever going to the home screen as it just confuses them.  Is there a way to turn off this option?

Count the number of users per web page


Hello everyone,

I have a website that has 10 aspx pages in it, and I'm trying to count how many users are on any one page at a time, and display that number on the web page.  I have set it up to use an Application object ("TotalViewers"), and initialize it to 0 in the Application_Start event handler of the global.asax file.  My reasoning (probably way off base) is to increment the count on each page load, and then decrement the count on each page unload.  The increment part works ok, but when I add the code in the page unload event handler to decrement, it seems that Unload happens before the Page is presented to the client, so the  value always stays the same (adds one in page load, subtracts one in page unload).

How else  can I track number of users on each page?  (simply, becuase I am still a beginner).  I have already done some google searching and haven't come up with anything useful. 

All my pages are being navigated via a TreeView control.

Thank you,





ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend