I have a ASP.NET WebSite and a custom control (lets call it myControl) on it. I need to call a method on this control with AJAX. I'm posting ajax call from JavaScript (jQuery) to C# WebMethod. This works fine, but I can't get to myControl in a static WebMethod. Any ideas how to solve this problem?
Short version: AJAX call from JS to C# WebMethod works -> * here (in this method) I need to call a method on my custom control which is inaccessible because of static method type *
[WebMethod]
public static List<CustomListControl.IListItem> GetListItems()
{
// CAN'T GET TO MY CONTROL - need to return myContorl.Items;
return null;
}