Indi
Indi

Reputation: 191

How I redirect with link in asp.net mvc?

i used one link in my asp.net mvc project like this way.

 <a 
href="<%= Url.Action("DisplayAction", "TempController") %>" title="Display" 
/>               

it works properly in calling controller.But,i want to call normal aspx in that way.

For eg,

 <a href="<%= Response.Redirect "WebForm.aspx" %>" title="Display" />  

Please give me right ways.

Regards

Indi

Upvotes: 1

Views: 2736

Answers (2)

Mr. Munoz
Mr. Munoz

Reputation: 69

For MVC5, this one worked for me:

<a href="@Url.Action("AboutUs","OASiteContent")" type="submit" class="lnkbtn lnkbtn_2 Rectangle">I'm new here</a>

Upvotes: 0

djdd87
djdd87

Reputation: 68506

If you just want to navigate to a normal page the standard way from HTML, you just set the href of the anchor attribute:

<a href="WebForm.aspx" title="Display">Link Text</a> 

Upvotes: 4

Related Questions