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

  • SEARCH
  • Home
  • 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 190763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:17:02+00:00 2026-05-11T16:17:02+00:00

I have an URL: /Account.aspx/Confirm/34a1418b-4ff3-4237-9c0b-9d0235909d76 and a form: <% using (Html.BeginForm()) { %> <fieldset>

  • 0

I have an URL:

/Account.aspx/Confirm/34a1418b-4ff3-4237-9c0b-9d0235909d76

and a form:

<% using (Html.BeginForm())
   { %>
    <fieldset>
        <p>
            <label for="password" class="instructions">
                Contraseña:</label>
            <%= Html.Password("password") %>
            <%= Html.ValidationMessage("password", "*") %>
        </p>
        <p>
            <input type="submit" value="Validar" />
        </p>
    </fieldset>
<% } %>

In the controller’s action:

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Confirm(string id, string password)
{
    //code
}

I want to obtain the value of the GUID in the URL (the part after Confirm) and the value of the input password.

How can I do that?

EDIT:

I have registered this routes:

public static void RegisterRoutes(RouteCollection routes)
{
    routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
    routes.IgnoreRoute("Error.aspx/{*pathInfo}");
    routes.IgnoreRoute("Admin/{*pathInfo}");
    routes.MapRoute(
        "Default",
        "{controller}.aspx/{action}/{id}",
        new { controller = "Home", action = "Index", id = "" } 
    );
    routes.MapRoute("Root", "", 
            new { controller = "Home", action = "Index", id = "" });
}

I think anything is odd, but in the id parameter of the Confirm action I’m getting an empty string.

  • 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-05-11T16:17:02+00:00Added an answer on May 11, 2026 at 4:17 pm

    Isn’t this because you are POSTING your form that doesnt have the ID inside the form?

    What you could do is on your Form page set the Model as the ID passed in then assign a hidden input value to this ID…

    <%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" 
    Inherits="System.Web.Mvc.ViewPage<string>" %>
    
    public ActionResult Confirm(string id)
    {
       return View(id);
    }
    

    Now the ViewData.Model will contain your ID. Put this inside your form.

    <input type="hidden" id="id" name="id" value="<%= ViewData.Model %>" />
    

    Then when your form is submitted it will pass the ID through.

    [AcceptVerbs(HttpVerbs.Post)]
    public ActionResult Confirm(string id, string password)
    {
       //...now you have access to ID and password
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a URL like: http://url.test.com/account/name/pages/Stuff.html I want to take 'Stuff' and apply that
I have a Django project using https for certain part of the url (/account/,
I have these two URL's I want to make available to my users: /Account/Orders
& is a reserved character in html therefore everywhere I have url's pointing to
I'm using asp.net with url rewrite . Inside Page Load I have the following
Fellow Coders, so far I have been using the CI url helper to build
I have a View class (OrderView.aspx) which shows the details of an order (Account
I have a sandbox account for paypal for trial purpose An aspx page:sampleprocess.aspx In
I have URL like: http://example.com#something , how do I remove #something , without causing
I have URL scheme for my blog like this: http://www.example.com/%YEAR%/%MONTH%/%CATEGORY%/%POST_TITLE%/ Now i want to

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.