Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8033997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:52:44+00:00 2026-06-05T01:52:44+00:00

I have a javascript in *.cshtml file $(function () { sliderDiv.slider({ range: true, min:

  • 0

I have a javascript in *.cshtml file

$(function () {

sliderDiv.slider({
  range: true,
  min: minVal,
  max: maxVal,
  values: [minVal, maxVal]
});

sliderDiv.bind("slidechange", function (event, ui) {

  var d = "min=" + ui.values[0] + "&max=" + ui.values[1];
  $.ajax({
    type: "POST",
    url: '@Url.Action("Update", "Default")',
    data: d,
    success: function (result, ajaxObj) {
        alert('ok');
        alert(result.min + " - " + result.max);
        $("#ajaxresult").html('@{Html.RenderAction("Update", "Default");}');
    },
   error: function (ajaxObj, message, exceptionObj) { alert('no'); }
});
});
}

And Controller:

public ActionResult Update(int? min, int? max)
        {
            if(min == null) min = 1;
            if(max == null) max = 1;
            var s = new SliderModel()
                                {
                                    min = (int)min * 1000,
                                    max = (int)max * 1000
                                };

            return new JsonResult
                       {
                           Data = s,
                           ContentEncoding = Encoding.UTF8,
                           JsonRequestBehavior = JsonRequestBehavior.AllowGet,
                           ContentType = "json"
                       };

        }

I want to use this line

$("#ajaxresult").html('@{Html.RenderAction("Update", "Default");}');

to send ui.values[0] and ui.values[1] as min and max parameters to Html.RenderAction("Update", "Default")

Something like $("#ajaxresult").html('@{Html.RenderAction("Update", "Default", new {min = ui.values[0], max = ui.values[1]});}');

How can I do something like that???

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T01:52:46+00:00Added an answer on June 5, 2026 at 1:52 am
    var url = '@Url.Action("Update", "Default")';
    url += '/?min=' + ui.values[0] + '&max=' + ui.values[1];
    $("#ajaxresult").load(url);
    

    load docs:

    Description: Load data from the server and place the returned HTML into the matched element.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .csHtml -razor file with a javascript function that uses the @Url.Content
I'm building an ASP.NET MVC3 website. I have some javascript in my .cshtml file:
I have javascript code embedded inside a html template file. When I load this
I have JavaScript code which copies the value of input file and paste it
I have JavaScript form validation functions like so: function validate_name(field) { if (field ==
I have JavaScript of ajax uploader as below; $(document).ready(function(){ var qwerty = $('#qwerty').val(); $('#demo1').ajaxupload({
I have Javascript as below: <script type="text/javascript" language="javascript"> function redirectToPrevious(abcURL) { window.location.replace(abcURL); } function
I have an ASP.NET MVC website which has a particular javascript file that needs
Let's say I have a javascript slide-show in a partial view... _Slideshow.cshtml: @{ ViewBag.Title
I have a javascript function that works as I would like : <script language=javascript

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.