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

1
answer

Validation of fields in the Client in ASP .NET MVC 4

I need to do field validations on both a client-side and server-side system on the server side I've already been able to do, but I have not found any way to do client-side validations in ASP.NET MVC 4, would anyone have anything that could help...
asked by 02.04.2014 / 21:29
1
answer

How to save Disicpline?

I have the following problem in my application.The course table is related to the Discipline table, ie 1 Discipline belongs to several course, and at the time of registering a course and adding more courses to this course I can not accomplish th...
asked by 22.09.2014 / 22:22
1
answer

Identify the Area, Controller, and Action of a View

I need to create an HtmlHelper (MVC 4, C #) that identifies and reports the Area, Controller, and Action of a View. I'm not getting anything. How can this be done? Is there a function or method that already does this?     
asked by 06.10.2014 / 16:37
1
answer

Master Page does not appear in the list when I try to associate it with a view

I'm using Microsoft Visual Studio 2013 and I created a C # ASP.NET MVC 4 project. I created a Master Page in the Views directory, called Modelo.master . Then I created a Controller in the directory Controllers , and again a...
asked by 15.10.2014 / 18:23
1
answer

DropDownList in Cascade MVC 4

View: <asp:Content ID="Javascript" ContentPlaceHolderID="HeadContent" runat="server"> <script type="text/javascript"> $(document).ready(function () { $("#estados").change(function () { va...
asked by 23.06.2015 / 14:44
1
answer

Select only one RadioButton with Razor

I have 2 Radio Buttons, and I would like it when I tagged one, the other unchecked. Here's what's happening: Code:@Html.RadioButton("teste", "teste", true) Teste @Html.RadioButton("concessionaria", "concessionaria", false) Concessionária...
asked by 23.06.2014 / 15:15
1
answer

Display a button based on the action of another

I'm a beginner in ASP.NET MVC I have a project. And within a given view I have two buttons. However, one of them can only appear if the other is executed. 1 > Save (save car) 2 > Associate a dealership (it can only be activated wh...
asked by 17.10.2015 / 22:38
1
answer

Validate custom fields of generated classes

To prevent validations made with Data Annotations are lost if the table structure changes, it is necessary to create another class with the fields for validation and a class partial , path that this last class references the class genera...
asked by 19.05.2015 / 19:49
1
answer

Redirect to error page when entering catch

I'm having a question about a possible improvement in the method when an error occurs in a Action and redirects to an error page. I currently do this in Action : public ActionResult Index() { try {...
asked by 11.06.2016 / 15:49
4
answers

Orable DB and MVC 4 - Connection Error (ORA-06413)

I have a dll that is responsible for performing queries in the database. In this dll , in the connection class, I have a method that opens the connection to the database and returns the connection, as seen below: private OracleCon...
asked by 13.10.2015 / 15:41