I am listing all members on one page and needing to link any of the individual members to their own page that shows all of the data relevant to that specific member.
I have listed all the members, but I don't know how to pass the data from one page to another with a link. Can it be done?
@foreach (var member in ApplicationContext.Current.Services.MemberService.GetAllMembers())
{ //lists all members
@member.Name
@member.Email
@member.GetValue("bio") //Or any custom member field
var address = "JobApplicants?" + member.Id;
<a href="@address">@member.Name</a>
}
Then the second template:
@{var Id = Request.RawUrl; //Gets value from url
var tempID = Id.Split('?').Last(); //splits unnecessary characters
int memberID = tempID.AsInt(); //change to int because string won't work in argument
var member = ApplicationContext.Current.Services.MemberService.GetById(memberID);
@member.Name
@member.Email
@member.GetValue("bio") //Or any custom member property
}
This will allow it to dynamically list the member information.
Pass member Id from one page to another
I am listing all members on one page and needing to link any of the individual members to their own page that shows all of the data relevant to that specific member.
I have listed all the members, but I don't know how to pass the data from one page to another with a link. Can it be done?
Solved.
Then the second template:
This will allow it to dynamically list the member information.
is working on a reply...