Building an Action Link to another Area

I"m trying to build an Action Link to another Area.  The link I have is:

 @Html.ActionLink(Model[i].ID, "Details", "Orders", new { Area = "Order" }, new { id = Model[i].ID }, new
                           @target = "_blank"

Open in new window

I"m getting errors. Is this the correct way to build an Action Link to another Area?  The Link works correctly within the Order Area.
Crystal RouseTask LeadAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kaufmed   (⌐■_■)Shot Through the Heart, and You're to Blame, You Give vars a Bad NameCommented:
That's mostly correct. Your fourth parameter dictates any route parameters (e.g. area name) that should be evaluated when materializing the appropriate URL from a route definition. I believe your last two parameters are in error, though. The last parameter should be an object whose properties contain the names and values of any HTML attributes you want to include on the generated <a> tag. You've passed two different objects as two different parameters; these should just be one object with two properties:

@Html.ActionLink(Model[i].ID, "Details", "Orders", new { Area = "Order" }, new { id = Model[i].ID, @target = "_blank" })

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Crystal RouseTask LeadAuthor Commented:
Thanks! That worked!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.