Questions tagged as 'asp.net-mvc'

2
answers

Object attributes coming null in Query

Would anyone know to tell me why in my query, the attributes of the COR object, are coming null? I make that same query for Sizes, and it brings me the result waiting. but when doing the same query, for the class Color, it finds the objects, how...
asked by 09.11.2018 / 06:34
2
answers

How to produce JSON in the format that Flot expects?

Doubt on how to serialize to return this JSON. I'm using the Flot library ( link ) to present a chart. I can generate the graphics. In my view I'm using it like this: $.ajax({ url: '/graficos/GeraTesteFlot', metho...
asked by 17.07.2014 / 21:28
1
answer

MVC Insert text into a label when the button is selected

I try to fill in a label when I click a button. I created a method, a label, and a button. The purpose is that by pressing the button, the label is populated with the data I receive. I have almost everything functional, but when I click the b...
asked by 19.12.2018 / 13:48
1
answer

Get value from a field in the view in a controller [closed]

From the answers here, I could not get it. I have this view @{ ViewBag.Title = "ExcelFinancing"; Layout = "~/Views/Shared/_Layout.cshtml"; } <!DOCTYPE html> <html lang="pt-br"> <head> <meta name="viewport"...
asked by 18.09.2018 / 20:16
1
answer

File download with mvc is giving a stick

I did several searches on the net to find a way for me to generate a spreadsheet and save to disk. As it comes to the web, this can only be done via download, and all examples searched (at least for me), I fall into FileResult . Turns out it'...
asked by 18.09.2018 / 17:06
1
answer

How to make the Controller get the "LinkText" Text from @Html.ActionLink

In my application there was a need to make the same Controller called Classification have the Reclassification function, so I want the ControllerClassificar to get the string LinkText @Html.ActionLink to be able to cont...
asked by 14.08.2018 / 23:15
1
answer

Highlight current page link

I'm implementing a menu in the header of my page. As the user clicks the buttons on this menu, the page is rendered just below. I would like to highlight in the menu the button for the current page of the user. I'm calling it this way: <...
asked by 19.06.2015 / 18:32
1
answer

How to mix parameters within an ASP.NET Html.BeginForm

I have the following Html.BeginForm (Do not take into account if it is incorrect is a legacy code and I can not refactor this now). using (Html.BeginForm("Confirm", "Download", new { ContributorID = "exemplo"}, FormMethod.Post, new { id...
asked by 23.11.2018 / 22:50
1
answer

Condition if with required ViewModel

I wonder if it is possible to use an if for required in a ViewModel. For example I have these two variables: [Required(ErrorMessage = "O campo {0} é obrigatorio.")] [Display(Name = "Insc. Estadual")] public string InscricaoEstadual {...
asked by 24.09.2018 / 14:38
2
answers

Pass JSON.stringify to Controller

I'm trying to pass a table via JSON.stringify, in ajax, it's receiving the data perfectly, but I can not get into the controller. I'm passing this way: function enviarDados(produtos) { $.ajax({ method: "POST", url: '@Url.A...
asked by 23.08.2018 / 14:48