Questions tagged as 'razor'

2
answers

use of distinct in a dropdownlist

I want to remove equal names from my dropdownlist, but they are from different id's. I wanted to where I would have to deploy the code if it would be in the view, or in the controller somewhere else. Data in the table: Andthat'swhatthedropdo...
asked by 24.11.2017 / 18:30
2
answers

Sending Model to Controller via Ajax

I have a strongly typed View with a small form and a javascript function with ajax usage: function emitir () { $.ajax({ type: "POST", traditional: true, url: '@Url.Action("EmissaoRapida", "CND")', data: { mo...
asked by 10.11.2015 / 17:10
2
answers

Dropdownlist Menu ASP.NET MVC 5

I need to change the menu to apply a Dropdownlist, but I'm having difficulty. I'm following the steps of the bootstrap site, but when you click the submenu does not appear, follow the code below: <body> <div class="navbar navbar-inver...
asked by 24.09.2015 / 21:30
1
answer

Display popup asking for authentication when clicking on screen component that is not allowed to change

How to create a mechanism for when the user clicks to try to change a date that is as datepicker and display a popup for authentication or something like that to make this change? If he has permission, he can, otherwise he can not. &...
asked by 27.08.2015 / 16:22
1
answer

How to get type of user in view?

I have an Asp.Net MVC project that uses Individual User Account with Owin . Everything is working perfectly, but I would like to get the user type ( role ) in View . Home I'm using Request.IsAuthenticated to know if the use...
asked by 08.06.2015 / 15:19
1
answer

HTML tags for Razor Engine (asp.net mvc C #)

I'm having trouble with my web application with asp.net mvc, how to create forms using the Razor Engine. Below is my HTML code. <form class="o-form" method="post"> <input name="senderName" id="senderName" required="required" t...
asked by 03.01.2015 / 15:02
1
answer

AjaxBeginForm Replace does not work

I am using Ajax.BeginForm to update a specific div on the page. When submitting and executing the action, instead of updating this DIV, the page is updated with the partial view returned from Action. I use this same snippet of code in ano...
asked by 09.10.2014 / 16:55
1
answer

Error in foreach

Good evening guys. I have a project for a school that records student data and its occurrences. going straight to my problem: What happens is that I have a page where to show the new occurrences that were generated in the system by a Partial tha...
asked by 26.07.2014 / 01:22
2
answers

How to render html passing as controller string to the view?

I have the following view: public ActionResult RelatorioEquipe() { ViewRelatorioEquipeDTO dto = new ViewRelatorioEquipeDTO(); dto.LstUnidadeGerencial = negocio.Relatorio.ObterLstUg(); dto.LstExercicios = new Exe...
asked by 04.06.2014 / 22:54
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