Questions tagged as 'asp.net-mvc'

1
answer

Total sum with linq

I have no idea how to get Total Value = 755.00 from this select with Linq ? | ID |Qtde | Valor | Total | | 1 | 10 | 23.00 | 230.00| | 1 | 15 | 10.00 | 150.00| | 1 | 15 | 25.00 | 375.00| Total: 755.00 I im...
asked by 13.11.2016 / 22:49
1
answer

Injection of Dependency with Ninject C #

I am developing an application that has 4 layers Dominio, Infra, Servico e Web When I have access a route for example Home/Index it says that there is no constructor without parameters, my constructor looks like this: public Home...
asked by 21.10.2016 / 13:31
1
answer

Call Partial with IEnumerable within a page that has its IEnumerable asp.net mvc?

In my layout I have an option where I show some notifications, so include a partial layout in the layout: @Html.Partial("_PartialNotificacoes") @model IEnumerable<Generico.Dominio.TB_NOTIFICACAO> @if (Model.Count() > 0) { fo...
asked by 22.10.2016 / 21:40
1
answer

Request performance using Html.BeginForm versus jQuery AJAX

Is there any gain in performance when using jQuery to perform ajax requests in relation to the post using Html.BeginForm? @using (Html.BeginForm("Create", "Teste") { @Html.AntiForgeryToken() @Html.ValidationSummary(true, ""...
asked by 01.12.2016 / 07:25
1
answer

Error loading page CREATE

I have two related methods. Patrimonio and Categoria : [Table("Patrimonios")] public class Patrimonio { [Key] public Guid PatrimonioId { get; set; } public Guid CategoriaId { get; set; } [Required] [StringLen...
asked by 01.12.2016 / 04:08
1
answer

Sending form to Pagseguro

I have this form @using (Html.BeginForm("PacoteAdd", "Pacote")) { <input type="hidden" name="email_cobranca" value="*****@hotmail.com" /> <input type="hidden" name="tipo" value="CBR" /> <input typ...
asked by 09.11.2016 / 03:11
1
answer

How do I get the view id if I have asp.net mvc?

I have the following situation, in my _Layout I'm checking: @{ var controller = HttpContext.Current.Request.RequestContext.RouteData.Values["Controller"].ToString(); var view = HttpContext.Current.Request.RequestContext.RouteData.Val...
asked by 08.11.2016 / 17:04
1
answer

Using ReportView

I would like some help. I am using ReportView to generate a report from the id passed as parameter: public ActionResult Relatorio(Guid id) { LocalReport relatorio = new LocalReport(); //Caminho onde o arquivo do Report Viewer e...
asked by 25.10.2016 / 12:41
1
answer

JavaScript src link

Good, I have the following code, in a function Javascript , function(){ var noDataIcon = document.createElement("img"); noDataIcon.src = "~/Images/delete_database.png"; } It happens to give me an error in src, can n...
asked by 08.08.2016 / 18:05
1
answer

Customize TextBoxFor Width

How to change the size of TextBoxFor ? I followed exactly that solution and it had no effect on my form: [ Defining a larger size for a TextBoxFor The Bootstrap CSS file is being loaded before; HTML: @model Merc.Dominio.Entidade.Cola...
asked by 19.09.2016 / 15:26