Click here to Skip to main content
16,006,845 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hey Friends,

I'm trying to add a link to a page that is in a different area, and pass along an object. The area I'm trying to go to is "" (root). My current actionLink structure creates the correct URL with the exception that the base is wrong (need to remove the leading current area)

URL with link:
http://soemthing.com/manager/tickets/details/1234
Link needs to point here:
http://something.com/TransactionMonitor/TicketsByDay?Defaul...

Here is the code:
C#
@Html.ActionLink("Details", "TicketsByDay", "TransactionMonitor", new GetTicketsByDayRequest { StoreId = @Model.Id, EndDate = @Model.EndDate, StartDate = @Model.StartDate }, null) 


TransactionMonitor controller is in the root, but the page with the link is in an area 'Manager'
Posted
Updated 24-Sep-13 11:24am
v2

1 solution

this always happens....i spend 3 hours wrecking my brain and as soon as i ask for help I find the answer...

@Html.ActionLink("Details", "TicketsByDay", "TransactionMonitor", new  {area = "", StoreId = @Model.Id, EndDate = @Model.EndDate, StartDate = @Model.StartDate }, null) 
 
Share this answer
 
Comments
Richard C Bishop 24-Sep-13 17:35pm    
Good work, so from now on, just ask your question first and viola!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900