Solved

How do I open a view in a new window with Html.ActionLink?

Posted on 2010-08-27
2
5,372 Views
Last Modified: 2013-11-08
I have a View that I would like to open in a new window.

I have created a new simple strongly-typed view that that displays a list of simple object properties that does not use a master page.

How would I create an Html.Actionlink that opens this view from the site master in a new window?

This code simply opens a new instance of the website in a new window:

 <%: Html.ActionLink("Currently Loaded Data", "Index", "WorkloadReport", New With{ .target="_blank"} )%>

Open in new window


Also, could someone recommend a good MVC 2 reference with good examples?
0
Comment
Question by:MDKIMZEY
2 Comments
 
LVL 30

Accepted Solution

by:
MlandaT earned 500 total points
ID: 33548520
<%=Html.ActionLink("Currently Loaded Data", "Index", "WorkloadReport", new { Id = model.Id.ToString() }, new { target="_blank" })%>
0
 

Author Closing Comment

by:MDKIMZEY
ID: 33558194
Spot on! Thank you!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question