Questions tagged as 'asp.net-mvc-5'

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
1
answer

Cause form validation in an asp.net mvc 5 link

Good afternoon everyone! I have a form, I created the rules using DataNotations and it works great when I use a button or input type submit inside my form. Very well! I want to change this button to a link that will call the ajax functi...
asked by 22.06.2015 / 19:03
1
answer

SignalR loses connection when giving a PostBack

The idea is to keep the user logged in to Chat as he browses the pages. Layout of components on the page Layout.cshtml function iniciarChat() { var chatHub = $.connection.chat; $.connection.hub.start(); } Index...
asked by 25.06.2015 / 15:21
1
answer

Asp.Net MVC does not execute JQuery after calling Action through "url:"

I need to call an Action using Ajax and so far everything is fine, I make the request as follows: confirm: function () { $.ajax({ url: urlToDelete + id, success: function () { //w...
asked by 15.08.2015 / 00:48
1
answer

How to pass parameter of type object to JSonResult

The view always receives the Null object, why? Here is the snippet of the jquery code: var obj = new Object(); obj.TBCOMPOSICAOID = 0; obj.DSCOMPOSICAO = "TESTE"; var TBComposicao = JSON.stringify(obj); $.getJSON("/Composicao/Novo/", { pCompo...
asked by 11.08.2015 / 16:16
1
answer

How to block the registration of an already registered user

I'm developing an application that manages Courses in ASP.NET MVC, I'm still a beginner, and I'm trying to do the following: The Student has a screen where he lists all the courses for him to choose and make his enrollment in any of these cour...
asked by 08.06.2015 / 15:45
1
answer

Save data, disregarding hidden DIV's

In my View I have a select that hides and shows the div according to the select chosen. This part is working properly. This select has three options, and the form changes according to the chosen value. The problem is...
asked by 15.05.2015 / 20:37
1
answer

Test variable content

Using ASP.Net MVC and AngularJS I tested the contents of a view field like this: $scope.estado.ldRedeBasica = @(Model.ldRedeBasica == null ? "[]" : Html.Raw(Model.ldRedeBasica)); Only returned the following error:    Compiler Error Me...
asked by 27.03.2015 / 18:29
1
answer

Doubt about X-Frame-Options

Yesterday I had a problem with X-Frame-Options , as can be seen in this post . However, I added the solution, and it worked perfectly. I added the solution, but I have no idea what it does, and I would like an explanation. The solutio...
asked by 27.03.2015 / 13:28
1
answer

Load external scripts in modal being loaded via ajax

By default, I have a configuration file of various plugins and actions of my system A simple example is the use of tooltip: $(".bn-tooltip").tooltip({ track: true }); Datepicker: $('.bn-datepicker').datepicker({ autoclose: true...
asked by 19.01.2015 / 16:07