Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Recently I spent hours debugging an issue in a Rails project where ActiveRecord was causing MySQL errors trying to create a User object of a class at the top level of a Single Table Inheritance model structure.  It turns out `.create` behaves differ…
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 video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

809 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