200,782 questions
0
votes
2
answers
14k
views
DataTable Error: Uncaught ReferenceError: jQuery is not defined
My datatable plugin is not working and i dont know why please help...
when trying to debug the javascript on Google crome i found this error and i know if they are clashing
Uncaught ReferenceError: ...
Best practices
0
votes
2
replies
33
views
Add a NotMapped field to my model or create a view model to interface between the model and view?
I come from a MVVM in WPF background moving towards ASP.NET MVC. I have a model that is composed of another model called Message, like so:
public class User
{
public int Id { get; set; }
[...
1
vote
1
answer
9k
views
Call MVC post method from postman and send parameters to it
I need to test this mvc method from postman, it is working in Browser.
[HttpPost]
[Route("login")]
public async Task<ActionResult> Login(LogInRequest logInRequest)
{
...
1
vote
1
answer
143
views
Where do .resx (resource) files live in a dotnet application when one is using areas?
I'm working on a dotnet application that is using localization. I'm stuck on understanding where my .resx files are supposed to live.
The current file structure looks like this:
- Root
- Views
...
2
votes
2
answers
9k
views
IE11 keeps asking for credentials on intranet
We are creating an intranet site and want to use SSO. The problem is however, that Internet Explorer (11) keeps asking for credentials. By specifying the username and password we are able to access it....
0
votes
0
answers
30
views
Build on save no longer working in vs 2022 - 17.14.20
This only happened a few days ago and I usually keep on top of the updates in vs 2022. When making a change the the code behind for a razor partial view - hitting save would auto-build the changes and ...
Advice
0
votes
2
replies
41
views
Deploying ASP.NET API and ASP.NET MVC app on the same IIS default site
I have this scenario: I have an ASP.NET API which is deployed on IIS under the default web site. I have added the API by right click on default web site -> add application. API is working fine and ...
36
votes
3
answers
43k
views
Redirect request from middleware in .NET Core
What I'm trying to achieve is this:
When someone visits: smartphone.webshop.nl/home/index
I want to redirect this from middleware to: webshop.nl/smartphone/home/index
I want to do this because I want ...
0
votes
1
answer
17k
views
cannot implicitly convert type 'system.net.http.httpresponsemessage' to 'system.web.httpresponse'
I am creating a web service in visual studio 2015 using MySQL databases. I want implement only a GET method using HTTP. Now when I am doing it I cam accross and error. Which is
cannot implicitly ...
-1
votes
2
answers
1k
views
Data tables Ajax url not hitting Controller action
I am getting a little frustrated, This same code works elsewhere in my project. For some reason it is not hitting the controller action. When page loads the datatable comes up and just has the ...
0
votes
1
answer
80
views
Using [FromQuery] with a .NET controller for an optional boolean query string parameter where presence alone should set it
.NET has [FromQuery] to get query parameters on the path.
For instance my/foo?bar=1 maps to:
public class MyController : Controller
{
[HttpGet]
public async Task<Whatever> Foo([FromQuery]...
3
votes
1
answer
11k
views
FontAwesome fontawesome-webfont.woff2?v=4.5.0 404 not found
I am using fontawesome 4.5 in my asp.net mvc project. I am facing following error on console
I have included fonts in my fonts folder
And line the fontwesome style sheet in layout.cshtml
<link ...
1
vote
2
answers
8k
views
How to setup a wildcard route in MVC
The URL for any product details page on our site is like this:
http://example.com/Product/Index/pid219
Where:
Product - is the name of the controller
Index - is the name of the method and
pid219 - ...
0
votes
2
answers
10k
views
How to hide Query string parameter in URL
I have a Telerik grid in which I am using client templates for edit/delete actions for each record. So for the edit/delete action I need to pass the id of that record along with the URL, here in this ...
0
votes
1
answer
701
views
How to create object that contains a list of object in a single form?
public class Basket
{
public int Id { get; set; }
public string Sharp { get; set; }
public string Material { get; set; }
public List<Fruit> Fruits { get; set; }
}
public class ...
2
votes
1
answer
9k
views
Update ViewBag with jQuery and rendering results
I have an MVC3 application which uses ViewBag variables to dynamically fetch data from database and dynamically generate the interface.
I am using jQuery to call action method to insert some values ...
2
votes
2
answers
199
views
How do you add a choicefield dropdown to the form builder connectors settings section in sitefinity using FormsConnectorDefinitionsExtender
I'm trying to add a dropdown to the connectorsSettings section in the form builder using FormsConnectorDefinitionsExtender.
My field gets added but only the first choice is rendered and is rendered as ...
2
votes
1
answer
10k
views
How to unit test controller with Response.StatusCode
I have a method on MVC5 controller:-
[HttpPost]
public JsonResult Save(TaskViewModel model)
{
if (ModelState.IsValid)
{
var task = model.ToTask();
_taskService.Save(task);
...
3
votes
2
answers
10k
views
How to send list from view to controller MVC
I have view model:
public class AvailableTimesViewModel
{
public AvailableTimesViewModel() { }
public AvailableTimesViewModel(List<DateTime> list)
{
availableTimesList = ...
2
votes
2
answers
8k
views
How to export data to Excel using ASP.NET MVC 5 without reloading the page?
The process of exporting the data into Excel is working. But I don't need to reload the page. When I try to press the Export Data to Excel the page is reloading. How to avoid this? Please, help. Thank ...
26
votes
6
answers
16k
views
ASP.NET MVC: Mock controller.Url.Action
Urls for menus in my ASP.NET MVC apps are generated from controller/actions. So, they call
controller.Url.Action(action, controller)
Now, how do I make this work in unit tests?
I use MVCContrib ...
13
votes
1
answer
7k
views
Serilog, Elmah or both for a ASP.NET MVC project?
I implemented Serilog for a ASP.NET MVC project which will be hosted in Azure and Serilog provides sinks to log to Azure storage.
I then wanted a better way to handle exceptions and ran into this ...
1
vote
2
answers
10k
views
"Value cannot be null. Parameter name: s" 2Checkout payment API
i have integrate 2Checkout Payment API using following code but got error when Authorize Customer.
follow : https://www.2checkout.com/documentation/libraries-net-tutorial
Code :
public ...
42
votes
8
answers
60k
views
Anti-Forgery Token was meant for a different claims-based user
I am working on a logout feature in the application we are using ASP.NET Identity login. I can login successfully but when I logout and then try to login again I get the following message:
The ...
0
votes
0
answers
25
views
SustainSys ASP.NET MVC 4.* question - The signature verified correctly with the key contained in the signature, but that key is not trusted
SustainSys has been working for webforms, ASP.NET MVC on .NET 4.8, and ASP.NET Core on one server for a while.
I want to move the apps to some other servers using the same certificate. I was able to ...