'Force the button to call a function in ASP.NET Core
I am new to ASP.NET Core.
I have saved some prices of products in my website, but prices must be changed regularly and I have to change all of them by click on a button which calls the function to do mathematical calculating.
How can I force the button to call function in view of my controller?
Solution 1:[1]
You can usually call on Page Load with something like this
var page = new Page();
//possibly do something with page
page.PageLoad(new object(), EventArgs.Empty);
//possibly do more stuff with page
Or even
ClientScript.RegisterStartupScript(GetType(), "hiya", "alert('hi!')", true);
See http://msdn.microsoft.com/en-us/library/asz8zsxy.aspx for more info
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | TrixRahbit |
