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 466417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:28:36+00:00 2026-05-12T23:28:36+00:00

Asp.net Mvc1 On my Views/home/Index.aspx which routes from http://localhost/DefectSeverityAssessmentMvcBeta/ This renders Response.Write(<a href=\); Response.Write(Url.Action(Create,

  • 0

Asp.net Mvc1
On my Views/home/Index.aspx which routes from http://localhost/DefectSeverityAssessmentMvcBeta/

This renders

  Response.Write("<a href=\"");
  Response.Write(Url.Action("Create", "Registration"));
  Response.Write("\">Begin Registration</a>");

But returns a 404 for the address of the link http://localhost/DefectSeverityAssessmentMvcBeta/Registration/Create

while this Does not render or show in view source but doesn’t cause any exception:

Html.ActionLink("Begin Registration", "Create", "Registration");

I have a RegistrationController and a /Views/Registration/Create.aspx
The registration controller has breakpoints on Index() and Create() but they are not being hit.

I’m not sure how I would use <%= %> in this scenario because it’s inside the following code block:

<% if (ViewData.ContainsKey("user"))
     {
         if (ViewData.ContainsKey("registered") && (bool)ViewData["registered"] == true)
         {
             //Html.RouteLink("Resume Assessment", "Assessment", new { controller = "Assessment", action = "Index" });
             Response.Write("<a href=\"");
             // Html.ActionLink("Resume Assessment", "Index", "Assessment");

             Response.Write("\">Resume Assessment</a>");
         }
         else
         {
             //Html.RouteLink("Begin", "Registration", new { controller = "Registration", action = "Edit" });
             // Html.ActionLink("Begin Registration", "Create", "Registration");
             Html.RouteLink("Begin", "Default", new { controller = "Registration", action = "Edit" });
             //Response.Write("<a href=\"");

             //Response.Write(Url.Action("Create", "Registration"));
             //Response.Write("\">Begin Registration</a>");
         }


     }
     else
     { Response.Write("Authentication failed"); }
             %>
  • 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-12T23:28:36+00:00Added an answer on May 12, 2026 at 11:28 pm

    Are you using <% %> in the HTML for both Response.Write and Html.ActionLink? Try using <%= %> for Html.ActionLink(…);

    The added equal sign calls Response.Write behind the scenes thus writing you code to the screen.

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

Sidebar

Related Questions

I was reading http://weblogs.asp.net/scottgu/archive/2009/01/27/asp-net-mvc-1-0-release-candidate-now-available.aspx and noticed a Fantastic color scheme used to illustrate their
Checking out the sample code from http://lukesampson.com/post/471548689/entering-and-exiting-https-with-asp-net-mvc written for ASP.NET MVC2, I noticed they
ASP.NET MVC has been discussed on this forum a few times. I'm about to
ASP.NET server-side controls postback to their own page. This makes cases where you want
ASP.NET 1.1 - I have a DataGrid on an ASPX page that is databound
ASP.Net 3.5 running under IIS 7 doesn't seem to allow this out of the
ASP.NET MVC routes have names when mapped: routes.MapRoute( Debug, // Route name -- how
This is a beginner level question for asp.net MVC I have the following code
ASP.NET MVC treats dot character as a literal for routes for a long time
I am doing [this tutorial][1] over at www.asp.net. It is written for ASP.NET MVC

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.