Posts by Lutti Coelho • 196 points
15 posts
-
0
votes1
answer71
viewsA: Html.Beginform error with area
When using Asp.net Core avoid using the framework Taghelpers. Instead use the new Razor syntax, which makes the code clearer and more stable. Ex: <form asp-controller="blog" asp-action="salva"…
-
0
votes3
answers269
viewsA: How to search and save a single field?
Honestly I prefer the @jbueno answer, which uses EntityFramework.Extended. But how you use system.data.linq.datacontext I don’t know if it applies. As I mentioned in the comments, you can use a…
-
1
votes1
answer56
viewsA: I cannot load a View after calling $.post
Ajax requests do not automatically redirect. And their javascript function is not receiving the return of the action. If your intention is to redirect the user to another page. You should change…
-
1
votes1
answer1752
viewsA: Performing the Submit Form using C#
If html contains input __RequestVerificationToken <input name="__RequestVerificationToken" type="hidden"…
-
0
votes1
answer55
viewsA: Search in visual studio
Create an Action that takes an int variable as a parameter. Create a method to filter clients and pass the variable provided in Action as parameters. Return found customers to your View. Example:…
asp.net-mvcanswered Lutti Coelho 196 -
0
votes1
answer60
viewsA: Doubt with customization of routes Asp.net mvc
In your controller you will need to create an action that gets the name of the category and the product as parameters. Ex. public ActionResult Exibir(string categoria, string produto) { var…
asp.net-mvcanswered Lutti Coelho 196 -
1
votes1
answer472
viewsA: How to add/remove items within the Cart
In your menu you should create a link, or post to "~/Cart/Additionsmall/@idProduct". According to your code, this will add the item in the cart (if it doesn’t exist) or increase the amount of this…
-
0
votes1
answer42
viewsA: Doubt with Handleerror Asp.net mvc
This error occurs when the expected parameter is a primitive type, i.e., it is not nullable. One of the ways to avoid this error is by making the parameter nullable. public ActionResult…
-
0
votes2
answers4351
viewsA: Doubt how to format value using Chart JS chart
When working with more than one dataset, should use the option multiTooltipTemplate instead of tooltipTemplate. Ex. multiTooltipTemplate: function(data) { return formatar(data.value); } I’ve updated…
-
0
votes1
answer94
viewsA: How to format mvc helpers according to my Bootstrap layout?
You can pass the parameters as htmlAttributes. To do this, use the overload @Html.ActionLink("texto ancora", "Action", "Controller", new { htmlAtributtes }) Example: @Html.ActionLink("Perguntas",…
-
0
votes2
answers1043
viewsA: ASP.NET Identity and mapping Many to Many (Fluent API)
From what I understand, you are working with two EF contexts in the same database. A context for Identity and another for the rest of the application. I also use this approach, since the function of…
-
1
votes2
answers117
viewsA: Error publishing site Asp.net mvc 4
This error happens when there is more than one Controller with the same name. If you use the Areas feature in MVC automatically a Home Controller is created in the new area and this can already make…
-
1
votes1
answer119
viewsA: Asp.Net MVC with two views and a URL
Depending on how you are loading the tags via javascript, I don’t see why change. But, there is another way to do it. It would be using @Html.Action("action", "controller") in place of…
asp.net-mvcanswered Lutti Coelho 196 -
1
votes1
answer266
viewsA: Problems with IF in javascript
Beginner. I agree with Gypsy, the ideal is to make an ajax request to the server and check whether the course is available or not. Before going into detail about how to do this, it is worth…
-
1
votes2
answers303
viewsA: How to resolve ASP.NET MVC URL ID?
Silva. As I do not know exactly what is the business rule you need to apply in this case. I’m going to show you three ways to treat what I understand to be your problem. But I can already tell you…