Questions tagged as 'razor'

1
answer

Hide a column from a WebGrid

Good afternoon. I have a WebGrid and would like to leave a column invisible. How could I do that? This is the grid: @{ Layout = null; WebGrid grid = new WebGrid(Model); } @grid.GetHtml(columns: new [] { grid.Column("ID_PARAMETER"), gri...
asked by 18.05.2015 / 17:29
1
answer

How to internationalize Enum values?

I have the following code in the Model: public enum Lista { [Display(Name = "Lista_regular", ResourceType = typeof(Mensagem))] Regular = 0, [Display(Name = "Lista_irregular", ResourceType = typeof(Mensagem))] Irregular = 1 }...
asked by 17.04.2014 / 04:06
1
answer

Partial does not render

I have a problem with my application. What happens is that I am not able to render a partial in another view. Here is the partial code: @model CEF01.Models.Ocorrencia @using (Html.BeginCollectionItem("Ocorrencia")) { @Html.HiddenFor(mo...
asked by 15.05.2014 / 01:54
3
answers

Characters "'" and "f" appear in the textbox, how to correct?

We are using MVC5, I put a field @ Html.TextBoxFor a Jquery function that does not allow the insertion of letters, however whenever the user types the characters "'" and "f", they are inserted and deleted in the act, the other characters are oka...
asked by 26.11.2015 / 20:12
2
answers

View Razor for PDF

I need to convert Views from my MVC 5 application into C # using Razor to PDF. I've already tried it, and the free tools depend on iTextSharp, which I researched has a different markup. But I need to convert any HTML page to PDF, that is, con...
asked by 18.08.2014 / 21:55
0
answers

Views do not recognize @model, @ViewBag, @ViewData

I'm using Mono 5.10.1 and Visual Studio Professional for Mac (Version 7.5.4 build 3) Views do not recognize tags like @model, @ViewBag, and @ViewData, either in old projects that were originally created in Visual Studio 2017 Windows, or in a...
asked by 30.07.2018 / 14:18
4
answers

Line break in bootstrap

I'm making a form, and I have the following code: <div class="row"> <div class="col-md-6"> @Html.EditorFor(model => model.Nome) </div> <div class="col-md-6"> @Html.EditorFor(model => model.S...
asked by 16.07.2015 / 14:56
2
answers

Help in javascript and asp.net mvc

In my project I have a field that is the Status of a given occurrence. That is, whether it is pending or resolved. I made a function in javascript that, when clicking the input field that is in readonly mode, changes the background. I mean, if t...
asked by 02.06.2014 / 20:16
2
answers

Display layout only when view is not loaded via ajax

In my project, I'm developing so that the application works even if the user is disabled or unavailable. If JavaScript is not available, I load the page normally. If it is available, I load some of these pages in modal so that the flow is...
asked by 14.03.2014 / 21:02
2
answers

How to make a user helper logged in Asp.NET MVC 4?

I need to implement a Helper for logged in user, ie a static class that returns information about the logged in user of context . The idea is to use information in both Controllers and Views .     
asked by 22.05.2014 / 00:38