May 07, 2010, 7:01 PM
[CLOSED] ToScript() requires HttpContext
I'm calling a WCF service with an Ajax request. Inside the service I'm generating a window with a formPanel and some custom fields, then calling ToScript() and returning the script to the client.
One of my the Fields is a TriggerField, and when I call ToScript(), the following code fails because there is no HttpContext to get the ResourceManager from.
Please tell me there is a way around this?
protected static void RegisterTriggerIcon(TriggerIcon icon, bool force)
{
if (icon == TriggerIcon.Combo ||
icon == TriggerIcon.Clear ||
icon == TriggerIcon.Date ||
icon == TriggerIcon.Search)
{
return;
}
ResourceManager rm = ResourceManager.GetInstance(HttpContext.Current);
.
.
.
}