All Questions
17,946
questions
0
votes
0
answers
37
views
Passing two parameters (IFormFile and a string) with JSON to C#
Versions:
ASP.NET and Web Tools - 17.10.341.11210
C# Tools - 4.10.0-3.24312.19+
JQuery - 3.3.1.js
JS - 2.8.3.js
I'm trying to pass an IFormFile and a string from a JSON file select and a string input.
...
0
votes
1
answer
37
views
How to change from readonly to not readonly of input in ASP.NET Core
MODAL
<div class="modal fade" id="residentModal" tabindex="-1" role="dialog" aria-labelledby="residentModalLabel" aria-hidden="true">
...
0
votes
1
answer
44
views
Display the all the details of Resident after clicking the view button using ASP.NET Core
Manage.cshtml
<table class="display table" id="ManageResident" style="width:100%">
<thead>
<tr>
<th>Resident ID</th>
...
2
votes
1
answer
30
views
Manage concurrent users per single subscription
I am implementing a functionality in which user can take one subscription &** maximum 10 account can be created per single subscription but only 3 concurrent users are allowed**.
I am using ...
0
votes
1
answer
34
views
Adding a RequiredFieldValidator causes the 'jquery' is not a valid script name. The name must end in '.js' error
I have a problem inside an asp net application where I get the 'jquery' is not a valid script name. The name must end in '.js' error when I try to add an asp:RequiredFieldValidator element inside an ...
0
votes
2
answers
53
views
Problem in sending data to the controller through Ajax in ASP.NET MVC
I use this foreach:
foreach (var item2 in RItem.GetChildItems(item.ID_Ca))
{
<div id="@idc" class="accordion-collapse collapse" aria-labelledby="headingTwo2"
...
0
votes
1
answer
70
views
FileContentResult return - 2 different controller methods, different result
I am using ASP.NET Core and ClosedXML to generate an Excel export.
Export Method 1
Here is the controller method that DOES return an .xlsx file to the browser. The method gets called from a .cshtml ...
1
vote
1
answer
39
views
How to prevent a clear data upon clicking new add address using button in ASP.Net Core
@model Registration
@{
ViewData["Title"] = "Register Page - Step Two";
}
<button type="button" class="btn btn-primary" onclick="addAddress()"&...
0
votes
0
answers
15
views
How to transfer method to Next in JQUERY Form
This is my script, I want to send a method to next Button in step form when user want to go from form 3 to form 4:
(function ($) {
"use strict"
var form = $("#step-form-...
0
votes
0
answers
46
views
Why is the selected value not retained?
I have an MVC application where a user can add and delete to their schedule. Each time they do, it refreshes so the previously selected dropdown goes back to the first option. How do I get it to ...
-1
votes
2
answers
41
views
JQuery .append(): Add <strong> inside <p>
I'm trying to render this dynamically using jQuery .append() :
<div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" ...
0
votes
0
answers
26
views
dynamic colspan mix object with string, numbers, date string in c# javascript
The issue is in Bottom and Top performance columns are dynamic, I need to set colspan by dynamic no of columns, i select 1 to no of months of period (mm-yyyy) in 2023 or other year. abc to region ...
0
votes
1
answer
26
views
jQuery - Remove hidden attribute not working
This is my .NET Core code of the view. When Red is selected, the FruitDate field should show up. When All is selected, the FruitDate has to be cleared and hidden.
<div class="form-group"&...
3
votes
1
answer
72
views
Why should change the first letter of the property to lowercase when updating the project to .NET 8?
I used .NET 7.x (ASP.NET Core 7 MVC) and JavaScript Library v1.10.2 and use XHR in Ajax to get data from the controller as shown here.
Send a request to get data like this:
function ...
1
vote
2
answers
41
views
Cascading dropdown AJAX loop call
there is a part of my form in which a user can enter the building and room and click the add button if they want to enter another building and room. I am using AJAX to populate the rooms based on the ...
0
votes
2
answers
53
views
Ajax Returns MasterPage File In Response Instead Of Return From Method From Current Page
Ajax returns masterpage html instead of returns from my method.
Here is my client code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Page1.aspx.cs" Inherits=...
0
votes
0
answers
36
views
The requested resource does not support http method 'GET'. (jquery-3.7.1.min.js:2 POST http://localhost:51067/Api/Values/Insertogrenci 401
I got this error while creating my student adding page, why could it be?
The requested resource does not support http method 'GET'.
$.ajax({
type: 'Post',
url: "/Api/Values/...
-4
votes
1
answer
32
views
Recorder Screen in .net [closed]
I have website exemption system i want when user open website record session and save video to wwwroot and when finish session end video i want in JavaScript or c#
project : asp mvc core
when finish ...
0
votes
0
answers
32
views
Popup is not displaying
If the user has made changes in the form and attempts to leave the page, a popup will appear. The popup is functioning correctly for leaving the page. However, when the user tries to switch tabs, the ...
0
votes
2
answers
48
views
CORS Error - Unable to replicate on most devices
For Conference Captioning, I have a few webpages that I built to help the Deaf and Hard of hearing to get live captions for in-person events: (1 & 2)
I tested it on 2 different Macs, 2 different ...
0
votes
0
answers
63
views
How to stop button onclick using javascript?
Is there anyone that can assist?
<div class="address-grid">
@foreach (var item in Model.ExistingAddresses)
{
<div class="address-item">
&...
0
votes
0
answers
67
views
When i load my PartialView html using jquery, an controller that i didn't call is called with 0 value id parameter
I have this View Edit.cshtml
@model ProdutoViewModel
@{
Layout = "_Layout";
}
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb" class="...
0
votes
0
answers
32
views
Can we parameterize jQuery ajax call for inserting data to database?
This is my simple code for inserting data to database and it's working fine. Table name is AccountMaster
function Insert() {
var Value = {};
Value.Id = $("[id*=hdnId]").val();
...
0
votes
0
answers
28
views
How can add drop-down from other table in my kendo grid
So I want to drop-down of the items that are present in other table and I want them in my kendo grid using asp.net Mvc so how can I do that ?
I tried to take 2 columns name in my main model from the ...
0
votes
0
answers
25
views
ASP.Net Webform: Server side web method not firing by jquery ajax
I am working with web form where i have button and one input file. when user click on a button then file open dialog will open and user select file. user selected file will be pass to server side ...
0
votes
0
answers
72
views
How to get value from editableSelect() by jquery in asp.net c#
I am trying to get the id of selected list item (html-editableSelect), but in the place of select Id value I am getting undefined alert.
Here is my aspx code
<select id="cmb_year" runat=&...
0
votes
1
answer
28
views
ASP.NET Core MVC validations not being displayed on view for child entities
I'm experiencing the issue while displaying errors in my view for child element.
I've got 2 entities Restaurant and Menu with their respective relationships described as below:
public class Restaurant
...
0
votes
1
answer
21
views
Reloading MVC5 Partial View that contains a Document Viewer
I have a partial view in MVC5 that displays a document viewer and a button that lets users upload a document.
I want to be able to reload the contents of the partial view or just reload the entire ...
0
votes
1
answer
73
views
Replacing google doc template text with placeholder {{text}} by google sheet images (charts: line, bar,pie)
I make a daily log report of my work in Google Sheets, and have to submit that report on a monthly basis. For that, I have a template report in my Google Drive account. That template needs to be ...
-1
votes
1
answer
60
views
Run a script that checks for SQL Server changes that returns a boolean value
I already plan on doing this differently with webhooks, but for now I just need to show a PoC for this where the browser client will check on intervals if there's any changes to an SQL Server database ...
0
votes
1
answer
46
views
ASP.NET Core - Change Url of Product Details when select Color
I am working on E-commerce Laptop. I want when the user chooses another color in the select drop-down, it will redirect to the product of that color.
I am using JavaScript to redirect the URL, here ...
1
vote
1
answer
53
views
Change the path of images in JSON returned using AJAX
I want to change image whenever I choose the color the view so I write an Ajax to return the product of that color. Here the code :
$(document).on('change', '#colorId', function () {
GetImages(...
0
votes
2
answers
215
views
When calling ASP.NET Core 6 Web API, I get the error message 400 bad request
A little strange. If the following programs are all in the ASP.NET Core 6 MVC project, there will be no problem.
But if you separate the program. Ajax is in the ASP.NET Core 6 MVC project, and the C# ...
0
votes
0
answers
24
views
Retrieve parameters on a web page as set by click once deployment using WebClient.UploadString(). Click once launched on same web page
Can you retrieve the parameters from a web page as set in a click once deployment application with WebClient.UploadString()? The c sharp code below is how I send the parameters in the click once ...
1
vote
1
answer
106
views
jQuery + C# (.Net 8): Passing an array of form files from Ajax to Controller
I'm working on a .Net 8 API and I need to pass form data which consists of files and other form elements to the controller via ajax.
I'm being able to pass a single file successfully, but the weird ...
0
votes
1
answer
44
views
Using a spinner without Ajax
Well, I hope you can help me, this is giving me a lot of trouble
I'm using Razor with Net 8 MVC and I want a spinner to appear in two situations:
The first, before loading the page.
The second is in ...
-1
votes
1
answer
47
views
How to make a dropdown value is selected during the page load based on the values fetched from DB in .net core?
I have fixed dropdown values in the .cshtml file.
`**
Yes
No
Ask Me` like this..
I'm saving these values into the DB and during the page load I'm fetching the values and assigning into the ...
0
votes
1
answer
59
views
How to make a jQuery function work for same element in all rows of a foreach loop instead of just the first row?
I'm using ASP.net C# and I have a table for products where I have a function that gets called whenever there is a change in a dropdown list selection.
My function works perfect currently, but only if ...
-1
votes
2
answers
46
views
Call aspx.cs file function from jquery
I have button in aspx file as below :
<asp:Button ID="btnSave" Style="display: none;" runat="server" OnClick="btnSave_Click" />
Now in aspx.cs file I ...
0
votes
0
answers
36
views
Filtering Data in DataTbale ASP.NET
enter image description here I have a problem with data filtration in the table. I would like the data in the filter list to remain intact for the applied filter and to be updated in the remaining ...
-1
votes
1
answer
61
views
Using javascript getTimezoneOffset to get local time of the client with C# backend
I need to capture the timezone offset of the client and store it in my database. To do this I have been using a hidden field in the login with some Javascript :
<form class="user" id=&...
0
votes
0
answers
164
views
Using EPPlus to create an excel file
I have an ASP.NET Framework web application and I am using an .asmx webservice to create an excel file.
I make an AJAX call to the .asmx file and it should create an .xls or .xlsx to download from the ...
0
votes
0
answers
77
views
Why are my parameters always passed as null to my OnPost method?
I've got a simple function that receives a string representing the binary data of a PDF file, a filename string and an integer employee ID.
This is the function:
public JsonResult ...
0
votes
0
answers
130
views
Dropzone and ASP.NET Image Uploader: Uploaded Image is blank and has Underscore Name and Larger Filesize
"I am developing an image uploader using Dropzone in ASP.NET. I am encountering an issue where, after clicking the submit button, the uploaded image file appearing in my directory is blank ...
0
votes
1
answer
73
views
Disable Login details from being autofilled into input fields .Net Core Identity
When I want to create an account I don't want any fields being populated by chrome passwords as I have a hidden field that appears if a certain option is selected from a select. The field is shown, ...
1
vote
1
answer
48
views
Partial View is not loaded after main page is rendered
I have a razor main page with a selector that is loaded with the OnGet() event, when the user clicks in a value of this selector a jQuery function is called to load a partial view with some values.
...
1
vote
0
answers
77
views
Why SignalR hub doesn't update a new function added?
I am working on a SignalR and C# project. I already have a hub and it's working fine.
But some days ago, I wrote a new function in the hub to use in one of the screens in the system and run the code. ...
0
votes
1
answer
57
views
How do you save a page by button click on page exit using javascript
I have tried just about everything i can think of to trigger a button which triggers the save page event on page exit yet it never fires. I want the event to fire whether the button is visible or not ...
0
votes
0
answers
48
views
exception error on server iis input string not in correct format
I work on asp.net MVC application . I get error input string not in correct format
i don't know what is the reason of this issue and which line give me this issue
on local pc issue not happen but on ...
0
votes
1
answer
134
views
ASP.NET Core MVC Empty Request Body .NET 7
I get an empty Request.Body in the controller when I make a request to the controller from the frontend part, but if I use Postman, then everything works. When I sent request from Firefox, request ...