Questions tagged as 'asp.net-mvc'

2
answers

Good practices when working with file processing

I have a web application in Asp.Net MVC with C # and I received a new requirement where the goal is to read a text file with thousands of lines, each line containing a set of data that will be used to insert and update the database. data. My...
asked by 06.02.2016 / 00:21
1
answer

@ Html.EditorFor for DateTime property remove hh: mm: ss

In my model I have a field DateTime called DataReferencia , I formatted with Attributes , however when I am in view hh:mm:ss I just want to date 2/29/2016 . Model [Column("sdt_DataReferencia")] [DisplayFormat(ApplyFor...
asked by 29.02.2016 / 18:28
1
answer

List most frequent items in the database using LINQ

I would like to list on the screen, type a ranking, the most frequent items in the database table through its name, for example: John appears 6 times; Joseph appears 4 times; Maria appears once. Would anyone help me?
asked by 26.02.2016 / 20:12
1
answer

Create a fixed header and footer for all pages

How to create a header with the logo and menu, and a footer with some information, and this header and footer / em> are the same for all pages? CTRL + C / / CTRL , because if I change some item, page. Is this possible?     
asked by 28.08.2015 / 14:32
1
answer

Edit two tables simultaneously in an "edit" view

I have two tables: Pessoa and Catequizando , with a ratio of 1: 1 and I want to get a "Get" to the data of the two tables, both "id's" are equal, > Catequizando catequizando = db.Catequizando.Find(id); Pessoa pessoa = db.Pessoa.Fin...
asked by 27.08.2015 / 18:33
1
answer

User and password validation in Pop Up Modal using MVC 5

My problem is this. I have a modal login popup, as shown below. That when the user enters his login and password and clicks the login button, he calls my controller Authentic. Here is the code for my controller . [HttpPost] pu...
asked by 24.12.2015 / 22:54
1
answer

UrlRewrite for photo name - Web

Today have the urls of the images of my site as: /images/tb/1280077_894mvzfxoojqb.jpg I would like to be able to rename this so that the generated HTML is Apartamento_em_SaoPaulo.jpg or something similar. Possible options....
asked by 20.08.2015 / 22:18
1
answer

Handling a number of non-mandatory parameters on a route

I have the following wheel in an asp.net mvc control: [Route("video/categoria/{categoria}/{page?}/{sort?}")] The three parameters are: categoria , filters the category of the video, page? is the result pagination, sort?...
asked by 26.11.2015 / 15:12
2
answers

C # and MySQL with AspNetUsers, tables deleted

I'm developing a system with C # (MVC) and MySQL. Everything works perfectly fine when I use my local instance of the Database. I've duplicated this database on UolHost and that's where something bizarre happens. When I change the connection...
asked by 30.07.2015 / 02:24
1
answer

How not to publish an asp.net mvc configuration file

I am separating my web.config into several files, for example, there is now connections.config that my web.config refer as follows <connectionStrings configSource="connections.config"/> I will upload this con...
asked by 28.07.2015 / 18:09