getting slider value post to different page

3 posts, 1 answers
  1. andy
    andy avatar
    2 posts
    Member since:
    Sep 2012

    Posted 18 Mar 2013 Link to this post

    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. Answer
    MasterChiefMasterChef
    MasterChiefMasterChef avatar
    152 posts
    Member since:
    Jan 2013

    Posted 18 Mar 2013 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. andy
    andy avatar
    2 posts
    Member since:
    Sep 2012

    Posted 18 Mar 2013 Link to this post

    Great thanks, problem solved!
Back to Top