Questions tagged [asp.net-mvc]

The ASP.NET MVC Framework is an open source web application framework and tooling that implements a version of the model-view-controller (MVC) pattern tailored towards web applications and built upon an ASP.NET technology foundation.

0
votes
0answers
3 views

ASP.Net MVC Full Calendar

I've implemented a calendar, but I'm having some difficulties and problems. When I select an event and click on the edit button ... instead of showing me the data to edit ... the page gives a simple ...
0
votes
0answers
3 views

how can i include quantity reserved in cart for customers who shopped online and the product has not come out of stock

I tried to put quantity reserve code in my cart to indicate the product sold online but not yet delivered so it may alert the store users of the product already purchased so they wont sell it again ...
0
votes
0answers
3 views

Url.Action adding action name to url

I'm trying to call an action from jquery ajax using Url.Action("Action","Controller") function as url but the action resides on the same controller as Edit action. That means when I'm on edit page and ...
0
votes
0answers
12 views

ASP.NET Core 2.1 Referring to ApplicationDbContext from Class Library

I have these 2 projects App.ClassLibrary and App.Data I followed this tutorial https://garywoodfine.com/using-ef-core-in-a-separate-class-library-project/ to move my migrations and models to App....
0
votes
0answers
5 views

UnauthorizedAccessException consuming an API that requires access token

I'm developing an .netcore 1.1 MVC app, which is an Open ID Connect client using authorisation with IdentityServer4. It also consumes an API that requires authorisation. Currently, when the access ...
0
votes
0answers
9 views

Ext.NET Token is not unique exception but I only see ID once

I have a .cshtml file where I build a large number of elements and then call ToScript on the result, which should transform it to HTML. However, I consistently get a TokenNotUniqueException on this ...
0
votes
1answer
34 views

Why does JQuery $.post submit twice?

Why does this call my Action twice? For background, using .change only works when a user clicks somewhere else on the form. Also .change will not fire when the browser is closed. Hence the timer ...
0
votes
1answer
24 views

MVC/Jquery sending AJAX response into a view

I have a grid that displays a list of projects. Each row has a checkbox with each project's associated ID. I'm trying to pass an array of each selected checkbox's value into my controller, get a ...
0
votes
0answers
15 views

Shared Static Variable Connection String Consumed by Number of Clients

Need a Suggestion! I'm building a Web API application which is can be consumed by a number of Companies. Whenever a company integrate with my API a new connection is Created based the Company Tokken ...
0
votes
1answer
10 views

Replacing div with Partial View using Ajax Call Not working

