ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
How to pass url action in onclick method of awesome button
Title:
B
I
{code}
?
I am trying to navigate to a controller action from a button click for which I am trying the code below: @Html.Awe().Button().Text("Unlock Account").OnClick("href=" + @Url.Action("UnlockUserAccount", "Users", new { UserID = Model.UserID }) + "") But this code is not navigating to the controller action and in the chrome console I am getting an error: - Uncaught SyntaxError: Invalid regular expression flags
Save Changes
Cancel
SalesARM
asked at 18 Jun 2020
I got it working like this below: .OnClick("location.href='@Url.Action("UnlockUserAccount", "Users", new { UserID = Model.UserID })'")
at 18 Jun 2020
SalesARM
Answers
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK