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
answers44
viewsSave xml file directly to the client and not to the server
I have an XML file, which can be created, is altered, and can be deleted, but wanted to save it on the machine the client is using, and not on the server, it is possible ? This is one of the ways I…
asp.net-mvcasked 5 years, 10 months ago Mariana 2,512 -
0
votes1
answer59
viewsHow do I activate Timespan with a set time
I wanted to do a Timespan set, like this from 8:00 to 8:10 and after 16:00 to 16:10 he keeps sending a message that I created, outside of these times is not to appear. var startTimeSpan =…
-
0
votes2
answers100
viewsDropdown field increment
Well, I have the following problem. I have to use a Javascript or Jquery function to add new fields to fill and save in the database. In these fields I have to use a Dropdown, but I don’t know how…
-
0
votes1
answer36
viewsHiddenfield in aspx to cshtml
I have a doubt about hiddenfield in aspx we use the following command: <asp:HiddenField ID="HiddenField1" runat="server" /> And for cshtml it is possible?…
-
0
votes1
answer244
viewsPersonal Field Login to Identity
Personal A doubt that however seemingly silly I did not find in any article that talks about Identity. How can I customize authentication features to use email as the user name instead of using…
-
0
votes1
answer55
viewsImport codes for reuse in Asp.Net MVC
I made this image class 1, and I wanted to reuse, import the whole class to be in the marked place of image 2, so I didn’t have to change on all pages whenever I want to update something.…
-
0
votes1
answer75
viewsDifference between "==" and "=="
I was developing a code javascript and I saw that the compiler accused error in the equality that I did at that time, but there was no error in the execution. I would like to know the difference of…
-
0
votes1
answer32
viewsHow to use Dropdownlistfor
In an archive .cshtml need to put a Dropdownlistfor<>. It would be populated by a virtual property, which is a foreign key in this Model. It would be this on .cshtml: <div…
-
0
votes1
answer39
viewsAsp net mvc project integration with sql server
How can I connect visual studio with sql server galera? I made a registration screen, but I have no idea how to make my site send this data to sql server?
-
0
votes1
answer197
viewsVisualstudio 2017 hiding some folders in Solution Explorer
I created an ASP.NET MVC project and at the root of the project I created two folders "Map" and "Connected". They appear manually opening the project folder, but in Visualstudio’s Solution Explorer…
-
0
votes1
answer29
viewsChange scaffold C#generated controllers
Good people, I was studying about Entity Framework and saw that there is the scaffolding tool that generates a complete CRUD with controllers and views. My doubt is that if I can change the logic of…
-
0
votes1
answer855
viewsLocation and maps
Hello, I will work on an application that I will have to work with localization and maps, basically the user will inform an address and will appear to him nearby locations, so I wanted to know +-…
-
0
votes0
answers37
viewsC#, Visual Studio ASP NET Core
I don’t know what I did with my Visual Studio, but when I create a new file in ASP NET Core MVC it doesn’t create the controllers and etc. Besides the error that appears. Thanks for the help!…
-
0
votes1
answer51
viewscharset does not work
I’m trying to return a Viewbag in dialog, it even works, but does not support the accents Code: <script type="text/javascript" charset="utf-8"> $(document).ready(function () {…
-
0
votes0
answers23
viewsHow to keep the data entered in the View when we change page and return to it
I’m trying to make an application where the user on a page has multiple multiple choice questions, he marks the radio and changes page. If he returns to the page again, these options he has marked…
-
0
votes0
answers83
viewsShow Difenrentes Div with Foreach
I have a Home page that lists Projects, each div has a different class from the other, for example, the first project, shows an image, which is in a div that has a class col-lg-6 col-md-12…
-
0
votes1
answer162
viewsHow to pass properties of another model?
Problem: I have an index that uses a model of the type: @model IEnumerable<projeto.Models.classe1> I need to access some properties of classe 2, my classe1 being Ienumerable, how can I access…
-
0
votes0
answers50
viewsError 405 Method not allowed Asp.net web-api
While trying to delete the record, I get this message, all other operations is working. The code: //http://www.sistemaguardiao.com.br/webapi/api/AspNetWebApi/deletar/jogo/4512/5…
asp.net-mvcasked 8 years, 10 months ago itasouza -
0
votes1
answer65
viewshow to take value from an autocomplete and send to the controller (AJAX)
You can receive the chosen value from a field and use this value in a variable in the controller? This is my field: <div class="form-group hidden" id="idnome" > <label>NOME…
-
0
votes2
answers115
viewsHow do I call two models in one view?
Good morning people, I’m new to Asp so my knowledge is very low, could you help me with this question? I have a query view that already has a "BOOK" model, and in this same view I intend to leave a…
-
0
votes2
answers58
viewsException Handling at MODEL
How do I send an exception of the Model to View in the form of an Alert, for example MODEL : Try { // codigo }catch{ // Aqui quero tratar o erro e mandar uma mensagem pra ser exibida na view em…
-
0
votes0
answers85
viewsQuery with reading data from a web api using Angularjs
I have a web api made in Asp.net, I have a script that reads this data, but I’m not sure how to do the other methods. I am posting the code of the script is html that at the moment is running only…
-
0
votes0
answers30
viewsType Datetime incorrect format /Date(1566916268000)/ how to solve?
The return of the Dt_start field returned from the Database is correct: 26/08/2019 11:08:10 But not in javascript is like this: /Date(1566916268000)/, see: $.each(response.listar, function (index,…
-
0
votes0
answers84
viewsError message when creating new Controller with Entity Framework
I’m new to the ASP.NET MVC and I’m having a problem. When I try to add a new Controller using Entity Framework gives an error saying: error when running the selected code generator: value -1 is out…
-
0
votes1
answer325
viewsDoubt with Microsoft version . NET Framework Asp.net mvc
Doubt, am I using the wrong version? The image shows Version Information: Microsoft . NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34274 On my hosting server says this: ASP, Asp.NET…
asp.net-mvcasked 8 years, 10 months ago Harry 3,805 -
0
votes1
answer56
viewsProblem in View (details)
I am repeating the Letterpress in the View, how can I use the ". first" in the query in the controller? Error in the View: http://i.imgur.com/7t8AOJI.png? 1 View(details): @model…
-
0
votes1
answer224
viewsHow to receive a decimal value per Querystring in Asp.net?
I have a form that sends some data, I want to receive this data but one of them is a value, is coming without the correct formatting. @using (Html.BeginForm("GravarDados", "Aposta", FormMethod.Get))…
asp.net-mvcasked 8 years, 10 months ago Harry 3,805 -
0
votes0
answers34
viewsWhy use Asp.net core DI Container in conjunction with Onconfiguring the Entity Framework?
In many projects I realize that people tend to pass the Connection string both by dependency injection and optionsBuilder in the overlay of the Onconfiguring method.... What’s the point of using…
-
0
votes1
answer129
viewsChange name and surname in a string
I work with an API that returns the last name to me first after the name and I need the reverse as the name reads ( in my case is a Book Author ), the return I have is ( Ex.: Bragança, Luiz Philippe…
-
0
votes0
answers42
viewsError trying to register Asp.net MVC CRUD system
I’m trying to make a Crud with Asp.net MVC, I already created the Views, but when I click the Create button I get this information: It follows my classes: Model using System; using…
asp.net-mvcasked 5 years ago wmazoni 43 -
0
votes1
answer56
viewsReturn amount Asp.net MVC
I have a model with category, Deposit, Date, Amount, I need the Amount add all the deposit that exist in the database and returns in the View, I did the following, only it didn’t solve. public async…
-
0
votes1
answer113
viewsWhat is the difference [email protected] vs 'Asp-controller' next to 'Asp-action'?
I am doing a project in ASP.NET MVC and I came up with this question, The Url.Action in a 'tag' (for example in a navbar) can redirect the page passing the method and controller as parameter.…
-
0
votes1
answer59
viewsIs CQRS login in Command or Query?
Hello, I will do Login in hand (would not use Identity or any other lib or service) I am using CQRS, I wonder if I should put the Login as Command or as Query, given that there will only be a logic…
-
0
votes0
answers38
viewsHow to make a history
Hi, I have a question and I don’t know how to begin to resolve it. I’m using the Asp.net mvc and I have to create a history table, where it makes a copy of a certain part, even if I delete the…
-
0
votes1
answer478
viewsSession issues in MVC application using Actionfilters
I have a problem in my application ASP.Net MVC, on authentication. Let’s go through steps: 1) I have my login screen /Login/Index simply log in, if found in the database MySQL, and starts the…
-
0
votes1
answer108
viewsHow to pass a string as a parameter in Action
I need to pass as a parameter a string where it returns all items that have the same name. Here he is returning Null. With Id it works perfectly. [HttpGet, ActionName("Search")] public async…
-
0
votes1
answer52
viewsC# Applications. Net MVC how to share login
Hello, How to integrate applications developed with C# . NET MVC, with a single login? Save the proportions, what I look for is something like what happens when accessing gmail, then turn on…
-
0
votes1
answer608
viewsContent loses formatting when viewing the Asp.net mvc print
I have a page for printing, it was made with bootstrap, I would like to keep the layout with the same formatting, I am doing this way: thanks <script> function cont(){ var conteudo =…
-
0
votes1
answer56
viewsView data on a C# ASP.NET search screen
Bring information to the View() Everybody, good afternoon. I have the following difficulty: I have a search screen of a Helpdesk and I need to display the database data, which is a list of calls,…
-
0
votes0
answers30
viewsASP.NET Signinmanager error
I have error in Visualstudio in Signinmanager. private readonly SignInManager<Utilizador> _GerirLogin; I have another private readonly to be used and have no mistake: private readonly…
asp.net-mvcasked 3 years, 11 months ago ChrisAdler 1 -
0
votes1
answer1642
viewsError Filling Dropdownlistfor There is no Viewdata item of type 'Ienumerable
I have an error in passing the contents of the controller to the view, I am doing so, Viewbag is being filled with the data. In my application I select the items: public List<TB_EMPRESA>…
asp.net-mvcasked 8 years, 10 months ago Harry 3,805 -
0
votes0
answers25
viewsHow to take data from a table and pass in a View
I did this Action and I need to send to a View when creating an internment need to put which patient intern.…
-
0
votes0
answers13
viewsFile Recovery after Deforestation
I have a project where I needed to upload what I had to the Azure cloud then did the process of removes Mapping to map again, when I went to see, after this procedure, one of the report Reports did…
asp.net-mvc visual-studio windows-azure report team-foundation-serverasked 3 years, 10 months ago Andrey Cadilhe 11 -
0
votes1
answer140
viewsDeploy Asp Net MVC
I have deployed a simple website that is still in development, the address is http://www.datussistemas.com.br, but I don’t know how to solve the problem that happens when I try to access it. Someone…
-
0
votes1
answer30
viewsProblem to query inside the second Dropdown
Always enter ajax error: error: function (ex) { alert('Failed to retrieve vigararias.' + ex); } Screen error: Failed to Retrieve Vigararias. [Object Object] View: <script…
-
0
votes0
answers8
viewsChange in ASP.net Deploy project without the original project
I have a project done in Asp.net, and in production has only its Deploy running, and the solution generated by the project’s Visual Studio is corrupted, and I need to change a database configuration…
-
0
votes1
answer17
viewsSelectpdf Error C#
I am using the or Selectpdf to convert an HTML string into local pdf works perfectly, but the empirical error shows the following error. I’m using an IIS server. All production . ddl’s are on the…
-
0
votes0
answers17
viewsaspnet-codegenerator does not find the Generator 'controller'
when I try to turn the command: dotnet aspnet-codegenerator controller -h I have the following return: Selected Code Generator: controller No code generator found with the name 'controller'. No code…
-
0
votes1
answer931
viewsGrab the selected item from the Select2 plugin and make a Submit
How to get the selected item from the Dropdownlist plugin Select2 (https://plugins.jquery.com/select2/), and send to a Controler via an Submit button ? CANVAS CONTROLER public ActionResult…
-
0
votes0
answers16
viewsPublication Razor ASP . NET MVC with problem
When I publish my web application in IIS via Visual Studio Community 2019, direct from my workstation, at the moment I access it through the browser of the attached message. But when I delete the…