You could write a generic handler:
public class CustomJsHandler : System.Web.IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/javascript";
context.Response.Write("alert('Hello world');");
}
public bool IsReusable
{
get
{
return true;
}
}
}
and then specify the address of this handler:
<script type="text/javascript" src="/customjshandler.ashx"></script>
Darin Dimitrov
2010-06-30 18:38:03