Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8790627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:42:26+00:00 2026-06-13T22:42:26+00:00

I have the following LogOn Action [HttpPost] public ActionResult LogOn(LogOnModel user, string returnUrl) {

  • 0

I have the following LogOn Action
[HttpPost]

     public ActionResult LogOn(LogOnModel user, string returnUrl)
        {
  if (!String.IsNullOrEmpty(returnUrl))
                                {
                    return Redirect(returnUrl);
                }
                else
                {
                    return RedirectToAction("Index", "Home");
                }
}

In which My returnUrl is null..
Can any body tell me .Why my return URL is null

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:42:27+00:00Added an answer on June 13, 2026 at 10:42 pm

    That’s depends how you call the controller action method.

    1. If you have an URL like below
      http://www.somedomain.com/LogOn/LogOn?returnUrl=user/userList

      In this call, your returnUrl parameter of an ActionMethod (LogOn will be replaced by querystring parameter returnUrl.

    2. If you’re using form authentication, there is an [Authorize] attribute which validated the authentication. If user is NOT authenticated, then it will redirect to the LogIn page with the querystring parameter returnUrl which will have a requested page url in it.

    At this moment, you will also get returnUrl value in controller’s action method parameter with returnUrl paramter with value which will have requested page Url

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following Action Method that I'm trying to redirect from if the
I have the following fom: form id=login_form class=fancy_form action=@Url.Action(Logon, Account) method=POST> <div class=bl_label> Eneter
I'm playing with ASP.NET Web API and I have the following: public Guid GetLogon(string
I have the following razor code: <form id=logon action=/security/dev method=get> @Html.AntiForgeryToken() @Html.EditorFor(x => x.UserName)
I have the following code: <?php echo $form->create('User', array('url' => array('controller' => 'users', 'action'
I have following Url: customer/login?ReturnUrl=home How can I get this string in my view?
I have the following rule in my current .htaccess file to redirect /videos/login/ requests
I have the following two interfaces: public interface IMembershipProvider { object Login(ILoginProviderParameters loginParameters); void
I have following plist: <?xml version=1.0 encoding=UTF-8?> <!DOCTYPE plist PUBLIC -//Apple//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd>
I have the following scenario: - App loads, an intitial password logon screen appears.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.