Questions tagged as 'asp.net-mvc'

2
answers

Lambda, Where with subquery

I need a query like this in lambda SELECT ClienteId --Aqui eu tenho varios campos do Cliente e estagioprocesso FROM Cliente WHERE ((SELECT TOP (1) EP FROM estagioprocesso...
asked by 03.02.2016 / 18:24
1
answer

Login system in ASP.NET mvc

How do I implement a login system in an ASP.NET MVC application. Do I use Forms Authentication or Identity? I've been reading about Identity and wanted to see a basic example of Identity using the MVC web template without Authentication authen...
asked by 17.05.2015 / 04:59
1
answer

Problems generating a PartialView with BeginCollectionItem

With the intention of creating an action for Adc / Deleting data dynamically to a table with a relation of 1 to Many, .NET returns the exception " Object reference not set to an instance of an object. When I call PartialView, I try to view the...
asked by 10.11.2015 / 20:01
1
answer

Required validating property of another object

I have the following properties, but when I am going to validate via ModelState.IsValid it returns that the description of the user group being informed that it is UserId too, but the problem is that I am prompting for the bank itself to generat...
asked by 27.10.2015 / 01:40
1
answer

How to pass parameter via button

How do I use the text of @Html.TextBox("pesquisa") as a parameter in the code below <button id="BtnConsulta" onclick="location.href='@Url.Action("Pesquisa", "Cliente", new { PARAMETRO)'"><i class="glyphicon glyphicon-search">...
asked by 22.10.2015 / 02:16
3
answers

How to use the @Html.RadioButton, how to send the select option to the controller?

I'm trying to send the selected RadioButton option to the controller, I've already tried to do it in several ways, I've researched in several places and I do not have a solution. Thank you Index @model List<SistemaMobile.Models.cli...
asked by 07.04.2015 / 20:34
2
answers

Pass parameters to the Controller via @Html.Action

I need to render one view inside another, but this rendered view needs to receive and display data from the database, so I'll use the @Html.Action for this, but I need to pass a parameter to the method on the controller fetch the data in the dat...
asked by 29.04.2015 / 19:06
1
answer

Datetime-local at @ Html.EditorFor

I have a model property that I'll save DateTime : [DataType(DataType.DateTime)] [DisplayFormat(ApplyFormatInEditMode = false, DataFormatString = "{0:yyyy-MM-ddThh:mm:ssZ}")] public DateTime DataInicio { get; set; } I want to convert t...
asked by 19.07.2016 / 16:11
1
answer

Questions regarding Asp.Net MVC [closed]

The structure is View - > Controller - > Model I work with 3 layers but it is not MVC. What does this passage mean?    @{ ViewBag.Title = "Index"; } What is ActionResult? Do not have Page_Load? I'm lost. Can anyone help me?     
asked by 18.06.2015 / 19:55
2
answers

Save data in a ViewBag

I'm developing an application, where I have a ViewBag listing a list of numbers, from my database. I need to save the selected number in this dropdown, in another ViewBag. I do not know how to do this, could anyone help me? ViewBag returni...
asked by 09.01.2015 / 14:15