Wednesday, March 28, 2012

List<object> from ASP .NET to javascript

Hi,

I would like to know if it is possible to use List<object> as parameter in an AjaxExtender??

[ExtenderControlProperty]
[DefaultValue("")]
public List<object> HandlerFieldList
{
get {return GetPropertyValue<object>>("HandlerFieldList",null); }
set { SetPropertyValue<object>>("HandlerFieldList",value); }
}
<cc2:AjaxControl4WebGridExtender ID="AjaxControl4WebGridExtender1" runat="server"
TargetControlID="GenericTimeGrid1"
TargetID="GenericTimeGrid1" ServiceMethod="executeCommand" HandlerFieldList="argList">

By trying these I get the following error:

 Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Cannot create an object of type 'System.Collections.Generic.List`1[[System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' from its string representation 'argList' for the 'HandlerFieldList' property.

perhaps should I say: the argList is defined in Default.aspx.cs and field also there in Page_Load()

regards Omid

Is that linst object is in the UpdatePanel ??

Idea


no it is not... aren't there some TypeConverter for it in ASP .NET oder the Ajax Toolkit...?

I think I have to write an converter for it..

No comments:

Post a Comment