This is a migrated thread and some comments may be shown as answers.

hidden filed value not updated on server side if chnaged by javascript

5 Answers 498 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
mahesh
Top achievements
Rank 1
mahesh asked on 25 Aug 2008, 02:45 PM
I am trying to change hidden field value on "OnResponseStart" method which is subscribe as a "OnRequestStart" client event of "RadAjaxManager"


<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
      <ClientEvents OnResponseEnd="OnResponseEnd" OnRequestStart="OnResponseStart" />
      <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="cmdOK">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="radGridAttribute" />
          </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="ddlSelectWorkflow">
          <UpdatedControls>
            <telerik:AjaxUpdatedControl ControlID="ddlWorkflowVersion" />
            <telerik:AjaxUpdatedControl ControlID="gviewTask" />
            <telerik:AjaxUpdatedControl ControlID="gviewAttributes" />
            <telerik:AjaxUpdatedControl ControlID="dlistColumn" />
          </UpdatedControls>
        </telerik:AjaxSetting>
      </AjaxSettings>
    </telerik:RadAjaxManager>

Once i am tying to get value of hidden filed on the "cmdOK" click it does not updated, event through response.request.

Please help
Thanks in Advance
~Mahesh


5 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 26 Aug 2008, 08:56 AM
Hello mahesh,

Could you please elaborate a little bit more - what is the exact functionality you need to achieve?
Also please note that you could not add initially invisible controls into the RadAjaxManager settings. Better approach is to wrap those controls with always visible containers (for ex. asp Panel) and add these containers to the RadAjaxManager settings.
Also please test to set "display:none" for the control instead of visible= "false"

Kind regards,
Maria Ilieva
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
mahesh
Top achievements
Rank 1
answered on 26 Aug 2008, 09:31 AM
Hi,
       I am trying to archive to read value of hidden field which is changed by JavaScript in "OnRequestStart" method of "RadAjaxManager". Value is updated in JavaScript (I tested this by alert method of JavaScript), but not able to get new updated value on server side (which fires on button click)  instead geting old value.

Regards,
Mahesh
0
John Colbert
Top achievements
Rank 1
answered on 03 Sep 2008, 10:29 PM
I am having a similar issue. I am using RadAjaxManager on master page and loading a user control that includes a hidden field. When the user selects an image i track the selection using a hidden field. However, on a callback the hidden field does not have selected image id on server side but does have valid image id on client side. The ajax callback is not transferring the hidden field value along with the callback. Why not?
0
Sebastian
Telerik team
answered on 04 Sep 2008, 06:57 AM
Hi John,

Basically, the hidden field value should be accessible on the server if you reference the corresponding hidden control and fetch its Value property. Alternatively, you may consider accessing the hidden field on the client and invoke the ajaxRequest(args) method of RadAjaxManager (passing the hidden field value through the args) in order to retrieve it server-side.

Best regards,
Stephen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Bill O'Neil
Top achievements
Rank 1
answered on 14 May 2009, 12:01 PM
sorry - posted in the wrong thread.
Tags
Ajax
Asked by
mahesh
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
mahesh
Top achievements
Rank 1
John Colbert
Top achievements
Rank 1
Sebastian
Telerik team
Bill O'Neil
Top achievements
Rank 1
Share this question
or