I'm very new to .net C# but I wound to get the id I put in the url. In my project details I put a link to create member. but now the users have to select that previous project Id with an combo box. I wound this to be auto.
In my project/details
@Html.ActionLink("Add member", "Create", "ProjectMember", new { id=Model.ProjectID }, null)
Result => ProjectMember/Create/1 (=id from project)
I want to get the ID so wen I create a new projectmember the user does not have to select the id from project from the dropbox that was auto generated in the create view
I looked some things up and came with this answer
<%=Url.RequestContext.RouteData.Values["id"]%>
but when i post this in the It came out the view exactly like <%=Url.RequestContext.RouteData.Values["id"]%>