Questions tagged as 'asp.net-mvc'

1
answer

Return view that is in another directory

I added a folder inside another folder in the views folder, like this:    Views / Registration / Profile Within the profile folder are the .cshtml files. However, when I try to access the .cshtml files I get an error in the applicatio...
asked by 14.10.2015 / 20:22
2
answers

Error saving a relationship Many-To-Many [closed]

Following the templates this question , I'm having problems trying to save the data (keys of each of the records) in the table created to make the data relationship. Here's the post method I built: Controller [HttpPost, ValidateAntiForge...
asked by 30.11.2015 / 16:34
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

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

How do I accept 0 and negative values in decimal attribute using DataAnnotations?

I have a class with decimals that can receive a value of -10.00 to 10.00 ( including 0 ), equivalent is a numeric (5.2) . The problem is that when creating my MetaData class, even specifying the range validation has not worked. Home Not...
asked by 29.07.2015 / 15:34
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
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 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

Create a dropdownlist and grab the selected id Asp.net MVC

I need to create a Dropdownlist at run time with 2 options to choose from. With this, I need to do a check by picking the selected record and then accessing that method. This is after clicking a ActionLink . How do I set an id fo...
asked by 10.08.2015 / 14:50
1
answer

Call the browser's digital certificate

How do I call the browser's digital certificate so my webapp in asp.net mvc can sign an xml and then return it to the user? I saw features that use java or another applet, but would not like to use any plugins. It's about using more native fe...
asked by 14.07.2015 / 13:44