Questions tagged [asp.net-mvc-ajax]

118 questions
1
vote
1 answer

Running a js function after ajax call puts incoming data to an element

I have an ajax link in my application: ... <%= Ajax.ActionLink("Go", "SomeAction", "SomeController", new AjaxOptions() { UpdateTargetId = "someDiv" }) %>
Serhat Ozgel
  • 22,430
  • 29
  • 98
  • 137
1
vote
1 answer

ASP.NET MVC 3 DateTime incorrect parsing on AJAX form submitting

I have a textbox on my AJAX form which contains date-time formatted string in date format like 'dd.MM.yyyy', for example '21.11.2011'. When submitting the form to controller action accept null in DateTime? parameter. It happens when date day is…
DrAlligieri
  • 211
  • 5
  • 10
1
vote
1 answer

For every new ajax call it takes a little more time than the previous call

I am trying to change some data with an ajax call, but the problem is that every new call takes a little more time than the previous one. So after 10-15 calls, the time from when the ajax request starts and when ajax returns data is like 20 seconds…
Ertan Hasani
  • 677
  • 1
  • 11
  • 31
1
vote
2 answers

MVC filter action redirect to infinite loop

I'm trying to create filter, the filter supposed to check role (not asp .NET membership or Identity but my-self one) and my wish is to restrict all controller actions (let call it "AuthController" for the following) from low-role level users. In my…
1
vote
0 answers

MVC/Ajax:How to abandon session or log out from the application when a certain page is navigated to with `JavaScript`?

I have an MVC application and when clicking on the browser Back button, I'm able to navigate in browser history. I have the following MVC code to build the links: @Ajax.ActionLink("Page1", "Index","Page1",new AjaxOptions { HttpMethod = "GET",…
gene
  • 1,762
  • 6
  • 28
  • 74
1
vote
1 answer

MVC: How to change URL address in browser based on the AJAX request for the page?

I have an AJAX request on my MVC page: @Ajax.ActionLink("Link","Index","Page1",new AjaxOptions { HttpMethod = "GET", InsertionMode = InsertionMode.Replace, UpdateTargetId= "mainAjax", LoadingElementId="loader", OnComplete="ChangeUrl();" }) When…
gene
  • 1,762
  • 6
  • 28
  • 74
1
vote
2 answers

jquery.validate lost on ajax replacement and only showing last error

I am using jquery.validate in MVC 2 with MicrosoftMvcJQueryValidation. I have data annotations on my model which is then being translated into jquery validators. I am using a modification to MicrosoftMvcJQueryValidation as outlined by Soe Tun to…
1
vote
0 answers

Ajax.beginform does a full postback

I am using Ajax,beginform to get partial postback, have install the Microsoft.jQuery.Unobtrusive.Ajax package, set up the bundle and added the keys in config files. With all this done when i click my submit button i get full postback. Have gone…
Arvind
  • 1,017
  • 4
  • 22
  • 45
1
vote
1 answer

Html.ValidationMessageFor( MyKey ) without being tiedto a model's attribute?

My model does not really represent what my form is posting. Example my Orgs Model which holds orgs helps me generate a treeview the users selects several nodes of the orgs tree and submits a form. The form posts an array[] or org ids. (maybe i'm…
1
vote
1 answer

MVC Ajax form and browser back button

I am currently working on an MVC site which has a search page that sits behind a login page. When the user logs in, they are redirected to the search page. The search form uses an ajax form that returns search results to the same view. When we have…
Adam B
  • 73
  • 6
1
vote
0 answers

MVC Ajax form javascript not fired with InsertionMode = InsertionMode.InsertAfter

I'm using mvc Ajax.BeginForm to load a partial view that have a kendo ComboBox in it. While using InsertionMode = InsertionMode.ReplaceWith at the form's AjaxOptions, everything works fine and the partial view is loaded with the kendo…
Issac
  • 943
  • 6
  • 12
1
vote
1 answer

Is MVC ajax form support CCS class name for UpdateTargetId instead of elementId?

I am trying to performing an action using MVC ajax form. I want to update content with response of action. Like I have two TR tags named with different ids. When I click on a Delete button which present in second TR (TD) then need to replace with…
sridharnetha
  • 1,643
  • 6
  • 25
  • 55
1
vote
1 answer

Changing InsertionMode of MVC Ajax form via JavaScript?

I wanna change some MVC Ajax Form parameters like InsertionMode or LoadingElementId via javascript at client side. How can I do it? sample of a MVC ajax form : @using (Ajax.BeginRouteForm("DevicesByObjectName", new AjaxOptions { InsertionMode =…
Mohammad Dayyan
  • 18,338
  • 35
  • 143
  • 207
1
vote
2 answers

Passing date parameters to @url.action via ajax

In my ASP.NET MVC 4 app, I'm using the following JAX code taken from this StackOverflow post to pass Date parameters to a controller but I am getting the following http 404 error: "The resource you are looking for has been removed, had its name…
nam
  • 15,516
  • 23
  • 104
  • 228
1
vote
1 answer

Ajax OnFailure function

I have an AJAX.RouteLink which has the following AJAXOptions new AjaxOptions { HttpMethod = "POST", OnFailure = "OnFailure", OnSuccess = "OnSuccess" }) My OnFailure method…
Sachin Kainth
  • 41,237
  • 78
  • 185
  • 289