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
answers7
viewsPDF with link in the body of the text, not opening
Oops, I have an Asp.net mvc application where I use Filecontentresult to render a PDF, however when the user adds a PDF that has hyperlinks inside it, like www.google.com, the system shows the…
asp.net-mvcasked 3 years, 2 months ago Zica 469 -
0
votes1
answer41
viewsQuery n:m using the Entity Framework
My problem with doing a "Many-to-Many" query. Receiving a View ID. In other words, I receive an id from the selected framework. 1 Catechesis has a list of parishes and 1 Parochia has a list of…
-
0
votes1
answer44
viewsProblem in a dropdown
I have a very strange problem with my dropdown. When I load Submit this error appears: There is no Viewdata item of type 'Ienumerable' that has the key 'Diocese'. but I believe that the mistake is…
-
0
votes0
answers48
viewsTextbox problem for autocomplete
I can not enter the method that makes the query to return the nomes and the id´s of the person. View: <script type="text/javascript"> $(document).ready(function () { });…
-
0
votes3
answers805
viewsPicking text from a particular column with jquery
Good afternoon. I need to take the value of one DropDownList in a given table column. This would be the table: @model IEnumerable<Santander.Web.MVC.ValidacaoGanhadores.Models.Ganhadores>…
-
0
votes1
answer1502
viewspass jquery data to the controller and return values
I need that when textbox loses focus, pass the value you have in it to my controller, in my controller I will return an object to jquery, so I can fill in the other fields. I wonder how I could do…
-
0
votes1
answer48
viewsIs it possible to two Ubmit a button?
Possible, within one click the call of two Ubmit? Here’s my problem, I need inside a button, to be called two Actionresult in sequence. Follow what I’ve done so far:…
-
0
votes1
answer143
viewsHow to format Webgrid Currency column?
How to format the column Valor of Webgrid ? Example of 3000,000 for 3,000.00 ? @grid.GetHtml( tableStyle: "webgrid", headerStyle: "header", alternatingRowStyle: "alt", selectedRowStyle: "select",…
-
0
votes1
answer775
viewsMVC - How to load a template html page, modify it and send it by email
I am making a form that sends an email to the customer, this email comes from a template depending on the client’s stage. Ex: Estágio 01 envio o e-mail com a body vindo do modelo_01.html, se o…
-
0
votes1
answer94
viewsJquery code does not call Method in the controller
I’m not sure how to use a method jQuery. I want to get a list of countries. Follow the code to help you know where I’m going wrong. < script type = "text/javascript" >…
-
0
votes1
answer349
viewsMulti-user authentication with ASP.NET MVC and . NET 4.5
I am developing a system where there is a need for two types of users, the client, which will access only the frontend, and the administrator, associated with the backoffice. I need these users to…
-
0
votes2
answers1031
viewsHow to call an Html.Action("my page") via jquery?
I have a page that loads several partials views, I want to call in a modal a specific page that will fill the entire screen. I am using a generic jquery command to call an action that will be passed…
-
0
votes0
answers464
viewsHow to load Partialview via Javascript
I have an Asp.Net MVC project where there is a method that returns a PartialView: [HttpPost] public ActionResult MinhaAction(int param1, int param2) { // ... // Código // ...…
-
0
votes1
answer32
viewscall a locally designated variable
I need to call a variable that is empty, but how to do it? I created the following code public ActionResult Index() { cliente cliente; try { cliente = db.cliente.find(id); //etc } catch (Exception…
-
0
votes1
answer962
viewsHow to send data from a dynamic HTML table via json
I need to do something similar to the code below: Here I create the htmla table dynamically: $('#btnIncluirContato').on('click', function () { $('#tblContato tbody').append('<tr id=' +…
-
0
votes1
answer2049
viewsDisable button while form is not valid
I need to disable one button to be saved when all fields are validated, the following code: button is always being disabled, but would add a condition to change only if it has been valid in the…
-
0
votes0
answers420
viewsTrust Level error when publishing MVC application
I need to publish an ASP.NET MVC application on a Locaweb server. But when publishing, the server displays the following message: I tried to tag <securityPolicy> <trustLevel name="Medium"…
-
0
votes1
answer48
views0.. 1 to 1 modeling in the Entity Framework - Error The Entity or Complex
I’m trying to make a query but returns the error: Additional information: The Entity or Complex type 'WMB.CieloB.Model.Cielotoken' cannot be constructed in a LINQ to Entities query. My consultation:…
-
0
votes1
answer223
viewsJquery datatable appears with the result of previous searches when filtering
I have a search page made in ASP.NET MVC that has the data loaded in a table using AJAX and jQuery Template, to not need to reload the page after the search. Follow the example below: function…
-
0
votes1
answer385
viewsUpdate , Insert into Entity Framework Using View?
I have a mistake in my project when trying to give a Update or a Insert via the Entity Framework, where view database. I read in English stackoverflow that I can’t perform update or Insert via view…
-
0
votes1
answer242
viewsError using EF6 Codefirst with Mysql
I have the following error when running Migrations: How can I fix it? I have everything installed. Follow me Web.Config: <connectionStrings> <add name="ProjetoCultContext"…
-
0
votes1
answer332
viewsJoin several values of type Iqueryable
I am receiving an array of values from my View with the days of the week. Sunday, Monday, etc. I want to compare this array with a string type attribute of my database and store it in a "Iqueryable"…
-
0
votes1
answer186
viewsError while writing data from some tables via application
I have an application in Asp.net mvc that, among other functions, registers personal data of customers. We recently switched the database access from one server to another, which has a copy of the…
-
0
votes0
answers112
viewsUpdate all open tabs in the brownser of an aspnet application mcv c#
Hello. I am developing an application and wanted when a user login or login to update all tabs that the application has opened in the browser. Example: User João is logged in to the tab 1. User…
-
0
votes1
answer974
viewsWhat is the [Httpget] statement for?
In a certain method of mine Controller raised in the Asp Net MVC, I learned that I could put the statement [HttpGet]. In other cases, as in my models, I realized that can be put too [Length(10)] and…
-
0
votes1
answer148
viewsFluent API Zero-to-one Relationship 0-1 - Bringing Results From Another Relationship
I’m trying to make the relationship between my Cliente and the CieloToken, tried with Fluent API and Data Annotation, I mixed them together and it didn’t work. In fact it executes, but even if the…
-
0
votes3
answers548
viewsSave image to desktop with html2canvas
How do I save the image to the desktop or some other folder on the user’s machine ? I took the very good example of how to generate the image and save to a server folder here: Take Screen print and…
-
0
votes1
answer814
viewsDelete Cascade with Entity framework
I have the following situation: my database is Mysql, when I try to delete a record directly in the database, from this message: Cannot delete or update a parent row: a foreign key constraint fails…
-
0
votes1
answer37
viewsShow elements according to click
In my view I have 5 partials that should be rendered. I needed that when clicking one is shown and the others are hidden... Is in this structure: <ul class="nav nav-tabs"> <li…
-
0
votes1
answer98
viewsSave multiple data from text boxes with equal names
In my project I have a rule that is to save several fields with the same name at once. Today, the registration works, but only one field, and that’s not what I want.. I need that when clicking to…
-
0
votes1
answer98
viewsError generating Email Confirmation Token in Asp.MVC
I made an application that uses the Asp.Net MVC login system. I have tested locally the sending of the token for e-mail confirmation and it works perfectly, but when I went up to Azure in the Webapp…
-
0
votes1
answer1720
viewsAssign href via jquery
I have an element in my Layout and I’m trying to set href via jquery, but it won’t. The condition is in my index. Follows the code: Layout <div class="three wide column dindex"> <div…
-
0
votes2
answers88
viewsAction Edit in Viewmodel
Well, I’m trying to implement the action of editing the data of a viewmodel that I own in my project. I even put together an action, but it’s not working... What happens is that what I researched,…
-
0
votes1
answer259
viewsCreation of Foreignkey
Well, in my project I decided to use some Foreign Keys. And after getting this error : {"The INSERT statement conflicted with the FOREIGN KEY Constraint "Fk_dbo.Setors_dbo.Areas_setorareas ". The…
-
0
votes0
answers49
viewsError when trying to insert data from a mixed table
I’m starting an MVC project and I’m having a problem that I can’t fix. [Table("InfoGeralEmpresa")] public class InfoGeralEmpresa { [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage",…
-
0
votes1
answer739
viewsEntity Framework List
I am created to action of Edit to edit my data models. What happens is I use Viewmodel to "join" several models in a. Okay, I can get the data from models who are not List<>, that is, the…
-
0
votes1
answer56
viewsError while Logging In
I created a View here to log into my system, but in part of ModelState.IsValid just call me back false, I don’t know why, someone could help? My code of View is as follows: [HttpPost]…
-
0
votes0
answers334
viewsSemantic Modal UI Submit Window and Form Validation
I have a modal window using the semantic UI framework, I can easily use Helper @Html.Beginform it validates 1 field, but not the others. I need to do this validation via jquery when I do Submit…
-
0
votes1
answer52
viewsShow Datareader return date in View?
I have a form where I have at View: <div class="col-md-2 form-group"> @Html.LabelFor(x => x.CLIENTEDESDE) @Html.TextBoxFor(x => x.CLIENTEDESDE, new { @class = "form-control", type =…
-
0
votes1
answer167
viewsDoubt with Viewbag, loading information for editing
I’m with a mistake, when I go to make a record, I upload the information this way: //lista var tbuscarCategoria = new CadastroCategoriaAplicacao(); var listarCategoria =…
-
0
votes1
answer202
viewsError rendering Partialview in a View
I have a View and within it I want to render a Partialview. What happens is that the partial is of a model different but that has relationship between them. I want to show a partial as if it were…
-
0
votes1
answer344
viewsError while editing Viewmodel data
In project I have a Viewmodel and inside it my models and everything. What happens is that I am trying to edit the data that is already saved in the database. I can bring the edited data from the…
-
0
votes3
answers1454
viewssending email by smtp
I made a class that has the following code to send an email: try { WebMail.SmtpServer = "smtp-mail.outlook.com"; WebMail.SmtpPort = 25; WebMail.EnableSsl = true; WebMail.UserName = "meuemail";…
-
0
votes1
answer115
viewsActionresult and async method Using Fastmapper, Typeadpter Error
I have the following problem with Fastmapper. When implementing an Actionresult async when using Typeadapt it cannot perform the asynchronous conversion, would anyone know how to do the conversion…
-
0
votes1
answer274
viewsEntity Framework Code First. How to generate two banks from two projects, with the second project using classes from the first
Personal talk! I have a question regarding Entity Framework 6. I have two projects A and B, A being a shared core. It has some classes as Parents, State, City, Address etc. In Project B, I have some…
-
0
votes0
answers120
viewsError uploading an html page
Good afternoon, I have a problem when I go up an html page on the server, I created this project in mvc5 c# and use Filezilla to move things up the server when, the part I did was a popup and when I…
-
0
votes1
answer334
viewsMVC - Keep Partialview loaded when Modelstate is not valid
I have a simple registration screen that, when selected new record, is opened a modal (which is a partialview in the project) for the user to inform the fields for registration. The view call is…
-
0
votes0
answers247
viewsUpload - the process cannot access the file because it is being used by another process
I am trying to build a file manager, but I am finding a problem when updating the file. First I do the upload file, and after that, if the user wants to update, I have the option to update, where…
-
0
votes1
answer893
viewshow to get the value of a specific checkbox in Asp.net mvc using Jquery
I have a table on an ASP.NET MVC system that each record has a checkbox, here’s the code below the view: <table class="table table-hover table-striped" id="tabelaProdutos"> <thead>…
-
0
votes1
answer243
viewsTake an Httppostedfilebase and convert to Cloudfile (Azure Files) to avoid writing the File to the Server
Good people, I have the following problem. The controller receives an Httppostedfilebase and sends it to Azure and for that I need to write to a temporary folder. I would like to know a more elegant…