Can someone tell me why I get the null value for activationLink variable in the following code:
public ActionResult Activate(string activationLink)
{
if(string.IsNullOrEmpty(activationLinkROWGUID)) return View("ActivateClientError");
if (linkROWGUID != Guid.Empty)
{
return new CServerFacadeFactory().GetServerFacade.ActivateOperator(activationLinkROWGUID) ? View("ActivateClient") : View("ActivateClientError");
}
return View("ActivateClientError");
}
the link which I use is as follows : http://localhost/ActivateClient/Activate/xxxActivationLink
If you are using the default route, it expects to map the last value in the url to a parameter named
idnotactivationLink. Either change your parameter name toidor change your routing set up to add a route that maps the value onto the correct parameter name. Changing the name of the parameter is, of course, easier.