Solved

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

Posted on 2010-08-27
2
5,191 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

895 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now