Questions tagged as 'asp.net-mvc-5'

1
answer

Can I edit my router at run time?

I have the route of my area context.MapRoute( "Cadastro_default", "{Empresa}/Cadastro/{controller}/{action}/{id}", new { empresa = Empresa.GetEmpresa(), action = "Index", id = UrlParameter.Optional } ); But it does not...
asked by 20.10.2014 / 20:58
2
answers

Receiving code 200 when it should be 404

I created an ASP.NET MVC 5 application by adding the following code snippets: Web.config <system.web> <customErrors mode="On"> <error statusCode="404" redirect="~/Erro/Erro404"/> </customErrors> </system...
asked by 01.05.2014 / 18:39
1
answer

Find information on more than one table

In my project I currently have 3 tables: Students, Occurrences and Users. In them I have views and controllers . So far so good. My relationships are: Students & Occurrences (1, N) / Occurrences & Users (N, 1). My problem is that in ac...
asked by 14.11.2014 / 03:40
1
answer

How to show the build version?

I see in some pages and systems the build version. I would like to show in a view the build version of my project in ASP.Net MVC     
asked by 31.12.2014 / 19:25
1
answer

How do I get access_token when I sign in with Facebook on MVC5?

When I create a project MVC5 the Visual Studio automatically creates a site for me with a login option via Facebook, Google ... I just need to enable "Startup.Auth.cs" . But it does the direct login and I do not know how t...
asked by 19.12.2013 / 21:40
1
answer

Fluent Mapping or Data Annotations?

I was watching a video lesson on ASP.NET MVC, when I see the Fluent Mapping of the Entity Framework for the first time. Soon I came to doubt. Which of the two is best recommended? Fluent Mapping or Data Annotations ? I really liked...
asked by 30.09.2014 / 03:50
1
answer

How do I make a date annotation, can access value of another property?

I have my following properties: public ETipoPessoa TipoPessoa {get;set;} public string CnpjCPF {get;set;} public enum ETipoPessoa { Fisica, Juridica } I have this condition, if TypePerform = Physical, I need to pass an annotation...
asked by 17.09.2014 / 03:35
1
answer

JS or Jquery Decrease image size and not just resize

Is there any way to reduce the size of the photo before uploading? Note: It is not just a resize, because some test I did was resized and did not decrease the size of the photo. I would like to check if the upload is of type image and Dec...
asked by 26.06.2018 / 13:19
1
answer

ASP.NET path does not receive the parameter in Action after being configured

I mapped a new route on my site like this: routes.MapRoute( "PaymentEdit", "Payment/{type}", new { controller = "Contributor", action = "Payment" }, new { type = UrlParameter.Optional } ); My...
asked by 18.08.2017 / 16:06
1
answer

Form zero values greater than 999.99

I'm going through a problem I've never seen before. I'm hoping someone has seen and can help me. I'm working with asp.net mvc 5, and sending a form via post to my controller. My model: <div class="col-md-6"> <form action="@U...
asked by 17.07.2017 / 21:38