How to add ServiceReference to an embedded file?
- by TruMan1
I have a class library. In one of the classes, I am adding a script reference on the page like this:
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
if (this.Page != null)
{
ScriptManager sm = ScriptManager.GetCurrent(this.Page);
ServiceReference reference = new ServiceReference("~/Sitefinity/Admin/Services/ContactsService.asmx");
reference.InlineScript = true;
sm.Services.Add(reference);
}
}
For the ServiceReference file path, is there a way to add an embedded file instead? I want to keep everything self-contained in my class library instead of dropping a file into the website folder.