Questions tagged as 'asp.net-mvc'

2
answers

Using [ForeignKey ("")] - MVC

My domain is as follows using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Web.Mvc; namespace Dominio { public class Bolsa_AlunoProva {...
asked by 10.11.2014 / 20:01
1
answer

How do I get Html.LabelFor () to display an asterisk in required fields?

I want the required fields (properties with the Required attribute) to render with an asterisk indicating that it is a required field. public class Foo { [Required] public string Name { get; set; } } Html.LabelFor(o => o.Name) //...
asked by 14.12.2013 / 20:36
1
answer

Implement Text Approval Flow

I am developing a project where the user can publish texts, but before being posted on the site needs to be approved, something similar to the invitations of friendship of social networks where it is necessary to wait for approval of another per...
asked by 04.10.2014 / 01:53
1
answer

Use IPagedList with multiple results

I'm using the IPagedList to do results listing in my application. But I'm trying to solve a problem: When I have many results, going to the controller function to read the results of another page gets heavy. That is, when I am loading my View I...
asked by 03.07.2014 / 18:01
2
answers

Stored Procedure with output parameter being the Id of the last insert. W#

Hello, I'm performing an insert into a table, but I need it to return the ID you just entered. I searched the OUTPUT command but could not solve my problem. I need to do all this using procedures, ie I also need to know how to "get" this...
asked by 13.05.2014 / 21:44
1
answer

Receiving several TextBox values

I need to simultaneously edit multiple records, more specifically a list of students, and load / edit from several% s of% s linked to it. Basically I need to give them their presence. How could I proceed?     
asked by 09.05.2014 / 14:37
1
answer

Get list of checkboxes in the controller in Asp.Net

How do I get a list of checkboxes like this: <div class="editor-field" style="overflow-y: auto; height: 150px;"> <label>Especializações:</label> @{ if (ViewBag.ListProfessionalSpecialization != null) { foreach...
asked by 12.05.2014 / 19:25
1
answer

I can not get list of an API

This URL works on postman: link . I need now in another MVC project to bring the list of cities. When I do this I get this error:    The template item entered in the dictionary is from   type 'System.Threading.Tasks.Task 1[System.Collecti...
asked by 09.08.2018 / 18:04
1
answer

How to send FORM values to the Controller in ASP.NET MVC?

I'm new to ASP.NET and am creating an MVC application. I have, in my controller a method that works as follows: public ActionResult ShowClients(string proc) { --(proc)EXECUTA ALGUMA LOGICA AQUI return View(); } The...
asked by 13.07.2018 / 21:05
1
answer

How to restrict certain file extensions and save to the database?

I need to upload images to my database and use the data type as Bytes in the SQL Server database. How do I guarantee that it really would be an image that will be passing to him? I want to leave released only for .jpeg and .png files. Is it p...
asked by 10.02.2014 / 20:23