Mar 25, 2015, 9:02 AM
[CLOSED] Pass array to web service
Hi,
I am calling a web service from an aspx page using the following code.
Web service:
I tried different options but no luck so far. Can you please advice?
Thanks
I am calling a web service from an aspx page using the following code.
<Store>
<ext:Store ID="Store1" runat="server">
<Proxy>
<ext:AjaxProxy Url="~/Services/Search.asmx/Search" Json="true">
<Headers>
<ext:Parameter Name="Content-Type" Value="application/json" Mode="Value" />
</Headers>
</ext:AjaxProxy>
</Proxy>
<Parameters>
<ext:StoreParameter Name="Id" Value="Ext.getCmp('txtId').getValue()" Mode="Value" />
<ext:StoreParameter Name="type" Value="['S']" Mode="Raw" />
</Parameters>
</ext:Store>
</Store>
Web service:
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json, XmlSerializeString = false)]
public ExtJsGrid<SearchResultsViewModel> Search
(
int start, string limit, string sort,
string Id, string[] type
)
{
}
I want to change type parameter to dynamically get the value from a code behind type (e.g. <%=type%>) instead of hard coding it as ['S']. I tried different options but no luck so far. Can you please advice?
Thanks
Last edited by Daniil; Mar 25, 2015 at 1:32 PM.
Reason: [CLOSED]