Questions tagged as 'razor'

3
answers

Write TimeSpan in full

I want to write a static class (can be Extension ) to represent the value of a structure TimeSpan " in full, in Portuguese. The idea is to always compare the current date ( Datetime.Now ) with the date that the event occurred....
asked by 24.08.2015 / 19:26
1
answer

ASP.NET MVC - Attribute that writes to a View

I need to write a Attribute that writes a mask validation to View. For example, I would like to mark a property in the Model with a [CEP] , write the following in the View: <script type='text/javascript'> $(docu...
asked by 17.03.2014 / 23:59
2
answers

How to create a list of dates with specific day

I'm working on ASP with MVC 4, and I create a list of dates from the data entered by the user. For example, the user enters the day of the month in which a certain occurrence will be made. It also inserts the start date where it will start and t...
asked by 04.02.2014 / 11:19
1
answer

Date problem with globalize.js and jquery.validation.globalize.js. How to solve?

I'm having problems with the date fields of my application. Followingthisresponse,whichIfoundtobethemostappropriate, Error message in datetime field , I set up my ASP.NET MVC application as follows: I installed the jquery-globalize packag...
asked by 28.04.2015 / 15:48
6
answers

Input type="password" with the eye to show password

I need to put a <input type="password"> with that password reveal eye, however it has to work as follows: User clicks on eye and loosens the characters again. Here is a sample photo:     
asked by 04.12.2015 / 16:56
2
answers

What is @ in a view and controller?

I program in PHP and am starting to learn how to program in C # ASP.Net MVC, however I have some questions: What is the @ (arroba) serving in both the controller and the view ? What is the purpose of these { get; set; } calls th...
asked by 05.10.2015 / 18:06
2
answers

Control visibility of view components in ASP.NET MVC 5 controller

I am refactoring a project in ASP.NET MVC 5, implementing some good practices and researching, it was mentioned that the use of if in the view (razor) is not the best practice, but I use it to show or hide some components (fields) according to t...
asked by 21.09.2015 / 15:40
4
answers

List all Roles in CheckBox and mark the roles that the User has

I am creating a User Management System in Asp.net MVC 4 with two Simple Tables. Users and Roles. I can create the users normally by selecting the Roles that they will have. At Edit time I'm trying to list all the Roles in CheckBox and c...
asked by 19.02.2014 / 16:25
2
answers

How to put a @ inside {} in MVC

When doing a page in MVC5 with Razor, I put the following code {--conteúdo da @ RenderBody() etc, etc } Generated an error because @ is inside braces ERROR: Server Error in '/' Application. Parser Error Description: An error occu...
asked by 30.04.2014 / 20:41
1
answer

How to export an HTML / C # (Razor) page containing SVG elements for PDF?

I'm currently working with Highcharts, a javascript library that generates graphics. It has an export component, but only exports the graphic itself, I still need to assemble the PDF layout. For export it goes to the highcharts.com server whi...
asked by 24.01.2014 / 12:53