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
votes1
answer2461
viewsBootstrap - How to increase the size of the input column?
Follows the code: On the index page: <!-- Modal --> <div class="modal" id="minhaModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div…
-
1
votes1
answer494
viewsPass value of equal properties, different classes
I need the next one I don’t know if you can do, so the question, I have two classes and in these two classes I possess exactly equal properties, as follows the examples: public class Cliente {…
-
1
votes3
answers1521
viewsCannot implicitly Convert type 'string' to 'int'
protected void btnSave_Click(object sender, EventArgs e) { List<ProdutoAmortizacaoCreditoDias> aDay = new List<ProdutoAmortizacaoCreditoDias>(); ProdutoAmortizacaoCreditoDias ee = new…
-
1
votes4
answers922
viewsHow to make a combo With the days of the month?
What is the best way to make a combobox with the days of the month? That means the combo has to be from 1 to 31 days. On the HTML side I have a label called "drpDia", and I need to load this label…
-
1
votes1
answer114
viewsDate validation
I’m doing a function of ExcelToEntityList, i.e., import Excel data into a list, but need to validate start and end dates. I’m doing it right? The function: public…
-
1
votes1
answer475
viewsSend data from a partial view to a MVC controller
I want it to be rendered a partial view corresponding to the value of select option. Index.html @{ ViewBag.Title = "Index"; } <h2>Contato</h2> <form class="form-horizontal">…
-
1
votes1
answer430
viewsSpend Tempdata
Good afternoon guys I’m having the following problem, I need to pass a variable to another controller and I’m trying to do this by Tempdata, follow the code: var user = User.Identity.GetUserId();…
-
1
votes0
answers213
viewsASP.NET MVC on linux (mod_Mono, apache)
I’m trying to run my ASP.NET MVC application on a Centos 7 system. After installing mono and checking that I can run using XSP, I’m having trouble setting up mod_mono on apache. Currently giving the…
-
1
votes1
answer1044
viewsConvert Html to readable text using MVC C#
I have a text in the database like this: Example only: <ul> <li><strong> asdsdasdadsdadsa <em>asdsd asdsdasdasdad</em></strong> <table border="1"…
-
1
votes2
answers154
viewsExplanation in constructor method
I have some questions about the method of constructing a class that I am seeing as an example, if anyone can explain thank you. private static IList<Categoria> categorias = new…
-
1
votes0
answers449
viewsUnexpected fault. System may be momentarily unavailable or a point error has occurred
I am researching to develop a facilitator of consulting notes tax Nfe Fazenda site, so that the recipient can consult and download. I created a requisition GET bringing the captcha to use the site’s…
-
1
votes1
answer404
viewsFullcalendar C#
I would like to open a modal when clicked on a day in the calendar. script: <script> $(document).ready(function () { $('#calendar').fullCalendar({ header: { left: 'prev,next today', center:…
-
1
votes0
answers129
viewsiTextSharp PDF coming blank
Good afternoon guys, I have the following code: public void GerarPDF(long id) { string HTMLemString = RenderizaHtmlComoString("~/Views/item/item.cshtml", id); var regex = new…
-
1
votes1
answer425
viewsGet href HTML attribute in C#
I have the following code in a Razor view: <div id="HTMLreturned" class="row"> @Html.Raw(ViewBag.HTMLreturned); </div> <script> var nrLinks = 0; $(".enlacesMas >…
-
1
votes1
answer200
viewsDropdownlist filled and selected
I need to fill in a @Html.Dropdownlist() with my Model parameters and pre-select one of the items. At Model I am receiving the complete package, being: List of products on Produto and the items…
-
1
votes1
answer187
viewsHow to use Pnotify inside the angle
i have the following code and I want to use Pnotify to give notifications when the user and/or password is incorrect or/e white mandatory field. How do I? Remember that I am using Asp.net mvc and…
-
1
votes1
answer50
viewsWhat a good practice for using Modelbinders in MVC
I’m looking to create a page using best practices in ASP.NET MVC. I was in doubt what would be the best practice for me to model my page using modelbinders to "bindar" my object automatically. In…
-
1
votes1
answer104
viewsIs it more correct to use the Master-Detail concept?
I have a situation that I would like to use the most correct (elegant) way to implement. The scenario is as follows: I’m building a Helpdesk system where Tickets are stored in one table (and…
-
1
votes0
answers140
viewsGenerate a PDF of a Morris Graph
I’m developing an application that generates a report using Morris charts (https://startbootstrap.com/template-overviews/sb-admin-2/) The graphics are working properly, now I need to generate a PDF…
-
1
votes1
answer1244
viewsOptional Entity Framework include
I have a great deal of doubt here about Include of the Entity Framework. var ocorrencias = db.Ocorrencia .Include("Pessoa") .Where(c => c.Id > 1000).ToList(); I used the Include, because I…
-
1
votes1
answer613
viewsJavascript load Partialview passing a Model
I need to call a Partialview in my Javascript but I’m not sure how. I’m using a plugin that in the TARGET variable gets a Div. And this in my case, this Div I put being a Partial View. My JS is like…
-
1
votes1
answer149
viewsThe Viewdata item that has the key 'Fabricanteid' is of type 'System.Int64' but must be of type 'Ienumerable<Selectlistitem>
I am trying to develop an application in ASP.NET MCV 5. This excerpt is returning this error message. @Html.DropDownList("FabricanteId", null, htmlAttributes: new { @class = "form-control" })…
-
1
votes0
answers264
viewsPowerpoint.dll (HRESULT exception: 0x80010001 (RPC_E_CALL_REJECTED))
Error description: Component COM Class Factory Recovery Failure with CLSID {91493441-5A91-11CF-8700-00AA0060263B} due to the following error: 80010001 The call was rejected by the call. (Exception…
-
1
votes1
answer428
viewsSave Token to User Machine
I made an integration with the GoogleDrive and by doing all the authorization on the consent screen, it creates a token in the appdata user, however I put this application in Azure in a VM. Only…
-
1
votes1
answer33
viewsError 500 when downloading an xlm via iframe;
Good afternoon, I have a WEB application with EXTJS with the option to export a report in XML format through a POST via ashx, currently one of the clients that has this application is reporting a…
asp.net-mvcasked 7 years, 7 months ago Lucas Luan de Melo 87 -
1
votes1
answer428
viewsConsuming web api with various models
In that question of mine Doubt Verb GET Webapi I face some mistakes because of relationships. But now taking it as a basis on account of my models, how could I consume this service? Because the…
-
1
votes2
answers120
viewsC# MVC how statements work
I have the code below, and to call the Session that stores the user data, only once I want to put it in the controller statement. Doubt The variable usuarioLogado is by request or it may happen that…
-
1
votes1
answer279
viewsASP NET MVC with Jquery
I made an ajax request, but it does not call the controller, when debugging javascript never falls in Success and the console appears Error in XML processing. Controller: [HttpPost]…
-
1
votes1
answer171
viewsHow to keep option after refresh - Asp.net
I have a select, some options and a jquery code that in select change, updates the screen with the data of the chosen option. The question is, how do I maintain the option after window.Location?…
-
1
votes0
answers61
viewsStart Async function
Good morning guys, I don’t have much knowledge about async, and maybe someone could help me with this: public async Task<ActionResult> IndexAsync(CancellationToken cancellationToken) { var…
-
1
votes1
answer743
viewsUpload to Drive
Personal have the following code, which opens the google consent screen, where the user authorization is made and generated an authentication token: public async Task<ActionResult>…
-
1
votes1
answer79
viewsConvert View to Controller Values
I need you to byte[]Descricao, when sent to my view displays the text as string for the user to manipulate within the TextArea, when I click in saving need to be converted again to byte[] for that…
-
1
votes1
answer637
viewsChanging values in Modal - C# MVC Javascript
I have the following javascript code in my project that picks up attribute values when the user clicks the class button rename and calls a modal: <script type="text/javascript">…
-
1
votes2
answers1601
viewsUse more than one template in View - C# MVC
I have two tables in my bank: Celular and Marca. To register a mobile phone, I need to select a brand for it, ie two models in a view. Like I do to make two Models are accessed in the same view?…
-
1
votes1
answer55
viewsT4 to SQL . NET error
When trying to generate sql code based on edmx you are showing this error Severity Code Description Project File Line Suppression State Error Running Transformation: System.Nullreferenceexception:…
-
1
votes1
answer179
viewsresize an image and then save to mysql
From a form I want to resize an image only after and then save in mysql, or take an image already saved in mysql and resize it and then update the record. I really appreciate it if someone can help…
-
1
votes1
answer180
viewsAdd parameter using Pagedlist in logging detail and page links
Does anyone know how to keep a parameter between the various pages of Pagedlist? The situation is as follows: I used the Scope_Identity when creating a row in a table, because I did the Id of the…
-
1
votes1
answer69
viewsHeritage Mapping Type per Type Asp.Net
In my project, I have a type of heritage that I have mastered by TPT. Analyzing the documents and several examples I can’t identify where I’m going wrong, because the mapping is apparently correct,…
-
1
votes1
answer430
viewsRetrieve Ienumerable values from View
I have a table/model called Itemtabelapreco: public class ItemTabelaPreco { public string Nome { get; set; } public decimal ValorUnitario { get; set; } public int QtdPacote { get; set; } public…
-
1
votes0
answers20
viewsRecover Ienumerable Value in Post
Good morning, I created a request for help on this before and it was marked as duplicate and some who tried to help me, but I think they misunderstood what I’m struggling with. I have these two…
-
1
votes1
answer295
viewsHow to return several values of a class?
Follows code: Controller: public ActionResult teste1(int num1, int num2) { // Aqui quero obter os valores da variável model1 e model2 da classe MyClass var result = MyClass.Teste2(num1 , num2); }…
-
1
votes2
answers276
viewsDropdownlist with Begincollectionitem
Goodnight! Could follow in this same question here, but it would be too long. As it may be another subject I decided to open another question. I got everything right as per the best answer, but…
-
1
votes1
answer2126
viewsLoad a table dynamically with ajax
I am trying to build a table by making a request to the server and populate it with the return. The server return is correct, but when you enter the function(data), I realized he carries my entire…
-
1
votes1
answer120
viewsAsynchronous Method Blocking Queue
I’m using MVC and so I approached asynchronous methods for Actions in Controllers in order not to block access to other pages of the site while a long-term process is taking place. However, I have…
-
1
votes1
answer68
viewsHow to add data using Begincollection and Partialviews
I was able to do the system with data insertion with Begincollection and Partialviews as per seen in this question. Continuing the same, as would the editing part of the data registered in the…
-
1
votes1
answer44
viewsRemove multiple protocol authentication
Hello, I am implementing the MVC with Asp.Net Identity, however, I’m having some problems... Setting: I’m logging in from protocol HTTP, everything enters normally. When I try to access any page…
-
1
votes3
answers7999
viewsUpdate Error with Entityframework
When I try to update an object in the database, I get the error, Store update, Insert, or delete statement affected an Unexpected number of Rows (0). Entities may have been modified or Deleted Since…
-
1
votes1
answer99
viewsPublishing site on IIS gives debug error
I have a little strange problem. I’m developing a website MVC on VS2013, I have a website IIS configured for my project. So I make Publish of my website for the IIS, then when I launch the debug…
-
1
votes4
answers54
viewsDoubt about the use of the VS2015 SPA Template
I need to do a routine to send email, through a form I made, using the VS2015 SPA Template. I put two buttons, Cancel and Send. The question is not in the code of the email, but how to assign the…
-
1
votes2
answers1386
viewsAccess client-side biometric reader - ASP.NET MVC - WEBFORMS
Galley, I developed an ASP.NET MVC application, using a webforms page, which is called inside a MVC page. Because only from there I was able to load the SDK Dlls, to send requests to a biometric…