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
votes0
answers58
viewsCarousel Bootstrap disappears Asp net
Good evening, I tried to find the answer of that my doubt in the forum and did not find. I have a website developed in Asp.Net MVC and on the home page I have a bootstrap Carousel. Carousel works…
-
0
votes1
answer135
viewsJavascript onClick event does not work with data-modal - Asp.Net Core MVC
I have a Datatable in my Index where the lines are loaded using Javascript. The Edit, Details, Delete and History buttons are created together. They all open in a modal window (the modal block is…
-
0
votes0
answers157
viewsManipulating TXT files with MVC
I’m developing an MVC app, see below: Registrorep.text 000185000|3|13072016|2357|12942973988 000185001|3|14072016|0000|127396685 000185002|3|14072016|0800|12519046076…
-
0
votes1
answer123
viewsPopular a View with values in the ASP.NET MVC model
In the Index Method I can set values in the model and initialize my VIEW with predefined value. But when I do the POST for the START method, when I change the Aquedica property, the value is not…
-
0
votes1
answer945
viewsjava.lang.Nullpointerexception error when sending data to a web service
I have a webservice where I’m sending some data. The return of the service is returning me this message below, in the integration manual, says it would be an internal error, wanted to understand if…
-
0
votes1
answer24
viewsCreate new file by discarding current XML lines C#
I have an XML file like this: <?xml version="1.0" encoding="UTF-8"?> <Message> <MessageId> <ServiceId>SolicitaLogon</ServiceId> <Version>1.0</Version>…
-
0
votes1
answer70
viewsLogoff after editing a User Role
I am working on an Asp.net-mvc project and would like to force the user logoff after editing a role belonging to the user, using Asp.net-Identity public async Task<ActionResult> Edit(string…
-
0
votes1
answer189
viewsHow to Replace XML C#
I have a method that receives some parameters, I would like to replace some xml information, at the moment I can only remove and add new information private void CriacaoDoConfirmarLogin(string…
-
0
votes1
answer311
viewsMD5 Asp.net MVC encryption
I have to do an encryption in a web application. I am using the following method to encrypt the password. // Criptografa a senha public string GerarMD5(string Senha) { // criptografia MD5 MD5…
-
0
votes2
answers94
viewsCreating a foreach as a result of an Entity query
Hello, I’m trying to foreach a query result, the field I need is a string, but at the time I step into the foreach it’s being transformed into another value. I need to compare two dates, in case the…
-
0
votes1
answer227
viewsASP.Net and C# - Reducing dropdown options according to current date
On my client’s website, I have a dropdown list with the months of the year. Unfortunately, the value property has months written instead of numbers. <asp:DropDownList ID="ddlMesReajuste"…
-
0
votes1
answer63
viewsWhen injecting a controller dependency, Postman returns error
By doing it in mine Controller: [Route("api/[controller]")] public class OptOutClientController : Controller { IOptOutService _service; //Se comentar o construtor dá certo public…
-
0
votes1
answer254
viewsChange only edited columns
In an application I am developing, when trying to update only the fields that were changed the Entity Framework is also changing the fields that do not need. Repository code: public void Update(T…
asp.net-mvc entity-framework asp.net-mvc-5 entity-framework-6asked 6 years, 5 months ago Matheus Daumas 37 -
0
votes1
answer391
viewsWith email attachment via ASP.NET application
I already have a method in my controller that sends email. Now you need to contemplate attachments (all attachment types, jpg, pdf, doc...); string strPara = Request.Form["email"]; string strDe =…
-
0
votes2
answers43
viewsBy sending Form the Attachment is coming null. ASP.NET
When you submit the form, everything in the controller arrives filled, except the file that is attached. Where is the error? Controller: public ActionResult EnviaEmail(string destinatario, string…
asp.net-mvcasked 6 years, 5 months ago Danielle Arruda torres 1,191 -
0
votes3
answers172
viewsModal Bootstrap window does not display styles in components - Asp.net MVC
I have a problem that I haven’t been able to solve in months! I’m using a package of bootstrap and JS styles, in which they refer to my _Layout. On all pages that are rendered and inherited from the…
-
0
votes1
answer223
viewsLoad select via ajax
I am trying to load a select via ajax, following as I am doing: HTML: <select id="cbplanos" class="form-control"></select> Controller Code: public async Task<IActionResult> Load()…
-
0
votes1
answer145
viewsLoad input text after select
I have a select that is being populated via ajax, when opening the modal, I call the function that loads the select, and it is working perfectly. But I need a cascade effect, in the first field, and…
-
0
votes0
answers120
viewsThe Viewdata item that has the key 'Categoryid' is of type 'System.Int32' but must be of type 'Ienumerable<Selectlistitem>'
When I Create a New Subcategory I Have the Following Error: The Viewdata item that has the key 'Categoryid' is of type 'System.Int32' but must be of type 'Ienumerable'. Classes that are using:…
-
0
votes0
answers51
viewsInner Join core.net
I’m needing to make a Join Inner to load into a table, if it were without Join Inner I would do it this way: PessoasServicos = await _context.PessoasServicos .Include(m =>…
-
0
votes1
answer25
viewsStay with input text filled after changing view Asp.net
I’m in the following situation I have a view with a certain field, when clicking a button it calls a certain view, it would need that when clicking a button of that other view, it called this…
-
0
votes1
answer122
viewsError while Updating using Entityframework Core
I have a layered project using DDD and am having trouble updating a record of my Personal class. public Task Handle(UpdatePessoaSituacaoCommand message, CancellationToken cancellationToken) { if…
-
0
votes1
answer71
viewsJavascript problems in ASP.Net MVC applications - Minification failed
I just upgraded my system on the server, and so I went to do the first tests and this agreeing the following errors in my Javascript scripts /* Minification failed. Returning unminified contents.…
-
0
votes2
answers186
viewstype’T' must be a Reference type in order to use it as Parameter 'Tentity' in the Generic type or method
When trying to make a query using Iqueryable, I get the following error: Error 3 The type’T' must be a Reference type in order to use it as Parameter 'Tentity' in the Generic type or method…
-
0
votes1
answer44
viewsMaps in . NET CORE, Fluent API - property . Hasforeignkey with error
Good afternoon! I’m starting to develop a system in. net, kind of in Brazil, so I’m learning as I build, but some mistakes are not yet clear for me I have the following code: //boat class public…
-
0
votes1
answer61
viewsConfiguration of server Asp
good afternoon. I’m venturing into an Asp server, only I’m lost in its configuration. Like php dev, I put an index.php in an Asp server hoping it would work, but it didn’t. Looking more on, I…
-
0
votes1
answer1167
viewsUnable to load type'<Projectname>. Mvcapplication 'when duplicating project
I duplicated my project in Visual Studio as follows: 1° I entered the filesystem and gave CTRL C + V in the briefcase SiteTeste which is the project folder. 2° I renamed the folder to Siteteste2 and…
-
0
votes1
answer163
viewsAjax with Antiforgerytoken does not pass the data
I’m having trouble putting the AntiForgeryToken on my date of json. Follow the code that I pass the information from my data to the controller hassle-free. var todos_servicos = { ServicoFornecedor,…
-
0
votes1
answer200
viewsLoad data from one action to another
I have a Action HttpGet, where that Action receives two parameters, dataInicial, and dataFinal, this generates a report, in the same Action. only that I would like to send this data (List), to…
-
0
votes0
answers26
viewsDoubt Select MVC . NET
I am making an index, to bring the employee and the classification that he is, but if I do so, it appears to me the id of the classification, and not the name: @foreach (var item in…
asp.net-mvcasked 6 years, 3 months ago Mariana 2,512 -
0
votes1
answer122
viewsHow do I perform select list list from the view for the Controller?
I have the following code in my view: @using (Html.BeginForm("DataAniv", "Mailing", FormMethod.Post)) { <div class="form-group"> <label for="sel1">Selecione o mês:</label>…
-
0
votes1
answer67
viewsAsp.Net configure routes of multiple mvc projects
So I can understand how this multi-project MVC architecture works in a Solution. How to communicate (a link) from one project to another within the same project? For example, I would like in the…
-
0
votes1
answer149
viewsAsp.net MVC form, no modal call after data validation
I tried to make the modal call through Viewbag, but to no avail. I made a Debugg to see how was the process and in the final step that would appear the modal informing the user that "contains…
-
0
votes0
answers110
viewsGroup with Lambda, ASP.NET MVC
I have a question here. I have a action which receives two parameters, two dates. This generates a list, but in this list, the same item is repeating. wanted to be able to make a sum of money. For a…
-
0
votes0
answers135
viewsRecover Partial View values for Parent View
I’m developing a screen in Aspnet Mvc where I have an index screen that has a model called Parametrizacaovm and on that screen I have a partialView that displays the drives (which is a…
-
0
votes1
answer33
viewsWhen I delete the model name is not shown
I did an action to delete and delete, but View delete does not show the value of the field, which comes from the model. This is cshtml: @model TreinamentoCrud.Models.Cidade @{ ViewBag.Title =…
-
0
votes0
answers337
viewsInner Join problems on Dapper
I have the following problem, when I make a Inner Join in 3 tables the Dapper does not bring me all the columns of the 3 tables but only the one of my father table Inner Join ( or is the first table…
-
0
votes1
answer148
viewsHow to save information(Cpf) from an Edit with mask and a numeric field
In the bank I have the CPF field of type bigint. In the model it is a long. This is what was requested in the requirement. Well, in the model I’ve been using a Datatype.Text to accept the mask, but…
-
0
votes1
answer464
viewsHow to add include by expression in Repository Pattern C#
I am creating a Repositorybase (Repository Pattern) with Entityframework Asp.Net Core, and in it I am creating a Where method, where I pass a Where expression of the entity. So far the method works…
asp.net-mvc asp.net entity-framework include repositoryasked 6 years, 3 months ago Nicola Bogar 123 -
0
votes1
answer132
viewsDecimal field displays a . 0 on the screen
I have a CPF field that is decimal(11). Well, when I show on the grid the CPF it looks like this: 12345678911.0, as I can remove the . 0? My Viewmodel public class FuncionarioViewModel { [Key]…
-
0
votes1
answer140
viewsObject Reference not set to an instance of an Object - MVC
I am loading a table, and doing the debugging, it brings the data perfectly, but when I get the data of the table reference in the foreign key, it is returning me the following error:…
asp.net-mvcasked 6 years, 3 months ago Mariana 2,512 -
0
votes1
answer63
viewsQuestions to resize with ASP.Net application
I am developing a web report (ASP.NET + BOOTSTRAP) and when opening it on mobile phone it is as follows: I’d like to resize those lines to the end or else take out the side lines, would that be…
-
0
votes0
answers439
viewsRequest.Querystring was detected in the Asp.net MVC client
I have a problem when the user confirms an email by the standard Asp registration. The user receives a link in html format and clicks on the link and the user gets an error from the application…
asp.net-mvcasked 6 years, 3 months ago Roberto Luiz Teixeira Rocha 71 -
0
votes1
answer487
viewsMake the Bootstrap modal Footer display the vertically aligned buttons at the bottom - Asp.net MVC
I have a modal window that is generic and is used to perform CRUD operations. I have a grouping of buttons that need to be aligned to the left and should always be glued to the bottom of the modal,…
-
0
votes1
answer90
viewsHow to reduce TABS spacing with view corners using CSS - Asp.Net MVC
When I insert a tab into my view, there is a very exaggerated spacing with the edges of the page inside the modal. I’m using a framework called Remark, but I believe it can be solved with CSS. Does…
-
0
votes1
answer65
viewsWhere it doesn’t work when listing all records - Entity Framework
I need to return all records containing the branch informed using the clause where, only that the Entity Framework is returning all records ignoring what is in the where. Where am I going wrong?…
-
0
votes1
answer381
viewsModal opening under another modal
I have two modals, one I call inside the other, but it is getting below. Just like I’m doing: First I open this: <div class="modal fade" id="myModalAdd"> <div class="modal-dialog">…
asp.net-mvcasked 6 years, 3 months ago Mariana 2,512 -
0
votes1
answer79
viewsProblem with customErrors configuration ASP.NET MVC 4
I need to set up a generic error page for my site, added the following code in the web config: <system.web> <trust level="Full" /> <customErrors mode="On"…
-
0
votes1
answer53
viewsError showing SQL server Sum in DAO layer
I’m struggling to show the result of SUM in the DAO layer, the query brings the expected result, however, in the field where it is to show the sum, it does not show an error. The process in Sql…
-
0
votes0
answers51
viewsInclude Dynamic Table in Viewbag
I include the table data dynamically in AJAX, and it works perfectly to include in the table, what happens is, now I need the table data in the controller, and for using . NET CORE, I CAN’T GET THE…
asp.net-mvcasked 6 years, 3 months ago Mariana 2,512