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
-
1
votes0
answers26
viewsConfigure string Connection for different environments
I would like to know if it is possible to configure a connection string for two intended environments, for example, the debug and the release. That is, when debugging, the connection string will be…
-
1
votes3
answers1235
viewsProblems with Data and Globalize
When performing the Submit in a form with a date dd/MM/yyyy, the value is converted to the American format in the controller, leaving MM/dd/yyyy. Through the answer of this question, configure…
-
1
votes1
answer136
viewsWCF service hosting with endpoint creation?
I noticed that when running a Rest type project when opening the interface, opens the internet browser is lists all the contents of the folder, being necessary to select the ".svc" when running the…
-
1
votes2
answers344
viewsHttppost action returning null values
I am developing a web system (intranet) to control requests in ASP.NET MVC 4 C#. Below follow my MVC where I have doubt. I am having a great difficulty with the Httppost of a Typed View, which is…
-
1
votes1
answer52
viewsAssign HTML code to a Jquery Alert
I am using this Alert but wanted to insert a text break window.alert("Não existe produto cadastrado no sistema! Para continuar devemos cadastrar pelo menos um produto"); wanted for a line break…
-
1
votes1
answer1406
viewsDisable a button on Asp.net MVC
I am developing an application that manages enrollment in courses, I am still an apprentice at Asp.net MVC, and I have the following question: On my course screen is a "registration" button for the…
-
1
votes1
answer76
viewsHow to create Asp.Net MVC Web Project in Azure?
Yeah, I checked the google, I have given in forums and watched videos, but unfortunately I still haven’t gotten an easy-to-understand tutorial to create a web project on Asp.Net MVC in Azure. The…
-
1
votes1
answer35
viewsTotal sum with Line
I have no idea how to get the Total value = 755.00 of that select with Linq ? | ID |Qtde | Valor | Total | | 1 | 10 | 23.00 | 230.00| | 1 | 15 | 10.00 | 150.00| | 1 | 15 | 25.00 | 375.00| Total:…
-
1
votes2
answers730
viewsHow do I checkbox Asp.net mvc database
Hello. I’m doing a project for a music player. In the Playlist register, I would like the songs to appear in checkbox so I can mark the desired ones and save in the database. This is my controller:…
-
1
votes0
answers30
viewsCreate Partial for Table
I would like to create a partial (to be called as @Html.Partial) by receiving the table id and a data collection. However, it would have to be completely independent. The part of C#, with…
-
1
votes2
answers2725
viewsError: String not recognized as valid datetime
I’m trying to convert a string q I pull from the database with the instruction DateTime PrevisaoDataInicio = DateTime.Parse(reader["PrevisaoDataInicio"].ToString()) And makes the following mistake:…
-
1
votes1
answer359
viewsListing on Asp.Net MVC
Guys, I’m developing an application that manages enrolment courses, on my screen of listing the courses is like this: Only I need to make a new screen with another type of listing, and I would like…
-
1
votes1
answer139
viewsHow to link an Id to Asp.net MVC
Guys, I have a little problem with my application, which is a course manager. The problem is that "student" has to enroll in some course, only I’m not able to make the student’s association to the…
-
1
votes3
answers292
viewsEntity Framework 4 - Migrations error: The ... type is not defined in the <namespace> namespace. Map (Alias=Self)
I have a problem in mapping my application. [EDITED] Follows the Complete Datacontext Class: using System; using System.Collections.Generic; using System.Linq; using System.Web; using…
-
1
votes1
answer500
viewsView does not render on Asp.net MVC
Guys, I’m a beginner in asp.net MVC and I’m already picking up a certain amount of time for a blessed View. According to the help I had in this post Button only works if you pass the ID in the URL…
-
1
votes2
answers119
viewsCalling an Accountcontroller function
I am trying to fetch the logged in user ID this way: public int CurrentUserID() { return Convert.ToInt32(User.Identity.GetUserId()); } This method is in AccountController and I want to call it any…
-
1
votes1
answer546
viewsProblem loading data with Entity Framework using Include
I’m using the Entity Framework with the Mysql on my system and I need to make a specific query that includes a list of a type of Model (ApplicationUser), in this list each returned object has in its…
c# mysql asp.net-mvc entity-framework lambda-expressionsasked 9 years, 5 months ago Luiz Negrini 1,424 -
1
votes0
answers221
viewsError - Only primitive enumeration types or types are supported in this context in Asp.Net MVC
As explained in this link Only constructors without parameters and initializers are supported in LINQ to Entities return View(db.Cursos.ToList().Select(c => new CursoInscricoes(c,…
-
1
votes2
answers150
viewsWhat is the difference between public async System.Threading.Tasks.Task<Actionresult> Index() and public Actionresult Index()?
Follows the code: Example 1 : public async System.Threading.Tasks.Task<ActionResult> Index() { return View(); } Example 2: public ActionResult Index() { return View(); } Please explain the…
-
1
votes1
answer239
viewsInsert indented text in Textarea with Codemirror
I’m making an editor HTML in the browser, where the user can write his script in the Database, I recorded all lines of user code in a single string and recorded in the BD, but how do I bring back as…
-
1
votes2
answers342
viewsFilter for the next 90 days ASP.NET MVC
need to make a filter with Line in an entity, this filter should bring all events for the next 90 days. Today’s example: 11/01/2017 until 11/04/2017 (90 days) _con.SiteContexto.AsNoTracking()…
-
1
votes2
answers147
viewsProblem with a Count in Asp.Net MVC
My application manages courses, on my registration screen I have a field "amounts of vacancies", where, this is decreasing every time a student enrolls in a course. The problem now is that my Count…
-
1
votes1
answer127
viewsASP.NET MVC Error when identifying style file
I posted a website that is at MVC4 at this address. http://acensao-com-br.umbler.net/Login While trying to access I get this error message: "Value cannot be null or Empty. Parameter name:…
asp.net-mvcasked 7 years, 10 months ago Otavio Camargo 361 -
1
votes1
answer6563
viewsUnable to load file or Assembly 'Entityframework, Version=5.0.0.0 or one of its dependencies
I wonder if anyone could help me with this mistake because I’m trying to enable the Migrations in a project and this error appears when giving the command enable-Migrations in the visual studio…
-
1
votes2
answers143
viewsHow to disable Forms Authenitcation for the Web API?
I have an Asp.Net MVC project and inside it has the Web Api, when a request sends an invalid token, Forms Authentication redirects to the login page, but I need it to only return an Http 401 error,…
c# asp.net-mvc asp.net-web-api web.config forms-authenticationasked 7 years, 9 months ago Fábio Lima 81 -
1
votes1
answer287
viewsHow to edit a Boolean field in a list in Asp.Net MVC
Guys, I’m developing an application that manages Courses, and I have the following problem. On my screen Administrator I need the fields Course Name, Student Name and the countryside Approved which…
-
1
votes0
answers138
viewsHow to import an external React component to Asp.Net
Hello, I wanted to import a webpack generated React external component (Bundle.js) into my Asp.net MVC application. I am trying to import the "Bundle.js" file to my page and process the React…
-
1
votes0
answers256
viewsHow to use Postgresql with Entity Framework?
I have a system that I am developing in C# WPF using Postgresql as DBMS and wanted to use this same database for my application in ASP.NET MVC. You can make the Entity Framework have access to the…
-
1
votes2
answers70
viewsHow to fetch a json value from the goo.Gl API to C#
I’m trying to use the goo.Gl API to shorten some links. The problem is I don’t know how to get the generated return json URL. See below how it is organized: { "kind": "urlshortener#url", "id": "AQUI…
-
1
votes1
answer102
viewsProblem with page return according to C#profile
I am trying to return a page according to the user profile registered in the bank. If his profile is "Admin" returns another page. I try with the Administrator profile and it works, already of…
-
1
votes1
answer115
viewsHow to change the list type in Asp.Net MVC
How do I change this kind of listing For this type of list below My View @model IEnumerable<MeuProjeto.Models.AlunoCurso> @{ Layout = "/Views/Shared/_Layout.cshtml"; } <h2>Aprovar…
-
1
votes1
answer1495
viewsWhen opening Solution, folders with projects do not appear
I created a Solution, based on the video of Eduardo Pires. I saved and went to do something else. Well, when you reopen Solution, the folders with the projects do not appear, leaving only the…
-
1
votes1
answer197
viewsMount Regex to change string json
I have the following string, which will actually be treated as a json, stored in a column in the database in my SQL Server: {"PT":"adssadsadsd "asdada"","ES":"","FR":"","EN":""} How do I…
-
1
votes1
answer616
viewsHow to list items per logged-in user in Asp.net MVC
I have an application that manages Courses and I have the following problem, the pupil makes his enrollment in courses, only when the pupil access the page where lists the courses he is enrolled,…
-
1
votes0
answers234
viewsController does not pass route value to View ASP.NET MVC
Based on my previous question: Problem with page return according to C profile# When accessing the system with another user with the "ADMIN" Profile, the controller’s return does not fall into the…
-
1
votes1
answer382
viewsJquery autocomplete
How can I make a jQuery autocomplete to pull data from a database? I tried to use this example only I’m not getting it. My system is in ASP.NET MVC and I am using SQL Server as a database.…
-
1
votes0
answers38
viewsAjax request returns decimal zeroed from SQL
Dear friends, I have an Asp Net MVC5 application that makes use of ajax in both inclusions and selects. The recording of the decimal values occurs normally in the Sqlserver database but the recovery…
-
1
votes1
answer82
viewsDownload View instead of displaying it
there is some way that instead of me returning a view and displaying it on the screen for the user, I return it but instead of displaying it I save the file . html on the computer? The code is as…
-
1
votes1
answer103
viewsASP.NET MVC How to Manipulate Table Users Using Code First
I’m studying MVC ASP.NET code first. I’m a beginner and I have a question probably basic. When starting a project, it already creates a basic application, including the table User. I happen to be…
-
1
votes3
answers494
viewsProblem with a Boolean field on Asp.net MVC
My application that manages Courses has an area of Administrator where he approves a pupil in a course. That one field that Approves a student is a field booleano, I’m just having trouble with this…
-
1
votes1
answer358
viewsDisable event scheduling by fullcalendar
I have a program and have to schedule events by month and by week, I am using the jQuery fullcalendar, I would like to disable the scheduling of events by month. And schedule just for the week.…
-
1
votes2
answers1318
viewsMake one method wait for the end of the other
Good morning, you guys, I am with the following doubt, when clicking a button my program makes to execute 2 methods simultaneously, method of sending email, and method of generating the pdf, it…
-
1
votes1
answer108
viewsTake CSS link with Regex
Good morning guys, when pulling the html of the entire page in string it also brings some reference links: <link href="~/Content/item/item.min.css" rel="stylesheet" /> I already removed the…
-
1
votes1
answer433
viewsLeave HTML.Dropdownlist() in Bootstrap style?
I have a DropDownListin my View and despite having the class form-control the list does not take the style of the Bootstrap. How can I edit the way DropDownList builds the lists?…
-
1
votes2
answers1576
viewsTake the value of a form that has a list
You guys all right? it’s me again, I know I’m asking a lot of questions, but I’m having a few questions and I can’t find an answer, I’m wanting to capture the event of a button in Asp.net mvc using…
-
1
votes2
answers231
viewsEF 6 Code First: Decimal field gives error when trying to save
You guys, good morning. I have a class that has a decimal field where I keep the price. So far so good. When it is displayed in the /Edit/ page, also ta beauty. But here’s the problem: 1 - The MVC…
c# asp.net-mvc entity-framework asp.net-mvc-4 code-firstasked 9 years, 4 months ago Luiz Felipe 456 -
1
votes2
answers1761
viewsASP.NET MVC - How to Change Textboxfor’s "Name" Attribute
You can change the name of the field generated by @Html.TextBoxFor ? I found nothing in Portuguese related to this. I tried something like: @Html.TextBoxFor(x => x.ToDate, new { name = "to" }) If…
-
1
votes1
answer131
viewsUnity and Unitofwork
Salve galera, I created a small project to apply Ioc using the Unity MS. First I always used the concept of Unitofwork just instantiated it into my controllers, But now I want to inject them. When I…
-
1
votes1
answer900
viewsHow to set a session timeout on the web.config
People I need a timeout for my web.config that if the user is not tinkering with the system it expires, if he is tinkering with the system does not expire time. It’s possible to have something like…
-
1
votes2
answers101
viewsProblems filling out PDF fields in Asp.net MVC
I’m in trouble to render some fields from my table in the file PDF. It was working fine, but I don’t know what happened to those fields are no longer rendering. On my screen My Courses, the pupil…