Using asp.net MVC 3, I would like to add a query string on every request of Controller's method, using the following code, the query string is not being added to the URL.
Any idea what I am doing wrong or any other alternative approaches?
public ActionResult Index(string uniquestudentreference)
{
return View(eventListVM);
}
public class UserAttribute : ActionFilterAttribute
{
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
filterContext.ActionParameters["uniquestudentreference"] = Various.GetGivenNameUser();
}
}