How to add ServiceReference to an embedded file?
Posted
by TruMan1
on Stack Overflow
See other posts from Stack Overflow
or by TruMan1
Published on 2010-04-03T17:20:03Z
Indexed on
2010/04/03
17:23 UTC
Read the original article
Hit count: 292
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.
© Stack Overflow or respective owner