Most voted "asp.net-mvc" questions
ASP.NET MVC is an open-source Microsoft framework that implements the Model View Controller architecture standards for web development. Based on ASP.NET, it allows software developers to build web applications following the Model View Controller architecture standards, featuring a variety of features following recent trends.
Learn more…3,385 questions
Sort by count of
-
2
votes1
answer392
viewsHow to leave the relative folder path?
I developed a project in ASP.NET MVC and now I’m going up to the server. Turns out on my local machine, it takes the localhost address, something like this: http://127.0.0.1:8080/ But when…
-
2
votes1
answer811
viewsSend error message to user (ASP.NET MVC)
I have the following situation: in my controller MovementsController got an action Details who is responsible for performing a database search through the Id received. The question is: if no data is…
-
2
votes1
answer223
viewsProblems loading Dropdownlist in cascade - Asp.net Core MVC
I have two combobox in which the second has a cascade load that is, when I select something in the first, a query is made in the database and the data must fill in the second... My controller seems…
-
2
votes0
answers25
viewsDoes not log in after published in Azure
I need help.. I published a web application, developed in ASP.NET MVC5 with c#, on the Azure platform. This application has implemented an authentication system. The application works well locally…
-
2
votes1
answer78
viewsAdd Checkbox to Datagrid field
I have a DataGrid and I’m wanting to put in a field a CheckBox, was researching and it seems that with the .EditorOptions() it is possible to do this, but do not know how, just passing CheckBox as…
-
2
votes1
answer72
viewsError in left Join Linq - Dbcomparisonexpression requires Arguments with comparable types
I have the following method: However, when I run the query in the Log, using the left Join I get the following message : Dbcomparisonexpression requires Arguments with comparable types [HttpGet]…
-
2
votes1
answer400
viewsGrab URL directly from an image of my ASP NET MVC application
Good afternoon, I’m trying to make an API to return the URL of an image list but I don’t know how to do it. I found things with server.mapPatch but these return the physical address of the file. I…
-
2
votes1
answer24
viewsAngularjs download file from ASP.MVC5 passing parameters
Situation: I have an ASP MVC5 API that generates an excel.xlsx and returns it in a Filecontentresult. All in memory, because I can’t save the file to the server disk.It works ok if I access the url…
-
2
votes1
answer63
viewsSave Object to another object’s controller
I have a class Collaborator, and a class Addressee. the collaborator has an address. In my collaborator class I have a: public virtual Endereco Endereco { get; set; } [ForeignKey("Endereco")] public…
-
2
votes0
answers133
viewsHow to read a text file on the INFRA.DATA layer of an Asp.net Core - C#
In the Infra.Data layer, I configured the properties of a csv file to be copied to the output directory of the "bin" folder and I would like to read it using the Streamreader class. After being…
-
2
votes1
answer498
viewsIdentityuser Password Change - Aspnet
I have a registration form, which registers the user with email, and the password, but the need arose to change this password, and using the class Identity, she owns the field PasswordHash, and I…
-
2
votes2
answers478
viewsStyles of my Datatable does not load in modal
I am creating a modal and inside I will put a table with some information, however, the content of the modal is not being stylizable. I already use the same table in other views and works normally…
-
2
votes1
answer44
viewsFluentnhibernate is mounting the wrong query
Dear, After mapping the tables, I consulted one of them to return the information "daughter". The sql was mounted correctly, however the name of the key column (PK) was changed which made an error…
-
2
votes2
answers124
viewsJunction of 2 Linq Queries
I am using the mysql database. I have 2 tables one of questions and options related to the question. For every access I make to the system I need to take the questions randomly and obviously the…
-
2
votes1
answer92
viewsAdd HTML Properties to an input via Razor
When I create a field input-type-text Via Razor, I do something like this: @Html.TextBox("nomeTxt", null, new { @class = "form-control", @placeholder = "Exemplo de placeholder", @type = "text" })…
-
2
votes2
answers7589
viewsHow to pass parameters via url to an application in React?
I have an application in .Net MVC where I use the Session to store logged user data. But within this application I have a screen made in React which will be accessed externally (that is, it is a…
-
2
votes1
answer182
viewsEntity Framework Sum and Count different status
In my ASP.NET MVC project, I’m trying to achieve the equivalent of this SQL Server code: Select e.Numero, e.ValorEmprestimo, Count(Case when pvp.IdeStatus = false and pvp.DatVencimento >=…
c# asp.net-mvc asp.net entity-framework-6 entity-framework-coreasked 5 years, 4 months ago Pedro 186 -
2
votes2
answers72
viewsHow do I pass the right string value to my controller? from the error when returning to Edit View
**// Tentei destas duas formas e não consegui nenhuma!** // Onde tem item.nome é de um foreach que me retorna nome de uma pessoa <span data-toggle='tooltip' data-placement='bottom'><a…
-
2
votes0
answers23
viewsError displaying Time on Google Columnchart chart
The Example chart below displays the Hours correctly: HTML: <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <div id="chart_div"></div>…
-
2
votes1
answer132
viewsRelationship one-to-Many Entity Framework
I am developing a crud of registration for a project. When registering the user(Employee) must inform a IdCity that is related to the table cities(Cities). How is it possible for me to automatically…
c# asp.net-mvc .net entity-framework entity-framework-6asked 5 years, 3 months ago vinilazzari028 23 -
2
votes1
answer47
viewsHow to use AJAX that takes the value of a field for a select and returns to a modal in a partial view?
My code here: View: <tbody> @for (int i = 0; i < Model.lNaoIncluidos.Count; i++){ <tr> <td style="text-align: center;"> <span data-toggle="tooltip" data-placement="top"…
-
2
votes1
answer53
viewsHow to add Account to the Asp.Net Core project
I’m new to Asp.net core mvc and I’m having a hard time, I have a project that in visual studio I have a solution for 4 different projects. Let’s just say it’s Project A and Project B. Project A…
-
2
votes0
answers288
viewsSend view value to C# ASP NET MVC controller
I need to pass an ID of a forach inside a form of my view to the controller, but I couldn’t find the best way to do it. I tried to call a Hiddenfor with the ID in the foreach or call the value by…
-
2
votes1
answer44
viewsProblems creating items from a dropdownmenu submenu using Javascript
I have a dropdownmenu that works normally when I load it using Asp.net core + Razor. Inside it I have the submenus Phones and WEB... When I try to recreate the submenus due to an app need, their…
-
2
votes1
answer83
viewsPrint Owin Identity Projects
How I can print all different types of claims that I created during my Owin Identity authentication? I’m using @User.Identity.Nome to be able to print only the name, I can’t access the other keys I…
-
2
votes1
answer363
viewsVariable double receiving comma value in API - . Netcore
Hello, I created an API that receives two parameters from another project (requirement of college work), is the calculation of the BMI, so it receives weight and height and makes the calculation,…
-
2
votes1
answer340
viewsUnable to install Npgsql 4.1.2 package. application . NET Framework
I’m trying to install the Npgsql to consume Postgresql data in my project , but returns me the error below: Severity Code Description Project File Line Suppression State Error Could not install…
-
2
votes1
answer134
viewsHow to perform mathematical operation within the MVC view
I am creating a web application MVC 5 for studies and I have a question: it is possible to perform a mathematical operation in view? I wanted to multiply line 16. What would be the solution?…
-
2
votes1
answer57
viewsHow to transform boolean input values to string values using C# (MVC)?
I’m having trouble transforming values from a Toggle input into a string value to be stored in a BD. The goal is to make a Buy/Sell Toggle that shows the type of operation the user is entering the…
-
2
votes1
answer32
viewsMVC switch from partial view with select control
I am making an application where the user chooses an option and a different form is shown for each of these options. My problem is that when I change the option, I cannot change to the corresponding…
-
2
votes1
answer48
viewsfilter list of registered assets by room
I’m doing a heritage system, where I can register a heritage and link to it a room. In this system I have a tab of reports, where I have a field that I must type the name of a room and a button to…
-
1
votes1
answer158
viewsHow do I test Htmlhelper, Ajaxhelper and Urlhelper methods?
I wrote some extensions for the MVC helpers. The problem is that I don’t know how to test these methods since I don’t have these objects in a test unit. How do I test the methods I created?…
-
1
votes1
answer883
viewsHow to call Actionresult from another Area with an html link?
Hello, I have a link in a View and I need to direct this link to a ActionResult that is in another Area of my project. Is a link from Sair to call on the a ActionResult Logoff.…
-
1
votes2
answers808
viewsScaffolding ASP.NET giving error
The error is generated using VS 2012. When I try to create the Controller for my News using the Entity framework, I have tried several ways. o My database you can see in the server explorer on the…
-
1
votes2
answers2408
viewsHow to render two typed Views on an Index()?
I’m trying to render two views created with the scaffolding, one is for the Create and another is for the List. The idea is to join in index the following: @model BraveryBranded.ASP.Models.News @{…
-
1
votes1
answer352
viewsProblem generating list in Viewmodel
I’m working on ASP.Net with MVC 4, and when doing a search/use filters I will present a list of resulting data. To better manipulate this result I created a ViewModel where I put information from…
-
1
votes2
answers1994
viewsGet Post Data in ASP.Net MVC
I’m using MVC in my application and in Views I am using several tools from Telerik. I need to get some information from a POST that I give in mine View. Segue View: <div class="div-grid">…
-
1
votes3
answers212
viewsProblem with the Bundle
I’m developing a project and it’s time to work on the performance of it, and I went to use the scheme of bundling and minification of MVC 4.5, it worked as expected, it joined all the styles that…
-
1
votes3
answers1139
viewsRoute to static pages in MVC
I have a question about the application ASP.Net MVC: Structure Views | +-- Home | | | +-- Index.cshtml | | | +-- Page.cshtml | +-- Users | | | +-- Details.cshtml | +-- Paginas | | | +--…
-
1
votes1
answer285
viewsAsp.net Identity Good practice authorization
I have my user using Asp.net Identity for authentication as usual I have my class implementing iuser public class usuario: IUser { public User(){...} public User(string userName) (){...} public…
-
1
votes1
answer1497
viewsSystem.Web.Mvc.Web missing, what can I do?
After a few updates, my helpers started giving problems, for example, if I were to use the @Html.TexBoxFor, Razor would never recognize. After doing a lot of research, I was asked to use the @using…
-
1
votes2
answers282
viewsRelate Check Boxes to Radio Buttons
I’m with a project where I have to put occurrences. This is a school project. So the occurrences would be like this: An occurrence would be a warning or a suspension, and its causes, that is, messed…
-
1
votes1
answer138
viewsPreview the data before saving to the database
I’m doing a news site on ASP.NET MVC 5 and the need arose to see the Preview of the news before saving it in the bank. With a action by name Preview I can send the data to her and send it to a View…
-
1
votes1
answer325
viewsChange password Student
In the student environment, they must change their password. I created the code below but can’t get results in the bank. Someone notices something wrong? [HttpPost] public ActionResult…
-
1
votes1
answer502
viewsHow to add an amount sent from an onclick to Ajax date?
I have a table in HTML and in a table column there is a link that opens a Modal. In this modal I register approvals and show who approved and the date of approval (More than one person can approve,…
-
1
votes3
answers542
viewsReceive a Model per parameter in a function
I’m trying to get one Model in a function, which is a step view (although I don’t know if it’s possible) to then generate a list and generate a PDF. My View: @model…
-
1
votes1
answer208
viewsController and View Structure
A help not to do something much more laborious than it can be right away. I have the following classes in my Model: public Pessoa { public int Id { get; set; } public int TipoPessoaId { get; set; }…
-
1
votes5
answers501
viewsHover only on some columns
I have a table with 6 columns, but I just want to give hover in the first 4 columns. It is possible to do this? I’m using MVC 4 and bootstrap I’m already using a method in Jquery: $(".table tbody…
-
1
votes3
answers435
viewsProblem with users when publishing application
I am using SQL Server 2012, and when publishing my application, both on the client server and on my pc everything works well. As connection strings for the BD are correct, everything looks good. Now…
-
1
votes2
answers222
viewsCreating a collection
The two images are as mine array is. In the first image I have an array with 3 items, being the first of the month of April and contains 4 passages. For each passage I have the respective…