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

How to get the selected value of a RadSlider using Request.Form?

1 Answer 133 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pooya
Top achievements
Rank 1
Pooya asked on 13 Jun 2011, 11:31 AM
How could I get the selected value of a RadSlider using Request.Form?

Request.Form.Get("MainContent_RadSlider_Ticks_ClientState")

returns:

{"value":2,"selectionStart":2,"selectionEnd":0,"isSelectionRangeEnabled":false,"orientation":0,"smallChange":1,"largeChange":1,"trackMouseWheel":true,"showDragHandle":true,"showDecreaseHandle":true,"showIncreaseHandle":true,"width":"150px","height":"40px","animationDuration":50,"minimumValue":1,"maximumValue":7,"trackPosition":2,"liveDrag":true,"dragText":"Drag","thumbsInteractionMode":1}

What is the name "MainContent_RadSlider_Ticks_ClientState" and how quickly could I get the selected value which is 2 here?

Thanks,

1 Answer, 1 is accepted

Sort by
0
Pooya
Top achievements
Rank 1
answered on 13 Jun 2011, 11:48 AM
found it, it has to be deserized:

          public static decimal ExtractRadSliderValue(HttpRequest request, string radSliderClientId)
        {
            var clientStateString = ExtractStringValue(request, radSliderClientId + PostfixForRadControlId);
            var clientState = new JavaScriptSerializer().Deserialize<RadSlider>(clientStateString);
            return clientState.Value;
        }

Tags
Grid
Asked by
Pooya
Top achievements
Rank 1
Answers by
Pooya
Top achievements
Rank 1
Share this question
or