i am using a actionlink in master page of user module.i want to pass the eventid of the current url(in all views) to the actionlink as a route value.But i use the following code,
<%=Html.ActionLink("Create Account", "UserRegistration",
      new { eventid = ViewContext.RouteData.Values["id"] })%>
But it doesnot retrieve the id fom the url.
my url is in following formate,
htt开发者_如何学JAVAp://localhost:12905/User/User/Order?eventID=2
here eventID=2 is common for all views.So i want to send this eventID to the actionlink as route value. Thanks in advance,
Shouldn't that be "eventId" instead of "id" in the ActionLink:
<%= Html.ActionLink(... ViewContext.RouteData.Values["eventId"] })%>
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论