Questions tagged as 'asp.net-mvc'

3
answers

Why declare properties twice in a class?

When declaring a property in a class, they usually declare twice, one public and the other private. What is the purpose? private int _years; public int Years { get { return _years; } }     
asked by 17.05.2017 / 18:39
1
answer

Send via Json data to the controller

I am trying to send via Ajax some data from my form. In this form, I have inputs normal fields and a list of providers that I previously selected through the checkbox. Follow screen: I'mcreatingtheJSONobjectandsendingitviaAjax,butmyli...
asked by 21.09.2015 / 21:09
1
answer

How to log in without using the Identity pattern?

An update on Api of Facebook made the default login form of Identity stop working. The way I'm doing that stopped working looks like this: public void ConfigureAuth(IAppBuilder app) { app.CreatePerOwinContext(Applicatio...
asked by 30.03.2017 / 01:16
2
answers

What better way to organize and work with routes in ASP.NET MVC?

What better way to organize and work with routes in ASP.NET MVC? While we have 1, 2 routes, it's quiet, but when do we get 500? 600? In a corporate application there are many routes, what is the best way to organize them without losing contro...
asked by 07.08.2014 / 23:56
4
answers

How to make a Hello World in ASP.NET MVC?

I already program but I'm starting with C # and ASP.NET MVC. I wanted to make a Hello World program and add things gradually as I always did with any language I've learned. I thought creating a project in Visual Studio would create a Hello...
asked by 29.12.2014 / 17:44
1
answer

Display Facebook images with given hashtag via API

I'm developing a web application, and my client has asked me about appearing on his site in some area of the site, Facebook images, with the hashtag . Example, it will cover a certain example, his clients take photos and publish on Facebo...
asked by 29.07.2014 / 15:48
3
answers

How to load a dropdown with a selected value

I have a method to perform change on some data. Among these data, I have a dropdownlist that contains the periods of the courses. When I select to change, I need the dropdown to come with the option checked, as it is in the database. I ne...
asked by 08.06.2015 / 18:56
2
answers

Replace letter by empty or blank, something like Replace ("letters", "")

There is a A1_ZTEL field in the database that is varchar(15) . This way, each user entered a record of all forms, with bar, dot, comma and letter. Now I need to mount a form and read this field from another table that is var...
asked by 11.04.2018 / 21:47
2
answers

How to filter a list asynchronously using LINQ?

Code sample without using async: var products = db.Products.Where(_ => _.UserId == currentUserId); How do I make this query asynchronous taking into account that Where of Linq does not support the use of await ?     
asked by 16.09.2014 / 18:05
2
answers

Convert string to DateTime in LINQ

I have a model where all fields are string . I want to convert to DateTime and Double For this I created a new model public class CPUStats { public DateTime Data { get; set; } public Double? Disco { get; s...
asked by 16.03.2016 / 14:41