Questions tagged as 'razor'

0
answers

How to leave a maskedbox

How do I leave the values as value in Reais, not a common number. Ineedthesevaluestobe2.00,ifpossible,leave$2.00MyController:publicActionResultAdiciona(AbastecimentoModelviewModel){viewModel.TotalGasto=viewModel.Litro*viewModel.VlrUnit;if(Mo...
asked by 08.09.2017 / 23:48
1
answer

Dynamically hiding a column from a WebGrid

How can I hide a WebGrid column at run time ? For example, I want to hide the Parametro column, it would look like this: grid.Column("Empresa", "Empresa"), if(item.valor1 == X){ grid.Column("Parametro", "Parametro"), } gri...
asked by 14.06.2017 / 20:23
1
answer

ASP.NET Checkbox Problem "The parameter conversion from type 'System.String' to type 'System.Boolean' failed."

I'm having the following problem with a checkbox I have a checkbox list that loads dynamically (depending on the items that exist in the database a checkbox is generated). Currently I have only three items being ids 1, 2 and 3. Inside the sys...
asked by 09.06.2017 / 13:52
1
answer

Error creating a condition in the Html.Raw of the WebGrid

I'm trying to put a condition on a WebGrid line and the following error occurs: Cannot convert lambda expression to type 'string' because it is not delegate type EventhoughI'mbasingmyselfonthispost# with credits from MeAjudaSilvio I...
asked by 14.06.2017 / 05:51
0
answers

The if condition is not accepting in asp.net mvc razor

I want to do an update with a condition, however, it is updating the data without seeing the condition of if using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using BlogWeb.ViewsModels;...
asked by 26.05.2017 / 16:31
0
answers

Error in @ Scripts.Render ("")

I can not render bootstrap, scripts, and so on, since my @Scripts.Render and @Styles.Render does not work. The reference System.Web.Optmization is included in the project. See the image with the reference and the rende...
asked by 24.05.2017 / 21:15
1
answer

Log in with the Facebook user

How do I do a routine in C # or Razor on my site, to instead of the guy only by the login page, have the option to log in for the facebook user? I'm not asking for ready code, just how I do it.     
asked by 16.05.2017 / 23:32
1
answer

How to use ValidationMessageFor in DropDownListFor?

Please can someone tell me how to use the @Html.ValidationMessageFor for a @Html.DropDownListFor? Assuming that the user has triggered the option to save from the system screen he should inform that the field is mandatory; instead, the syste...
asked by 25.04.2017 / 22:58
1
answer

If using load

I have the following function in javascript: $(document).ready(function () { Eventos(); $('[name="dtd1nrob"]').change(function () { BloquearQuestao(); }); }); function Eventos() { BloquearQuestao(true); }; function Blo...
asked by 09.03.2017 / 15:46
1
answer

If Load javascript

I have a following script. There are two checkboxes that will work like two radios buttons, what happens to me, when I click on a checkbox it disables all the questions of the form and also disables the checkbox that was not selected, and when I...
asked by 07.03.2017 / 14:37