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

1
answer

What is the Order = parameter in the Authorize attribute?

What is the Order parameter in the Asp.NET Authorization%% Attribute? How do you use it?     
asked by 14.10.2014 / 17:55
2
answers

View condition does not work

I'm checking if my ViewBag comes up something Then I do the following: @if (ViewBag.Itens != null) { foreach (var item in ViewBag.Itens) { <div class="col-md-6"> <div class="checkbox">...
asked by 30.09.2014 / 22:53
1
answer

Change font size using @Html.Label

How do I assign a font size and colors using @Html.Label ? I know that if I use htmlAttributes I can use: @class = ... I get via css. But I wish I could do it without using CSS. How?     
asked by 15.05.2014 / 22:47
1
answer

Wrong JSON format web api

I'm having trouble returning json on my mvc 5 api. In the Get method it returns a string in this format: public string Get() { return "{\"data\":[{\"Codigo\":\"AAAA\",\"Finalidade\":\"AAAA\"},{\"Codigo\":\"AAAA\",\"Finali...
asked by 13.05.2014 / 05:05
3
answers

Remount date with javascript

In my database I have a DateTime field. In my form I have three combos for: Day, Month and Year. I have a JavaScript function which serializes the information, sending them to my controller to record. It turns out that the date is coming null. I...
asked by 19.03.2014 / 21:04
1
answer

How to register a default user at the beginning of the application?

In an ASP.Net MVC application I need to have a standard user registry and for this I am thinking of adding it at application startup. In the Global.asax file I did the following: public class MvcApplication : System.Web.HttpApplicati...
asked by 27.09.2014 / 19:01
1
answer

Passing parameters by jquery through a table

a doubt: I have a table and in it two columns, which are: CNPJ and Razão Social . Well, I need to do the following: When I click on the CNPJ column, for example, I should pass the value of CNPJ that is being clicked an...
asked by 30.06.2014 / 21:53
1
answer

How to disable the Zip Mask to save only the Digits numbers when doing a Post - Asp.net MVC

I'm using a Remark component that has a data-plugin="formatter" in which to apply a zip mask in field . The field has size of 8 characters, but with the mask it gets 9 because of "-" (Ex: 29780-000). When saving the re...
asked by 12.12.2018 / 23:58
1
answer

How to pass a parameter along with the Model to a PartialVIew when rendering it

To create some fields dynamically, I'm using a for and rendering. When calling Partial _Contact, I would like to pass the value [i] of the index of for so I can sort the fields. It's not working ... You're giving the page error ... does anyone k...
asked by 23.10.2018 / 23:52
1
answer

MVC Helper Menu

I'm having a hard time putting together a Helper to mount the system menu This is my view @model IList<Devcompy.ClientWeb.Devcompy2.Helpers.HierarchyNode<Devcompy.Models.Entities.Segurancas.Menu>> <!-- Navigation --> <n...
asked by 20.12.2014 / 15:18