Skip to content
Advertisement

Tag: asp.net-core

Passing Object from ASP.Net to javascript

I have an ASP.Net Core application. I have a Class with some attributes: and in PageModel of Index.cshtml, I am creating on object of that class and setting it is a property: Now, in my Index.cshtml, I have some default html and then I add a script like this: <script type=”module” src=”~/built/script.js”></script> Finally, my question: I need the data that

ASP.Net Core app/JS validation: prompt user to update form, or exit page

I have an ASP.Net Core/Razor app with a simple form: I’m using the built-in client-side validation for things like <input …required> or <input type=”number” min=”0″ …> (Microsoft includes jQuery validation in their MSVS project templates). That all works fine. I’m also doing some additional, custom validation on certain fields. I’d like to give the user the option to either re-do

Advertisement