Feb 15, 2017, 2:49 PM
[CLOSED] Pass parameter to ashx page
Hello,
I want to pass the value of a hidden field (hdnclientid) to an ashx page which I call from store:
Markup:
I want to pass the value of a hidden field (hdnclientid) to an ashx page which I call from store:
Markup:
<ext:Hidden ID="hdnclientid" runat="server" />
<ext:ComboBox ID="CmbInvestAdd" runat="server"
DisplayField="FullName"
ValueField="id"
TypeAhead="true"
FieldLabel="Investigator"
Width="470" MaxLength="150"
PageSize="10" AllowBlank="false"
LabelWidth="130" ForceSelection="true"
HideTrigger="true"
MinChars="0"
TriggerAction="Query">
<ListConfig LoadingText="Searching...">
<ItemTpl ID="ItemTpl6" runat="server">
<Html>
<div class="search-item">
<h3>{LastName} {FirstName}</h3>
{Speciality1}, {Address} - {City}   {Phone}
</div>
</html>
</ItemTpl>
</ListConfig>
<Store>
<ext:Store ID="Store7" runat="server" AutoLoad="false" >
<Proxy>
<ext:AjaxProxy Url="~/SearchControls/DoctorSearch.ashx">
<ActionMethods Read="POST" />
<Reader>
<ext:JsonReader RootProperty="Doc" TotalProperty="total" />
</Reader>
<ExtraParams>
<ext:Parameter Name="clientid" Value="#{hdnclientid}.getValue()" Mode="Raw"/>
</ExtraParams>
</ext:AjaxProxy>
</Proxy>
ASHX filepublic void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/json";
var clientid = context.Request["clientid"];
But I receive this js error:
Uncaught TypeError: Cannot read property 'getValue' of undefined
Last edited by fabricio.murta; Mar 10, 2017 at 5:28 PM.