I’m new to using Razor and ASP.NET.
I currently have a site I’m trying to port over that heavily uses Javascript functions to manuipulate items on a HTML page.
Is it possible to use Razor syntax instead? How do you get DIV and other elements on a page? I’m using ASP.NET Web Pages.
Thanks for any help.
No, Razor cannot easily replace heavy use of javascript (i.e. a web based app) without a complete rewrite of the Html app moving functionality from the client side to the server side.
You are probably best to learn javascript or determine what the underlying requirements were and re-write in Razor.
Potentially replacing javascript with tidier javascript might help, if you look at the likes of Knockoutjs and Jquery Templates maybe that might ease your pain.