Questions tagged as 'asp.net-mvc'

1
answer

create a search screen

I'm following up on an ASP.Net MVC application and I need to do a search screen. The question is as follows: I created a table where users register their skills. I need a view where there will be a text field where the person wil...
asked by 12.06.2014 / 01:22
2
answers

Problem creating relationship with user class (IdentityUser) using IdentityFramework

When I create any relationship with my user class: namespace Modelo.Cadastro { public class Usuario : IdentityUser { [StringLength(250, ErrorMessage = "O nome de usuário deve conter no mínimo 3 caracteres", MinimumLength = 3)]...
asked by 25.07.2016 / 20:30
1
answer

Primary Key without Self-Increment for CPF in Entity Framework

The scenario is as follows: I have an Employee class. The primary key of it should be the employee's CPF that the user types. The problem: key follows a default auto increment, not going according to the entered CPF.    EX: I...
asked by 31.03.2016 / 01:41
1
answer

AspNet MVC database first or code first

I have an AspNet MVC 5 project in which I will use Owin and identity, I needed to customize identity (attributes and relations) to meet my needs, however I already have all the "ready" bank tables ), in these already existing tables I'll create...
asked by 11.08.2016 / 14:53
1
answer

Html.EditorFor losing value when restarting the page

I'm starting my html.editorfor with "0.00" like this: @Html.EditorFor(model => model.Preco, new { htmlAttributes = new { @Value = "0,00"} }) But when the user receives some validation message (ModelState.IsValid = false), the editorfor l...
asked by 20.08.2016 / 14:12
1
answer

TempData Doubt C # with MVC

I know that TempData has its "life" held until it is used in View . However, if I do in two different controllers, the same identified TempData , I'm killing and over writing them. If the user is using 2 browser tabs, he ma...
asked by 25.11.2015 / 00:41
2
answers

How to count columns from a txt file HttpPostedFileBase?

In the code below, it would work perfectly if I had access to the path of the uploaded file on the client side, however, it does not work that way. So I'd like to ask your suggestion for another way to do this. Basically I need a colum...
asked by 27.10.2015 / 15:10
1
answer

Changing Routes with Asp.Net MVC

I'm trying to change a route in my project, the control looks like this: public class TagController : Controller { // GET: Tag private MYEntities db = new MYEntities (); [Route("tags")] [OutputCache(Durat...
asked by 30.05.2015 / 03:36
1
answer

Fit height is width of Qr Coder using MessagingToolKit.QRCode C #

Is there any way to adjust height is width? I thank you public void GerarQrCode(string NomeImagem,string Data) { QRCodeEncoder encoder = new QRCodeEncoder(); Bitmap img = encoder.Encode("www.teste.com.br...
asked by 18.05.2016 / 18:34
1
answer

Using KEY element

In my model, I use a view that is built on certain table joins, which do not have any auto-incremental ID elements. My model requires that I assign a TAG Key , however, since I do not have any single-valued elements, I'm getting problem...
asked by 12.02.2016 / 19:21