Questions tagged as 'razor'

0
answers

how to load an address from a form on the map?

How do I show the address of a form on the map? <table> <tr> <td> @Html.Label("Cep: ") <br /> @Html.TextBoxFor(e => e.CEP, new { maxlength = "9", id = "Cep", name = "Cep", onchange = "...
asked by 27.03.2015 / 20:12
1
answer

HttpPostedFileBase null after reloading the page, (image upload)

Is there any way I can not lose data from HttpPostedFileBase ? my action does a check, and in case of failure the page reloads with the image in the form and I have to make the call again, then HttpPostedFileBase will be null, unles...
asked by 13.04.2017 / 18:37
1
answer

Datatable does not sort the field when you change the value locally

Good morning guys, I'm using the Datatable to do sorting, however when I change the value locally from the status and without posting the page the Datatable seems to ignore my change and sorts all others but what I just changed is not sorted,...
asked by 30.11.2015 / 13:00
1
answer

HTML Helpers vs. Markup Helper

HTML and tagging helpers seem to be able to perform the same functions, like this example I found in Microsoft documentation : HTML Help @using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizo" })) {...
asked by 23.01.2018 / 23:40
1
answer

Viewbag, passing controller value to page razor

I have this Ajax to be able to get the data and move to the function Save items that is in the schedulesItemsController, which works perfectly. function SalvarItens() { var idItem = $("#idItem").val(); if (idItem == 0) { var dataInicio =...
asked by 01.06.2018 / 15:50
1
answer

Bootstrap / Razor Second panel collapses on the first

What happens is that I have 2 topics in the database that are automatically inserted in the page and everything is fine here, but starting with the panels closed or open if clicking on the second it opens / closes always the first one ... boo...
asked by 25.02.2016 / 16:00
3
answers

How to call a JavaScript function inside a Razor?

I'm programming in ASP.NET MVC and I have a registration form. I need to verify that the date of birth is valid, that is, if it is shorter than today's date. I have the script but I do not know how to call it inside the form below, could...
asked by 17.10.2016 / 00:36
1
answer

ViewBag losing reference after submitting form. Asp.Net MVC

Hello, I have two ViewBags that are storing a list each, I load them into a form to make a select box, next to them has a Remove button. So far so good, but when I click the first ViewBag button, a reference loss error occurs, the second ViewBag...
asked by 29.05.2014 / 23:13
1
answer

The ViewData item that has the key 'officeId' is of type 'System.String' but must be of type 'IEnumerableSelectListItem'

   Controller: public ActionResult Cadastrar() { ViewBag.officelist = new SelectList(new OfficeREP().ListarTodos(), "id", "estado" ); [HttpPost] [ValidateAntiForgeryToken] public ActionResul...
asked by 03.02.2016 / 18:10
1
answer

Parameter error when saving data

I can not save some data, probably the error is in the parameters. My Controller: public ActionResult SalvarMilestone(Milestone milestone, int CodigoProjeto) { //if (ModelState.IsValid) //{ try {...
asked by 20.10.2015 / 02:04