117 questions
0
votes
1
answer
231
views
How do I convert the enum int value to string value in ajax json response
I have a home controller which has a list of objects and an index action method that returns a view which lists all the objects in a table.
Todo.cs
[Display(Name ="Item Id")]
...
0
votes
1
answer
141
views
JQuery ajax - how to pass an array parameter with null value
I need to pass an array parameter to my ASP.NET backend.
It looks like this:
$.ajax({ url: 'test', type: 'POST', data: { test: [1, 2] }})
And the generated form data is:
test[]=1&test[]=2.
So far ...
0
votes
0
answers
60
views
Passing multiple ajax parameters to mvc controller
I can pass a serialized form to a mvc controller no problems with code below and all is populated
$("#btnExecuteJob").on("click", function (e) {
var frmForm1 = $("#form1&...
0
votes
0
answers
193
views
dynamic form ajax beginform validation error - MVC
Implementation Detail:
Page has Add Button and Table view
On Add button click, partial view (form) is loaded on Modal PopUp. Dynamic form selected based on parameter.
On Add button click below code is ...
0
votes
1
answer
321
views
Multiple response from server within a Ajax call in ASP.Net MVC 5
What will be the possible ways to send multiple responses to the client side within a Ajax call.
Scenario
1.Import 200 records from excel through Ajax.
2.Read file record one by one.
3.On each ...
0
votes
1
answer
409
views
MVC: When returning from the controller on Ajax call, the result is undefined
I'm making an Ajax call to the controller when clicking on a Kendo button and return the model:
@(Html.Kendo().Button()
.Name("btnSubmit")
.HtmlAttributes(new {...
-1
votes
1
answer
1k
views
Partial View not showing updated model values. Always shows existing values
Actually i tried to update the partial view content whenever i do search. So i use ajax call to achieve this. So, the values from the controller to partial view model is correct(new data), but its not ...
0
votes
2
answers
55
views
Ajax value not received by controller
I have this code that got properly delivered to its controller counterpart.
but for some reason the search model data was only nulls,while the pageNumber is received properly
did i made a mistake ...
0
votes
0
answers
55
views
Ajax begin form db record with mvc
I created a form. I want to do a post save method.
He records but records the same data twice. How can I solve this problem?
I have to solve the double registration problem. I'm pushing the button ...
1
vote
1
answer
98
views
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 ...
0
votes
0
answers
665
views
How to pass dynamic data as model from view to controller
I am using Ajax MVC to submit the model to controller, In View I am displaying the data from a API like below code:
@using (Ajax.BeginForm("SaveFeaturesCapabilities", "Estimates", new AjaxOptions { ...
1
vote
2
answers
1k
views
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 ...
0
votes
2
answers
250
views
Knockout viewmodel passed to action coming empty
I have a controller action where I'm trying to post a model from knockout:
[HttpPost]
public void AddItems(MyViewModel model)
{
[...]
}
knockout action:
self.AddItems = ...
1
vote
0
answers
137
views
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","...
1
vote
1
answer
2k
views
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", ...
0
votes
1
answer
1k
views
Asp.net MVC page refresh sing AJAX
I am working on asp.net MVC , here i have used highcharts that will display data coming from a meter. Data is coming after every 15-20 seconds so i want to reload/refresh the page after every 15/20 ...
1
vote
1
answer
1k
views
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 ...
1
vote
1
answer
14k
views
what is the alternative of using url.action in ajax
E.g.
@url.Action("Actionname", "ControllerName", new { [email protected], @class="test"})
I want such a thing in Ajax, like this:
@Ajax.action("Actionname", "ControllerName",new { [email protected], @class="...
-1
votes
1
answer
232
views
Changing partial views in the same view based on menu
I am creating a website of static pages in MVC5. I want to update the "content" div on the right side , based on the menu item clicked which is on the left side of the page without refreshing the ...
0
votes
1
answer
2k
views
Excel file reading in mvc5 using javascript function
The Excel sheet want to read while it upload on a button click in MVC5.The uploaded excel file name is passed into action using AJAX method.Here the file variable get null value in posted method.
Here ...
1
vote
1
answer
671
views
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 ...
1
vote
0
answers
1k
views
New UmbracoForms (not Contour) AJAX call
Update:
The project has been started that should amend most, if not all, the problems UmbracoForms have (including AJAX calls). The discussion started on this forum thread: our.umbraco.org/forum/...
0
votes
0
answers
52
views
Database Insertion not working with partial view
i created one mvc application to show event details in a particular month.
i created one view which includes one jquery table(employee) having one ajax actionlink in each row. when we clicks each row ...
0
votes
1
answer
107
views
Data not passed from controller to view
i have one webapi app in which i have one code to populate a table in the view
the controller(Home) code is
[HttpGet]
public List<Employee> GetEmployees()
{
var com = new ...
0
votes
3
answers
2k
views
Jquery AJAX CALL with parameter to controller's method not working
I am working with Jquery AJAX Call in MVC Application. My view looks like this :
<p>
Name @Html.TextBox("Name")
Date @Html.TextBox("Date")
<input type="submit" id="SubmitName" ...
0
votes
2
answers
540
views
MVC 5 Ajax partial form validation
I'm using an Ajax.BeginForm in a strongly typed view. Within this form I have a few panels which hold model properties which in turn use their own models and editor templates. I want to post the whole ...
0
votes
2
answers
1k
views
Action does not get the value from Ajax ActionLink htmlAttribute
I have an ajax actionlink where I pass a model and actionattribute as additional html attribute
@Ajax.ActionLink("Add action", "SomeAction", "SomeController", Model, new AjaxOptions() { InsertionMode ...
3
votes
1
answer
935
views
get value of last appended textbox asp.net mvc
if I'll click to add date begin_date and end_date will added to my view. At start I have only 1 begin and end date. dates are added using this:
$(document).ready(function () {
var str = '<...
0
votes
1
answer
1k
views
PartialViewResult on submit return another partial view
I have
public PartialViewResult CodePartial(string code){
...
return PartialView("anotherpartial");
}
which on has submit button and I want that on post executed anotherpartial ...
2
votes
1
answer
2k
views
Synchronous XMLHttpReques.. asp.net mvc
I have this controller:
public ActionResult Index()
{
return View();
}
[HttpGet]
public PartialViewResult Code()
{
return PartialView("Code");
}
[...
1
vote
1
answer
1k
views
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 ...
5
votes
1
answer
14k
views
The partial view 'First.cshtml' was not found or no view engine supports the searched locations
I'm trying to call partial view in div on click. I've written this:
@Ajax.ActionLink("Second", "Second", new AjaxOptions()
{
HttpMethod = "GET",
UpdateTargetId = "partials",
...
0
votes
1
answer
3k
views
ASP.NET MVC5 Ajax Partial View loading full page
I am using ajax helpers to load data asynchronously, I am using MVC5, EF6 and returning PartialView from controller but partial view is loading on full page instead of updating a DIV asynchronously. ...
1
vote
0
answers
673
views
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 ...
2
votes
1
answer
4k
views
tempdata value not getting through ajax call on controller on checkbox event
i want to send parameter to my controller.this is my view page:
<div>
<li> <input name="chk" type="checkbox" value="1"> electronics </li>
<li> <input name="chk" ...
1
vote
1
answer
262
views
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 ...
1
vote
1
answer
727
views
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("...
0
votes
1
answer
92
views
MVC 5 ajax not working in default project
i have created a default MVC 5 project. i used Entity Framework 6. I created a simple person class with Id and Name as a model. Then i generated CRUD operation for it using MVC 5 template after ...
0
votes
1
answer
696
views
Failed to call action method from AJAX
I have a JavaScript method dotrack(). I am calling an action UpdateJson from the JavaScript through AJAX. I am passing JSON data type and the method will return true/false. After executing system is ...
0
votes
1
answer
86
views
What's the best approach for dynamically loading an editor?
I'm still fairly new to ASP.NET MVC (or at least when it comes to using it in a more advanced scenarios) - so I'm looking for some feedback for a particular usage scenario and the best approach to ...
0
votes
1
answer
870
views
MVC Ajax form not working with dropdown list Item change event?
I have a MVC Ajax form. I am trying to send Ajax request to the controller by changing the items in dropdown list. I tried with the below code, but my controller treated request as normal not Ajax ...
0
votes
0
answers
376
views
Controller return incorrect data with ajax ActionLink in mvc
several days ago with searching i put an ajax button inside my page, but i didn't know the issue till now, the thing is happen, is that the result i receive is not the result from ajax redirection, ...
-1
votes
1
answer
2k
views
Google Maps Api With Asp.net MVC 4 PartialView Ajax Request
I have a partial view. This partial view returns by Ajax.actionlink request. Partial View contain a google map . But map not rendering couse scripts must run when document is ready.
How to show ...
0
votes
1
answer
8k
views
The required anti-forgery form field __RequestVerificationToken is not present
Could you please help me to solve this issue? I'm implementing sign in form without form or html.beginform because I'm calling the controller /API through Ajax call and based on the status message / ...
0
votes
1
answer
1k
views
Prevent page to navigate via MVC Ajax actionlink
I am using asp.net (model view controller) razor view Ajax action link to navigate through pages in my website. My requirement is i will have to restrict the user and populates some popups before ...
0
votes
1
answer
3k
views
How to create label text using html helper from Model in ASP.Net MVC 5 (Razor View)
I am trying to create a label text using html helper from my model RoomAvailabilitySummary
View Design:
@model IEnumerable<WBE.Model.RoomAvailabilitySummary>
@using(Ajax.BeginForm("...
1
vote
2
answers
5k
views
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 ...
1
vote
1
answer
2k
views
Ajax OnFailure function
I have an AJAX.RouteLink which has the following AJAXOptions
new AjaxOptions
{
HttpMethod = "POST",
OnFailure = "OnFailure",
OnSuccess = "...
0
votes
1
answer
246
views
Ajax.RouteLink gives a 404
I have this link
@Ajax.RouteLink("Bid", RouteNames.Ajax.BidOnLot,
new
{
lotId = Model.Lot.Id,
bidAmount = Model.NextBidAmountForUser
...
2
votes
2
answers
1k
views
How to recieve and display JSON erroneous response in case of asp.net mvc Ajax in MVC 3.0 App
I am using CustomErrorHandler attribute for handling errors in my asp.net mvc application. The code is as follows:
public class CustomHandleErrorAttribute : HandleErrorAttribute // Error handler ...