So I have a 5 star rating system, and each star calls this function: function Test(ideaId, rating){ //alert(ideaId + " : " + rating); $.ajax({ url: '@Url.Action("RateIdea", "Ideas")', ...
0
votes
0answers
10 views

What determines where the Packages folder is placed in a Visual Studio 2017 project & how to change?

What determines where the Packages folder is located in a VS2017 Solution/Project folder structure? With some solutions it seems to be located at the Solution level and with some of our projects it ...
0
votes
0answers
7 views

CodeEffects in MVC

I am trying to implement codeEffects 4.x rule editor in MVC, as I can see in their documentation https://codeeffects.com/Doc/Business-Rule-Implementation-Example-Mvc-Net they are using codeEffects 5.x ...
-1
votes
2answers
36 views

How to get reponse from ajax on submit button in ASP.NET MVC form in current page

When I click on button "Submit", I want to stay on the page and make an Ajax call, and just show success alert box. But with this code it redirects me to http://localhost:65464/Home/TestMethod My ...
0
votes
0answers
11 views

Account login identity does not work as expected

I'm trying to login with identity in my project, but I'm not very successful. Anyway it goes back to the Account / Login page, I do not have any registered users, I manually typeAccount / Register it ...
0
votes
2answers
55 views

Asp.Net MVC 5 route not getting hit

I have this in my RouteConfig: routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", ...
1
vote
0answers
39 views

ASP.NET login does not redirect just logged user properly in Firefox and IE, but works with Chrome

I have ASP.NET application, which is perfectly works on development environment. Login works on Firefox, IE and Chrome. Requests in Firefox in development env looks like: POST Request: POST /...
0
votes
1answer
20 views

How to assign location based orders to specific users on WordPress (WooCommerce)?

I have a WooCommerce store which is connected to ASP.NET MVC via Woo API. All the order processing is done via the ASP.NET site and I am using Woo for managing subscription only. There are about a ...
0
votes
0answers
34 views

No parameterless constructor defined for this object error after adding code-base EF configuration

After adding code-base configuration class for EF called CustomDbConfiguration I get the 'No parameterless constructor defined for this object' error for my controller called CollectionsController. ...
0
votes
1answer
38 views

json function not pass value to controller

Hello i am insert data in database everything is perfect but when i click save button then json function not calling controller . when i use break point and check what values are pass in data then ...
0
votes
1answer
19 views

Read GridMVC select row in javascript button click

I have GridMVC in project with checkbox. while click button i need to read row which checkbox selected. I tried to read all data from GridMVC in button click but not working. MY Code GRID @using ...
0
votes
0answers
41 views

Why cannot save new data using Entity Framework [on hold]

I have a model with two fields, phone and information. Phone only accepts 11 digits number. When user insert invalid phone number, EF catches error. The problem is that when inserting new records, ...
-1
votes
1answer
32 views

How to give Id to model in razor pages to use in jquery script

inside my view I want to give an Id to child model name and use it in my script file following is my code. in the View Html.HiddenFor(model => model.TOURNAMENTS_D.GetType().Name, new {id = "...
0
votes
0answers
22 views

Radio buttons in bootstrap nav pills using Razor Helper in ASP.NET MVC

I have these navigation pills from bootstrap as selection, that works also very well only I now have in these pills a radio button but this radio button does not work anymore. The button is not ...
-1
votes
0answers
47 views

Comparing List to show error if match found

I have 2 table containing values as follows Table 1 Key Value 1 1001 2 1002 3 1003 4 1004 Table 2 PK FK VALUE 1 1 1002 2 1 1004 3 1 1008 4 2 1001 5 2 1004 6 2 1009 7 3 ...
0
votes
0answers
25 views

Optimize MVC code with too much partial views [on hold]

Firstly I would say that it is my first web app (coming from C#/winforms). Let's say I have a view with a kind of block for a db entity. In this block I have a list of all my entities with the ...
-3
votes
0answers
16 views

does not contain a public definition for 'GetEnumerator' [on hold]

Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source ...
0
votes
0answers
9 views

How to Test Twilio Send SMS API 8443 Port? [on hold]

How to Test Twilio Send SMS API 8443 Port ?. How to Twilio API Upgrade TLs v1.2 ?.
2
votes
1answer
33 views

I can't define “client” SignalR

I'm starting to work with signalR but I have an error (I have seen several answers on the web but none has helped me), I have the following files: GenteHub.cs using System; using System....
0
votes
0answers
14 views

HttpContext.SignIn sets User only in one Controller

I need to implement authorization with users from domain name. So I have a controller: public class UserController : Controller { [Authorize] public IActionResult LoginCheck() { ...
0
votes
0answers
37 views

Dispose EF Context by reference(remotely), Memory Leak

MVC EF6 Hi, I couldn't find an answer to this anywhere so I'm posting my own question, I am trying to track down a memory leak, there are a lot of repeated strings in my application, the application ...
1
vote
1answer
32 views

HTML Anchor href and onclick not working in Firefox

I have my anchor, onclick and href as below: <a href="/[email protected]" title="Click to run this report" class="ssrsReportLink" role="button">@rpt.ReportDescription</a> $('....
0
votes
0answers
17 views

Signalr error : There was an error invoking Hub method

there is console error: Error: There was an error invoking Hub method 'mail.Mail'. at Object.error (jquery.signalR-2.3.0.js:179) at init.callback (jquery.signalR-2.3.0.js:2717) at hubConnection.fn....
1
vote
0answers
16 views

App Insights end to end times do not match

I'm trying to diagnose slow response times with our server. Currently I'm not getting useful information from app insights. An example is shown below. Total request duration is shown as 4.7s but you ...
0
votes
3answers
34 views

Ajax - how to check returned HTML for CSS class?

I'm using Ajax to post to a .Net MVC controller. It returns HTML to be displayed on a section of the page. What I need to do is somehow determine if the HTML contains a class name so I can use that to ...
0
votes
0answers
25 views

Saving dynamically added element by jquery(or javascript) to View(or project) permanently asp.net-mvc

Imagine i have View and it contains : <ol > <li> ....</li> </ol> I want to know if its possible when i dynamically added another element and append to this ...
0
votes
1answer
24 views

How to remove the html generated from razor var to Javascript variable?

I'm using MVC5 and passing model from Controller to View. In the view I have var test = @Html.Raw(Json.Encode(Model.Data)); It work great, I have my model in the js variable. The problem is when ...
-1
votes
0answers
45 views

LINQ join returns duplicate values in MVC view

I do not have duplicate records in my database however in my view. It shows duplicates. ClientId is a Guid which is passed on to each table. This ClientId creates a relationship between the tables ...
0
votes
0answers
15 views

Best approach to retrofit an ASP.NET MVC web app to use an external API [on hold]

I am building a mobile app (and accompanying back-end) that will have to interoperate with a web app. I'm not very familiar with Microsoft web technologies, but it appears this app is built ASP.NET ...
1
vote
1answer
20 views

DataTable plugin not work when using CRUD operation using ajax in ASP.NET MVC

My code have an error.I'm using datatable plugin ,it worked good when i don't do CRUD operation using ajax but it's not working when using CRUD operation... Kindly help me out....Thanks in advance ...
0
votes
1answer
75 views

Contact form doesn't work, “Value cannot be null. Parameter name: address” MVC5

I have a contact form and I have no clue on what is going wrong. This the code for the model I wrote: public class Contact { public string FromName { get; set; } public string FromEmail { ...
0
votes
1answer
22 views

How to Deploy Model Update in ASP.Net MVC

I am new to ASP.Net in general and inherited an ASP.Net MVC Web site and need to make a change to a Model class file. My question is, how do I deploy that single change? I take it that I have to make ...
0
votes
1answer
30 views

Redirecting to Login Page Automatically without doing Action in Controller ASP.NET MVC when session expired

I know it's a common question but I'm really exhausted of searching a complete solution without success. I have done an attribute filter but this works only if the user interact with the application ...
1
vote
2answers
51 views

Add Button Value into all Text Box in a For Loop

I have a quick question. I have a form with a for loop. Each for loop has a text box. I want to have two buttons that when I click on one, all the text boxes get populated with the value in the button....
0
votes
1answer
28 views

Json data is not populat in html table using jQuery ajax in asp.net mvc 5

I am creating a ee portal, where user is login, once he log in ..then he will come to report page.. In report page he have option to select date range to fetch details, I want to show date range ...
0
votes
0answers
14 views

Authorize Web API 2.2 service and other existing ASP.NET MVC 4/5 websites

I have been searching for an example on how to add a security layer for all our currently running web applications which have been developed in ASP.NET MVC and Web API. The requirement has come from ...
0
votes
0answers
24 views

Hide certain aggregate data Kendo MVC grid

I'm hoping to hide certain aggregate data. I have three groupings: Commodity, ProductClass, Description. All three of these columns are displaying aggregate data, but I'm only looking to display it ...
1
vote
2answers
28 views

How to display the social media icons on the top-right in mobile phone view?

I have my social media icons in a top-right position both in laptop and tablet view but when I jump on mobile phone view, after clicking the toggle, they are listed vertically together with the main ...
1
vote
2answers
57 views

Is it necessary for a controller action that only returns a view to be asynchronous?

Take this basic action: [HttpGet] public IActionResult Index() { return View(); } Modify it to make use of async/await: [HttpGet] public async Task<IActionResult> Index() { return ...
0
votes
0answers
6 views

Telerik Html Editor Upload Image In Asp.Net MVC application

So, I have a Telerik Html Editor in my Asp.Net MVC 5 application. In my developpment environment, it works perfectly. But when I publish the application on the IIS, even on the developpment machine I ...
0
votes
1answer
20 views

Vue JS mutating prop with Alert component

I am using VueStrap components based on: https://wffranco.github.io/vue-strap/ Unfortunately I receive an error while I am setting visibility for alert, my code: HTML: <alert :show="showAlert" ...