Questions tagged as 'asp.net-mvc'

1
answer

Execute the submit of a form in the click event of an element

What is the best way to do a POST at the click of a button on an ASP.NET MVC form.    View Create: @model Projeto.WebERP.EntityFramework.Entities.Pais @{ ViewBag.Title = "Create"; } <div id="bannerMessage"> </div> | @Ht...
asked by 29.08.2017 / 02:34
0
answers

How to create composite key and ensure the same property in 2 model

I have 3 models public class UnidadeNegocio { public int Id { get; set; } public string Nome { get; set; } } public class Cliente { public int Id { get; set; } public int UnidadeNegocioId { get; set; } public string Nome {...
asked by 10.09.2017 / 00:42
1
answer

Run Modal Open Script in Ajax. W#

Problem: I'm in the view index, it has a button that opens the Create view on a modal screen, on that modal screen I want to execute a javascript code, but for some reason it is not running. I'm opening a modal view with the following code:...
asked by 23.08.2017 / 20:04
0
answers

Composite key navigation

Hello, I have a class with 2 composite keys 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 wond...
asked by 04.09.2017 / 15:45
1
answer

Same partial view within several modal popup

I have content that is inside a partial view. There are situations where I need to open popup's that only change the buttons and their actions. But the content is always the same as partial view . I believe that when rendering the page, th...
asked by 22.08.2017 / 15:13
0
answers

Is there a performance difference between returning image in Controller or View?

I just learned how to fetch and display an image from the database. I was able to do this in two ways: First: Through an ActionResult in my Controller: public ActionResult RetornaImagemDoBanco(int id) { byte[] imageData =...
asked by 22.08.2017 / 19:35
0
answers

Problems with the .NET Framework version

I have an ASP.Net MVC 5 application and WebApi, in .NET version 4.5.2 and post them to my FTP server I get the following error (image at the end of the post) And asking the company's technical support, they answered the following:    Start...
asked by 18.08.2017 / 20:48
0
answers

Returns value for an Action

I have a form with the following input. <div class="form-group"> <label class="control-label col-md-2" for="nome">Logradouro</label> <div class="col-md-10"> @Html.EditorFor(model => model.endereco.Logradouro, new {...
asked by 22.08.2017 / 21:48
1
answer

Error finding file: roslyn \ csc.exe

I was using Visual Studio 2017 normally in an MVC project when it asked to update some packages via nuget. When doing this, the application no longer wanted to compile and displays the error below:    The file 'D: \ OneDrive \ VisualStudio...
asked by 14.08.2017 / 23:40
2
answers

E-mail sending C # The remote name could not be resolved

I'm testing the application's email sending for a password recovery option, I tested it several ways, including email from another domain and hosting, and everything works fine, I tested it with email from gmail and everything works fine , more...
asked by 19.08.2017 / 05:09