Hi,
I have some common javascript functionality that I want to share across several views/pages.
However I want to put some C#/ASP.net into the javascript - pulling in some data from the server.
It seems like the best option is to use a partial page, and include the javascript in that.
Just wondering if there is a javascript equivalent of the partial page?
Or is there another/better/alternative way of doing this?
EDIT: I realise I could use ajax to pull the server code in (although how do I refer to the server, Url.Content won't work) but this code is to handle page permissions, ie the server data details what functions the user can access and the javascript functions are then used to show/hide buttons based on that. So the data needs to be present early on rather than triggering the page to be built after the ajax callback happens.
Thanks in advance, Chris