Questions tagged as 'razor'

1
answer

Text-Align of a Label only

On a ".cshtml" web page I have several labels declaring the form-horizontal class and the control-label class. By default, these classes align right in my project, ie .. implement the text-align: right property, but I need to change the val...
asked by 16.05.2018 / 18:41
1
answer

How do I assign a default date value to a TextBoxFor?

I have the following TextBoxFor @Html.TextBoxFor(model => model.data, "{0:dd/MM/yyyy}", new { @class = "form-control", @alt = "date", @placeholder = DateTime.Now.Date.ToString("dd/MM/yyyy"), @maxlength = "10", @data_val="false"}) As you...
asked by 24.05.2017 / 21:42
1
answer

How to create a View for screens smaller than X

I have a MVC4 site, which is not responsive, and changing its entire implementation just to make it responsive does not seem productive at all because it's a site where many people worked and there's a lot of " give me life My idea was to cre...
asked by 25.05.2017 / 21:52
2
answers

DropDownListFor selected values do not persist

I'm using ASP.NET C # with mvc 4 and in my View I have a DropDownListFor, with a class I used from bootstrap-multiselect, as in the image: Andthecodeintheview:@Html.DropDownListFor(m => m.Estagios, (IEnumerable<SelectListItem>)Model...
asked by 02.08.2017 / 17:43
1
answer

How to play stream mms streaming in ASP NET?

I use Microsoft Encoder to stream a video via MMS protocol. The video is streamed. It is the filming of an event being transmitted synchronously to the network (so far locally). It is not a video that is on the server but a transmi...
asked by 09.11.2015 / 19:16
1
answer

Question with asp.net MVC parameter passing

You are calling the controller but you are not calling ActionResult, I have my view: @model IEnumerable<Generico.Dominio.TB_MENU> @{ ViewBag.Title = "Index"; } @Html.Partial("_navbarInterno") @Html.Partial("_PartialLogin") <...
asked by 28.12.2015 / 23:18
1
answer

Child actions are not allowed to perform redirect actions. MVC 5

On my homepage, there is a shortcut button that opens a modal, and within that modal it has a partialView that points to an action within another controller . Until then calm down. <div class="modal fade" id="modalCreate" tabindex="-1"...
asked by 03.08.2015 / 17:44
1
answer

Pagination in the modal using Url.Action

I have a modal of products, in the controller of the page has a get function to complete it when it opens, and a post for filters and pagination. My problem that pagination is done by Url.Action("Index", new { page }) that calls the pag...
asked by 05.10.2015 / 21:53
1
answer

How to use in @ Html.CheckBox?

I have the following code: @{ var st = //(minha lógica q retorna bool); } @Html.CheckBox("MeuNome",st,new { id = "MeuID", value = "MeuValor" }) I can not use the st variable in the second method parameter ... I have...
asked by 27.11.2015 / 16:42
2
answers

Go through a table (grid) Razor MVC

I have a table that is populated by a Model in HTML Razor in a partialView , a field of this table I left as editable using @Html.TextBoxFor . After the user edit this field I need to update in the DB, but first I need to retr...
asked by 12.06.2015 / 17:03