Posts by Ivan Ricardo Lopes • 1,376 points
21 posts
-
2
votes1
answer593
viewsA: Return message together with Unauthorizedresult
create an Objectresult, with it you can return any object next to the error code. var result = new ObjectResult(new{erro ="você precisa ser admin"}); result.StatusCode = 401; context.Result =…
-
3
votes2
answers97
viewsQ: Does user traffic imply monthly value?
I published an application in Azure, created a resource group with a plan, which for example gave 50 dollars/month. Is this value independent of access and traffic quantities? If 1000 or 100000…
windows-azureasked Ivan Ricardo Lopes 1,376 -
6
votes2
answers2059
viewsQ: Upload Image Asp net MVC
My question is this: imagine a scenario where I have a canvas that has a form, and in this form also exists upload images. Let’s assume that I fill out the entire form, and select 3 images in the…
-
57
votes7
answers1478
viewsQ: Is using many interfaces a bad programming practice?
I am a student in Information Systems and I am modeling a game, a virtual pet that has its needs and conversation with its owner, below follows the modeling of classes and interfaces. I showed it to…
-
3
votes1
answer7349
viewsQ: How to access the application from another computer running on localhost
I have a web application made in ASP.NET MVC 5, and gave a start in Visual Studio 2013, the address of the Index page was like this on the machine where it is running: http://localhost:51144/. How…
-
1
votes1
answer43
viewsQ: Json with problem, does not continue execution after request
Code of the contorller public JsonResult InsertComment(string description, int postID) { try { Comment comment = new Comment { Content = description, DataCommented = DateTime.Now, PostID = postID,…
-
3
votes2
answers2101
viewsQ: How to decode an image in Base64
I’m trying to decode an image, the string that comes as a parameter in the Image attribute of the post object looks like this: "data:image/png;Base64," and a lot of letters, numbers, and symbols on…
-
0
votes1
answer515
viewsA: How to access the Clipboard image from the browser?
I found this plugin http://www.codersgrid.com/2014/02/26/paste-js-retrieve-the-data-from-clipboard-in-javascript/ worked perfectly for my purpose, for copying texts and images. just include the file…
-
3
votes1
answer515
viewsQ: How to access the Clipboard image from the browser?
Does anyone have any idea of how to access the image that is in the Clipboard when we give a Print Screen on any screen? What I need is to have access to the image by giving a ctrl + v in the…
-
4
votes1
answer280
viewsQ: C# Union/Order by with LINQ and Performance
Imagine the following situation there are 3 classes class A, class B, class C, class A has many classes B and many classes C. class B has many classes C. clsse C has a data datetime field. public…
-
10
votes2
answers73740
viewsQ: How to access the print screen image?
When we hit the button Print Screen from our keyboard, the screen image is saved in some cache, in memory, somewhere, because when we give Ctrl V after, in Paint for example it trims, how to access…
-
0
votes1
answer579
viewsQ: Why is the Entity Framework generating a new record in the database?
Next, I’m working on a new project Asp.net-mvc, and I have 3 classes. public class Anuncio { public int AnuncioID { get; set; } public string UsuarioID { get; set; } [Required] [MaxLength(255)]…
-
2
votes2
answers1042
viewsQ: Collect information from system resources
I’m using S.O. windows, and C programming language#. How to collect system resource information in C#? processing, memory, disk. I’m running performance tests, with multiple clients and a server…
-
1
votes2
answers452
viewsA: Dynamically fill in combo with MVC 5
You will have some work if you want to work this way, because there are months that have less than 31 days, and leap years that change also these days. What you can use is in your model, in the date…
asp.net-mvc-5answered Ivan Ricardo Lopes 1,376 -
4
votes1
answer4398
viewsQ: How to configure Context not to put table name in plural?
I am in an ASP.net MVC 5 application, configuring a class DbContext. When the EF generates the database, the tables referring to the application objects are getting names in the plural. For example:…
-
0
votes2
answers2219
viewsQ: How to upload multiple images with just 1 click?
I’m studying uploading images and files, and I can upload 1 image, and show it on the screen, but I’m interested in uploading multiple images with only one button, just like this web application…
-
11
votes5
answers10769
viewsQ: How to mark and unmark a row from a table by clicking on it?
When clicking on a row of a table, how to mark it by changing the color of the row background, and if you click again uncheck the background, and if you click on another row uncheck the old checked…
-
3
votes1
answer5980
viewsQ: How to pass parameter in an Action Link values that are in HTML elements?
I have 2 HTML elements, a TextBox and a Hidden, which have values, how to pass the values of these elements in the Action link parameter? Below the parameters docItemId and vlrImobIcms are making a…
-
0
votes2
answers675
viewsQ: How to enable the "Add Controller" option in the menu?
Recently the option of mine Adicionar controller is off the menu. I’m using Visual Studio 2013, and the project is ASP NET MVC, version 5.1. How to fix this problem?…
-
3
votes4
answers7116
viewsQ: How to hide the time of a "Datetime?" field in the user interface?
The time is appearing for the user. My question: it is possible to hide the time and show only the date? How are you showing: Model code: View code:…
-
2
votes7
answers2949
viewsA: How to use multiple SQL commands (in the case delete on ORACLE) in one line only on C#?
Below is a suggested improvement for your project, save the querys in a separate class in case you need to reuse elsewhere, if you need to delete a TB_INDICADOR using another parameter, you can use…