.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

Login Redirection

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


i have creaated my own login control and my site have many pages many of pages are public to anyone but when they try to enter some section or try to send sms they be redirect to login page

my problem now after tey redirect to login page  and enter login info they redirect back to Default.aspx not the previous page they want to enter


user request page named  Page1.aspx  /page one user have to be registered so he will redirect to Login.aspx

user will enter sign in info   so he will redirect to Default.aspx /that's my problem

cause what i want to do ,that user will redirect back to Page1.aspx

how can i do this

help please


View Complete Post

More Related Resource Links

Automatic Redirection the user to sharepoint page after domain login



I have created some reports on report viewer webpart and have placed them on A,B,C aspx pages now i want to redirect the Users A,B,C to their specfic aspx pages A,B,C as applicable... after they are logged on sharepoint site through Domain Credentials.

Is it possible?



httpmodule current response redirection , without login prompt


I have wrote a small httpmodule ,which on certain type of user requests get files from my server. to implement this i used 

HttpContext.Current.Response.Redirect("my url here ", false); 

Its working pretty fine. only problem is that files on my server are under tomcat security. so when in execution , the code ask for username and password.

Is there a way to supress the login box and send authentication parameters programatically?


Login Control , LoginView, Page Redirection


Hi and thanx for giving your time.

I have Default.aspx page with Login control.


protected void Login2_Authenticate(object sender, System.Web.UI.WebControls.AuthenticateEventArgs e)
            //verify that the username/password is valid
            if (Membership.ValidateUser(Login2.UserName, Login2.Password))

                if (Roles.IsUserInRole(Login2.UserName, "Administrator"))

I thought this would be simple... Trying to create a login does an ajax check before submit


I have the standard .net login control that is working.  (Still learning .net after 15yrs of classic)

What I want to do is OnButtonClick run a javascript function (to do an ajax call to the db to check if login is valid or not) and if it returns true, then submit the form normally, else don't submit. The piece that I can't figure out, is how to correctly override the default click even to hit my JS routine and then submit the form properly afterwards.

Thanks ahead of time

How to modify the login control



I'd like to record more information than the default control allows as well as perform actions with the input when the form is submitted but I'm having trouble figuring out how.

So firstly, if I want to record the middlename for example, how would I do that, and by default, where would it go if anywhere?
When the form is submitted, I'd like to take specific input, such as just the middlename for example, and write some linq to sql code to specify when and how it's stored.
In what event would I put this code?


create user wizard login error message dont show in a message box?




i am using create user wizard and capturing other information within content template when a new user

registers. Some of the textboxes are binded to required field validators.


there is a validation control on the page and ShowMessage box is True.

If they dont complete some of the text boxes then the message box pops Up with the error message.

It does not however include information errors like "User already exists" or Email address already exists

from the create user wizard membership  UserName and Password Textboxes


is it possilbe to hook all of these up so I get one message box with all errors including membership ones?




Using network login



Is anyone have sample code to set up log in page using network login?

For example: User Name(same as Network Login)

                     Password(Same as Network Login)

Your help is highly appreciated.



Hi All

VS2005, .Net 2.5

i have been building a website and testing it in google chrome, which has been working fine.

i am now testing it in IE and firefox and the asp:login doesnt work, it doesnt even post back when i click the 'login' button.

anyone and idea what might be going on? im not sure where to start, as i mentioned above the login works fine using google chrome.


Visual Web Developer 2010 Express "Copy Web Site" using different login


I created a site and am trying to grant another pesron access to upload changes to it without giving them my super-user login.

I made a login for her but I can't test whether it works or not because no matter how much I "disconnect" in the Copy Web Site page of VWD 2010, reconnecting to the same site always logs in as my superuser account without prompting me for a login again.

How do I test is the account it set up correctly before having her try to upload to it?    I want to force the login to remote site dialog to pop up again to test her account.

Any ideas?

Mobile detection and redirection


Hi all,


I want to check with you what things to add  to implement a mobile browser and then redirect it to other site.

Do I have to add Browsercap in the web.config?

also I want you to help me with this script that i coded (not a programmer):

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class _Default : System.Web.UI.Page
    // SqlConnection con;
    protected void Page_Load(object sender, EventArgs e)

        if (Request.Browser.Browser == "AppleWebKIt" )

Login Adpater


I am having problems getting the adpaters to work.  The Whitepaper references a vsi to install but the link to download does not contain the vsi - just source for the CSSFriendly kit.  The kit is missing the css/import.css file also.

Anyway, I fumbled around and was able to get the menu working but I cannot figure out how to specify the css class for the login control.  With the CSSFriendlyAdparters.browser file in my project, I lost all styles and most of the features of the login control.  The menu uses cssselectorclass but I tried that server tag on the <asp:login> and it did not work.  The original cssclass attribute does not seem to do anything either.

Can someone point to some documentation on how to use these tags and integrate with the CSSFriendly.dll adpaters.

Thank you,


Desktop Security: Create Custom Login Experiences With Credential Providers For Windows Vista


Why is a change to the Windows logon plug-in interface so exciting? Because with credential providers you can customize the logon experience for your users.

Dan Griffin

MSDN Magazine January 2007

HTTP Pipelines: Securely Implement Request Processing, Filtering, and Content Redirection with HTTP


ASP.NET is a flexible and extensible framework for server-side HTTP programming. While most people think of ASP.NET in terms of pages served, there is a lower-level infrastructure sitting beneath this page model. The underlying plumbing is based on a pipeline of app, module, and handler objects. Understanding how this pipeline works is key if you want to get the most out of ASP.NET as an HTTP server platform, while making your process more efficient, and keeping your server secure. This article introduces the architecture of the pipeline and shows how you can use it to add sophisticated functionality to an ASP.NET-based app.

Tim Ewald and Keith Brown

MSDN Magazine September 2002

New Directions in Redirection: Microsoft Internet Information Services 5.0 Provides Two New Methods


Internet Information Services (IIS) 5.0 provides several enhancements to its support for ASP-based Web development, including two new server-side redirection methods: Server.Transfer and Server.Execute. Rather than redirecting requests with a round-trip to the client, these new methods can be used to transfer requests directly to an ASP file without ever leaving the server. While this functionality doesn't replace the Response.Redirect method used by IIS 4.0, you can take advantage of it to implement better application flow control mechanisms and to handle errors more efficiently. The different redirection options are described, along with some tips and tricks for implementing them on your own site.

Ram Papatla

MSDN Magazine April 2000

Login page for whole site


Hi all,


I've been searching and trying to get this now for hours, so i though i'd come here.

For my website, there will be an admin site. I want to create users in my website database, i have a logins table with a hashed password column. The problem i have is making sure that every request if not already logged in send the user to the login page.


I have a page Login.aspx which i have created, but if i enter http://website/admin/news.aspx it bypasses the login screen and shows the page!!


Does anyone know how i can do this? i have created Login.aspx myself and verified that the username and password enetered are correct.




I want to create registration page and login page


I have design form layouts for signup and login pages 

Please provide me the step by step code for sign up and login pages using c# with validation.

waiting for urgent reply

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