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
-
0
votes2
answers722
viewsData validation ASP.NET MVC works but does not display message
Good night! I am having a problem in my project where I am trying to validate with date Annotations and is working, only register at the bank if meet the validations, but the problem is that the…
-
0
votes1
answer32
viewsView Binding for Controller does not work in "disabled" fields
I use the property asp-for in the elements of my View to pass their values to the Controller at the time of post page. <input id="txtExamNumber" asp-for="ExamNumber" class="form-control" />…
-
0
votes1
answer387
viewsRun the Submit of a form in an element click event
What is the best way to perform a POST at the click of a button in an Asp.net MVC form. View Create: @model Projeto.WebERP.EntityFramework.Entities.Pais @{ ViewBag.Title = "Create"; } <div…
-
0
votes1
answer57
viewsError saving to bank
would like a help. When I try to save the records, the following message appears: 23502: null value in column "id" violates not-null Constraint The primary keys are not auto-increment, I’m using a…
-
0
votes2
answers409
viewsAccess denied error 403 when not using https
I created a website on ASP.NET MVC and uploaded my files to my hosting plan. There I am entitled to a free Let’s Encrypt certificate. After activating it, an error occurred: If I access my website…
-
0
votes0
answers32
viewsComposite key navigation
Hello, I have a class with 2 keys composed public class Produto_Empresa { [Key,Column(Order = 0)] public int id_produto { get; set; } [Key, Column(Order = 1)] public int id_empresa { get; set; } } I…
-
0
votes1
answer65
viewsAdd Action and Controller to Beginform’s Htmlhelper with T4
I need to add to my template in T4 the value of action and of controller, but I can’t understand how I can pass their names. Following example: CREATE.cs.T4 @using (Html.BeginForm("Create",…
-
0
votes1
answer188
viewsError using bootstrap with ASP.NET MVC
I have the error when using bootstrap.min.js, the error is that it does not find a function. It follows error below and configuration of my system. You need to post something else so you can help me…
-
0
votes1
answer64
viewsRelationships with the Entity Framework?
Next, I’m modeling the domain class of a system and I’m having a hard time understanding certain things from Entity Framework, so I hope you can help me, aiming that I’m following the idea of Code…
-
0
votes0
answers559
viewsError creating controller using Entity
In my Employee Registration project I have the following folders: MODEL CONTROLLERS DAL VIEWS From the moment I create a controller using the Entity that already creates me right my view he makes…
-
0
votes1
answer397
viewsHow to add 2 Dropzone in the same view
Well I’m trying to add two Dropzone on a screen, one is specific to a file(pdf,doc) and the other is for attachment(doc,pdf,image etc). Below is an example of using Dropzone: @{ Layout = null; }…
-
0
votes1
answer38
viewsIs there any way to load Script or CSS that is placed in Buddles in ASP.NET only in a single View?
Usually when I download the plug-in in Visual Studio in Nuget, it is necessary to put script and css in Buddles however these scripts are loading in all my Views even those that are not using, so I…
asp.net-mvcasked 7 years, 1 month ago Paula NS 33 -
0
votes1
answer47
viewsSendemailasync method does not run
Debugging saw that the method Sendemailasync of controller account does not run and returns no error, it is simply ignored, all the settings are correct userid, code and Protocol. string code =…
asp.net-mvcasked 7 years, 1 month ago user77473 1 -
0
votes1
answer1371
viewscheckbox + Model + Controller. How to pick up selected rows?
I’m sent to my model typed for a view and loaded the data into a table where I enclose a checkbox for each line. The user will select the items that matter to be later saved in the database. My…
-
0
votes1
answer35
viewsRegistering attributes from different classes in the same View
I have a Teacher class that has a User, and I want to register the User fields in the Teacher View. How can I be doing this public class Usuario { public int Id { get; set; } public int Matricula {…
-
0
votes0
answers300
viewsHow to pass the @Html.Dropdownlist value to the controller?
I have a registration modal that I receive 2 values, I use an AJAX to save the information, however the value of @Html.DropDownList does not go to my Controller, the strange is the value of the…
-
0
votes1
answer142
viewsVertical scrollbar in DIV in ASP.NET
I have a form inside the masterpage content2. Is it possible to place it inside a div with a scrollbar in the vertical that descends only the form in question? What’s the simplest way to do that?…
-
0
votes2
answers5083
viewsConvert Datatable to List C#
I need to convert the contents of DataTable for a List, I’m new to C# and I don’t know the syntax. public List < VoCliente > ConsutaCliente() { DataTable tabela =…
-
0
votes0
answers253
viewsNinject - System.Missingmethodexception: No constructor without parameters has been defined for this object
I’m in the wrong; No constructor without parameters has been defined for this object. Description: An untreated exception occurred during the execution of current web request. Examine stack tracking…
-
0
votes0
answers100
viewsCreate Thread for email submission?
I am developing an ASP.Net MVC application and want to create a thread to send emails every 30 seconds. I need this, because my provider does not allow the sending of many emails at msm time, so I…
asp.net-mvcasked 6 years, 12 months ago FernandoPaiva 1,562 -
0
votes1
answer691
viewsBundleconfig does not load all CSS files
I am trying to load the CSS files jquery-ui.css and jquery-ui.theme.css creating a Bundles, but Bundle insists on only loading the standard CSS of ASP.NET MVC which css site.. To work, I always have…
-
0
votes0
answers263
viewsDoubt in html. Viewbag-powered dropdownlist
I’m having the following problem: I need to send instead of the Id of ViewBag, the Municipio, which is contained in ViewBag.Cidades. How Do I Switch from Id to Municipio when I click Search to send…
-
0
votes1
answer162
viewsError treatments 404 and 500
Good afternoon, my question is as I am still beginner in Asp.net and on the DDD still I have a certain doubt which is in which layer using the DDD standard I would implement the 404 and 500 error…
-
0
votes1
answer100
viewsChange database instance
I am doing a project in MVC and my problem is that my database is automatically created in the "localdb" instance, but I wanted it to be created in my instance that I created in SQL Server. Is there…
-
0
votes3
answers687
viewsBundleconfig.Cs is even needed
I’m reading something about MVC, Webapi and Angularjs. All the examples I got, whether from Macoratti or others ask to make some configuration in Bundleconfig.cs. However I use VS2017 and when…
-
0
votes1
answer52
viewsFailed to add the "System.Runtime" reference to Asp.net
I am trying to install the latest "stable version" of Mysql.Data from Nuget package manager. The version in question is 6.10.5. When trying to install, the message below is displayed: Failed to add…
-
0
votes1
answer27
viewsMessage duplication in Chat at the time of the Webinar (client side)
Hello, I have a chat that at the time of the webinar to receive enough customers watching at the time of sending message, the same on the screen seems duplicated, but in the bank not saved…
-
0
votes1
answer108
viewsUpload Video to Youtube with Asp . net MVC
I’m trying to make an integration with Youtube, but I’m getting the error {"The remote server returned an error: (401) Unauthorized."} I released my key api as per the image below and I am testing…
-
0
votes1
answer104
viewsHow to use C# syntax in onclick
I declared a variable in view: @{ int index = 0; } And I want to change it through a onclick: @for (var b = 0; b < cont; b++) { <li> <a onclick="@(Index = b)">Endereço @(b +…
-
0
votes1
answer104
viewsProblem with radiobutton Asp mvc
Good evening ,I am trying popular radio button varis as the value contained in my database ,however I am not able to do. Here’s the view with the radiobutton @model GuialetoLMS.Models.GuialetoModel…
-
0
votes1
answer23
viewsFor with Datetime in Razor giving out of memory Exception
I am having out of memory error, being it caused by this Razor code in my cshtml file, and can’t identify where the problem is. @for(DateTime data = DateTime.Today.Date; data <=…
-
0
votes2
answers312
viewsPopular Graphics with List - Java Script
Hello! I am developing an academic system and I need a chart with the wrong questions by subject of each student. I have a list with Themes (which would be the x axis) and qtdErradas (which would be…
-
0
votes0
answers129
viewsHow to Model Tables to Store Tag
I have an SQL Server database where I have a table of videos linked to various tag s. How is done here in the forum where each post is linked to various tags. Best practice for modeling the…
-
0
votes1
answer195
viewsCreate a list and insert the sheet data into the database when importing
I have a method protected void importar_Click(object sender, EventArgs e) and inside it I check if the file was selected, and validate the file extension. This system is a file import system of a…
-
0
votes2
answers47
viewsForm creation error with Entity framework
There’s a mistake going on that I can’t identify I know that Beginform in Create.html from the Entity framework, has some upload options to overload, one of them is the one I’m using, whose request,…
-
0
votes1
answer315
viewsUsing an existing database
I have a database (SQL-Server); if I connect to it, I still have to create the classes EPH and use a Migration?
-
0
votes1
answer54
viewsMigration from Local BD to Mysql BD
I am working on an ASP.NET WEB page with MVC and I have made all model, control and display settings in Visual Studio 2017 and the same created a Local BD by SQL Server Localdb to store the data but…
-
0
votes0
answers442
viewsError the best Overload for '.ctor' does not have a Parameter named 'throwifv1schema' with Entity
I have an error that is not making me not able to compile the project. I am using Asp.net c# Entity framework code first Error indicates the best overload for '.ctor' does not have a parameter named…
-
0
votes1
answer73
viewsViewmodel parameter being passed as null
I am trying to validate my login form, but the "Modelstate.Isvalid" function is not performing the validation. According to the image above, when executing Action, the "Effectwindmodel" parameter is…
-
0
votes1
answer70
viewsString nonce is not being generated
I’m using the Braintree API and I can put the dropin form of them on the page: var braintreeToken = @Html.Raw(Json.Encode(Model.brainTreeToken)); braintree.setup( braintreeToken, "dropin", {…
-
0
votes1
answer257
viewsProblems when giving Post on a Viewmodel to the Controller - Asp.Net Core 2 MVC
I have a Viewmodel that I use to upload data from a natural or legal person. It contains some properties like Personal Properties, among others, that I use to load my dropdownlists from my view. The…
-
0
votes1
answer124
viewsWhy is my javascript not working in the _Layout.cshtml file?
I’m making a website in Asp.net mvc, and I’m trying to make a very creative menu, for this I already have everything ready that tested in html and css normally ta working, but here in ASP NET MVC…
-
0
votes1
answer35
viewsBeginform with several button in one form
I have form that has several Buttons, 1 to delete via aja, 1 to edit via ajax, 1 to open report and I have 1 button for when it is clicked I wish to do the post form, the button of the post works…
asp.net-mvcasked 6 years, 8 months ago Zica 469 -
0
votes0
answers215
viewsGrab directory to save file
I am developing a system, and in this system, I submit a PDF report from some information, I would like to know, how to open a screen similar to the filedialog, but to select only the directory, so…
-
0
votes1
answer81
viewsHow to quote a message
if(string.IsNullOrEmpty(pessoa.Nome)) { ModelState.AddModelError("Nome", "O campo nome é obrigatório"); } How do I quote inside the message? Ex.: The "name" field is required.…
asp.net-mvcasked 6 years, 8 months ago HeyJoe 819 -
0
votes1
answer651
viewsFilter a NULL type in lambda Expression or Line
Hello, my entity To has a long type attribute that can be NULL making relationship with the entity B, by making a filter with a Lambda expression with this attribute to bring all records that are…
c# asp.net-mvc linq asp.net-web-api lambda-expressionsasked 6 years, 7 months ago Thiago Ubiratan 353 -
0
votes0
answers126
viewsInfinite Scroll in ASP.NET MVC and SEO
Guys, I need to make one Infinite scroll in ASP.NET MVC, but I need to separate the content on demand as suggested by the blog Webmaster Central Blog, so that the Google robot can index my products.…
-
0
votes1
answer299
viewsGenerate table automatically with c# and mvc
how to do the following (I don’t have code yet). On the page, I have a table with a Row and 5 Columns and at the end of Table a button (+) and at the bottom of the table a save button. The question…
-
0
votes1
answer330
viewsWeb chart with c#
Does anyone know of an open source tool for graphing with c#(MVC)? It will be inline graphs and bars.
-
0
votes1
answer380
viewsHow to get value from an Html.Editorfor
I have the following command @Html.EditorFor(m => m.DataDoDesligamento) In it is placed a date, and when clicking on a button should redirect to a report, only that I need to pass the parameter…