tags:

views:

78

answers:

1

I need to pass a querystring back on response - so that via means of jQuery I can do something with it.

something like this: return RedirectToAction("LogOn", "Account", new { id = "?action=update" });

URL needs to end up like: ../Account/LogOn/?action=update

but the above code produces this instead: ../Account/LogOn/%3faction%3dupdate

I don't want the encoding...

Help?

+3  A: 

I think, in this case, you should use

return RedirectToAction("About", "Home", new { sendto = "update" });

You can't use the keyword "action" because it will be consumed by mvc, so I've replaced it with "sendto" instead.

BuildStarted
that works, thanks
Mark
Regarding the action keyword, maybe @action = "update" would work? @ seems to be used to escape keywords, like @class.
Pawel Krakowiak
In this case it's not the same thing action is a special keyword used by MVC to handle routing information whereas class is a special keyword used by c# - which is why the need to escape it.
BuildStarted