All Questions
786
questions
0
votes
1
answer
53
views
View cannot resolve action
I was configuring CRUD in my project and I ran into a problem. View does not see the method from the controller. I used the main view with partial views.
Main view code:
<div class="container ...
1
vote
3
answers
178
views
update progress bar from razor server
I have a progress bar on a razor page.
I know it works because I've called it on an onclick event.
The issue is getting it to work from the server side. Here is the code:
using Microsoft....
0
votes
1
answer
45
views
Why is my partial view not updating when I post data in my .Net razor page?
I am building a web application to take orders for a printing business. After an order item is added to the cart, I want the contents of the cart to be updated in a partial view on the same page. The ...
0
votes
1
answer
44
views
jQuery/Ajax form automatically submitting even though I have event.preventDefault in the submit action
I have an existing form that uses Ajax and jQuery. I'm trying to prevent it from automatically submitting and I've put event.preventDefault() in the submit action:
$(document).ready(function () {
...
0
votes
0
answers
92
views
Razor page with real-time price data using SSE
I am trying to create a Razor page within my so-called "Server" solution to display some real-time stock prices, using the server-sent event approach. In the end, I am not getting any auto-...
0
votes
2
answers
56
views
How to pass DateTime values to AJAX and then to a controller action?
I have the following in a page:
@{
var fromDate = DateTime.Today;
var toDate = DateTime.Today.AddDays(1);
}
<button type="button" onclick="getData('@fromDate, @toDate')"...
0
votes
0
answers
42
views
undefined=undefined gets appended to ajax request URL
I have an ajax call in my razor application, which is suppose to call this endpoint
[HttpPost]
public async Task<JsonResult> OnPostWorkflowStatus(int actionId, int workflowId, int ...
0
votes
0
answers
53
views
Debugging an Ajax call from DataTables in ASP.NET / Razor and C#
I have used DataTables in the past with MVP pages but am working with Razor and C# this time. I have setup my DataTable on the page RTSkills.cshtml and configured the Ajax call as shown here:
...
0
votes
2
answers
70
views
Cannot send TempData back to same view after Ajax Post action in .NET 6
Fair warning, I lack the fundamental understanding of how controllers work and reading about them for hours doesn't seem to help. This is probably terrible design. However, all I want to accomplish ...
0
votes
2
answers
52
views
Ajax call going to the wrong host in my Asp.Net application
I am trying to make an API call in an ASP.Net application. This is what my AJAX call looks like:
$.ajax({
url: "/foo/bar",
type: "POST",
data: JSON....
1
vote
1
answer
94
views
AJAX returns undefined, failure
I am trying to use the success and failure blocks of the AJAX request. My function is working and I can easily direct to the controller and use my queries to modify my SQL database eg. Everything is ...
0
votes
1
answer
291
views
Antiforgerytoken in ajax post request ASP.NET MVC throwing 500 (Internal Server Error)
I am having trouble with the AntiForgeryToken with ajax. I'm using ASP.NET MVC 3. I tried the solution in jQuery Ajax calls and the Html.AntiForgeryToken(). Using that solution, the token is now being ...
0
votes
1
answer
40
views
My Ajax form is returning null to my controller
I'm doing post processing with Ajax BeginForm. The value coming to the controller is null.But when I use the SettingViewModel instead, null does not appear. But I need to use my UsersRegister model.
...
0
votes
0
answers
36
views
Table disappeared after insert with Ajax BeginForm
After inserting with Ajax BeginForm, I am trying to update my table with UpdateTargetId.The insert operation was successful but my table disappears.I don't understand if I'm missing something or doing ...
0
votes
1
answer
38
views
Why my cascading dropdown menu isn't working and how I figured out I made a simple logic error
I'm trying to create a cascading dropdown menu involving campuses whose value will populate the building menu dynamically.
The way it's working is that a selection is made:
<td&...