I'm trying to pass Username and Password using @Url.Action method but it's only passing one parameter and the second one is null. I've tried all alternatives with no success. I've also tried to pass an object of the class type with no success. This is a short sample code:
string User = ViewBag.Username;
string Pass = ViewBag.Pass;
case "CHANGE_NEXT_LOGON":
<script type="text/javascript">
BootstrapDialog.show({
title: 'Change Password',
message: $('<div></div>').load('@Url.Action("PasswordChange", "UserPassword", new { Username = User, Password = Pass})'),
type: BootstrapDialog.TYPE_PRIMARY
});
</script>
break;
I'm using a boostrap dialog plugin to generate modal popups for validation. But unlike the RedirectToAction
Method, the @Url.Action
method doesn't seem to work the same way. Can someone give me a hand?
thanks!