asp.net: saving js file with c# commands...
Posted
by ile
on Stack Overflow
See other posts from Stack Overflow
or by ile
Published on 2010-03-26T21:42:56Z
Indexed on
2010/03/26
21:53 UTC
Read the original article
Hit count: 314
<head runat="server">
<title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title>
<link href="../../Content/css/layout.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/Areas/CMS/Content/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="/Areas/CMS/Content/js/jquery.jeditable.js"></script>
<script type="text/javascript" src="/Areas/CMS/Content/js/jeditable.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".naslov_vijesti").editable('<%=Url.Action("UpdateSettings","Article") %>', {
submit: 'ok',
submitdata: {field: "Title"},
cancel: 'cancel',
cssclass: 'editable',
width: '99%',
placeholder: 'emtpy',
indicator: "<img src='../../Content/img/indicator.gif'/>"
});
});
</script>
</head>
This is head tag of site.master file. I would like to remove this multiline part from head and place it in jeditable.js file, which is now empty. If I do copy/paste, then <% %>
part won't be executed. In PHP I would save js file as jeditable.js.php and server would compile code that is in <?php ?>
tag. Any ideas how to solve this problem?
Thanks in advance,
Ile
© Stack Overflow or respective owner