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

getting slider value post to different page

2 Answers 28 Views
Slider
This is a migrated thread and some comments may be shown as answers.
andy
Top achievements
Rank 1
andy asked on 18 Mar 2013, 11:10 AM
Hi,

I have a slider on one page which then gets posted to another page.  The problem with what I'm doing below is that the items collection isn't passed in client state.  

What is the correct way to get the slider value?

          
NameValueCollection nvc = Request.Form;
RadSlider rs1 = new JavaScriptSerializer().Deserialize<RadSlider>(nvc["RadSlider1_ClientState"]);
var v = rs1.Items[Convert.ToInt32(rs1.Value)];
 
Thanks,

Andy
           

2 Answers, 1 is accepted

Sort by
0
Accepted
MasterChiefMasterChef
Top achievements
Rank 2
answered on 18 Mar 2013, 04:53 PM
Hi Andy,

There's a good demo here in the documentation on how to store the current value of a slider. When creating the slider on the second page, simply pass it this same value and it should appear the same. 

Hopefully this helps,
Master chief
0
andy
Top achievements
Rank 1
answered on 18 Mar 2013, 04:59 PM
Great thanks, problem solved!
Tags
Slider
Asked by
andy
Top achievements
Rank 1
Answers by
MasterChiefMasterChef
Top achievements
Rank 2
andy
Top achievements
Rank 1
Share this question
or