Skip to main content

Questions tagged [asp.net-mvc]

Model-View-Controller for the ASP.NET framework

0votes
0answers
54views

Seeking Suggestions for Improving My Program.cs File for a .NET Project

I use this code as reference for when I start working on a new project whether that be for personal or for work. It's worked fine so far, but I'm wondering if anyone can read it and provide any ...
sammy medawar's user avatar
0votes
0answers
80views

Custom JSON Model Binder for deserialization with Newtonsoft JSON in ASP.NET MVC 5

I wrote this to have ASP.NET MVC be able to respond as a web API as well as the normal MVC Razor pages. I wanted Newtonsoft deserialization for models based on already parsed values: ...
MPelletier's user avatar
2votes
1answer
217views

Dynamically MVC controls

I am working project where I need to build ASP.net control based on JSON data. I am using the method below GetMeetingPollingQuestion to create this model. Any suggestions/comments are greatly ...
Jefferson's user avatar
2votes
1answer
242views

Building ASP.Net control from JSON Data

I am working project where I need to build ASP.net control base on JSON data. I am using this method below to get all the data into class. I as using FirstOrDefault ...
Jefferson's user avatar
1vote
1answer
120views

Display a table with exchange rate data

I have created a code that displays a table with exchange rate data. Have I used loops and conditions (if else) in a good way? ...
mariuszKen's user avatar
2votes
2answers
1kviews

ASP.NET Web API for currency

On the basis of the daily exchange rate data of the CB (https://ww.cbr-xml-daily.ru/daily_json.js) it is necessary to create a Web-service using ASP.Net Core, which implements 2 API methods: ...
Aarnihauta's user avatar
1vote
1answer
86views

Best approach to combine repositories logic

Let's suppose I have 2 repositories: first is responsible for creating job and return jobId second is responsible for creating ...
mikolaj semeniuk's user avatar
1vote
1answer
63views

JsonResult Building menu

This logic checks different method and adds links to response that is returned to a view. I there a better way to do this ? ...
Jefferson's user avatar
0votes
2answers
396views

Strategy Design Pattern in ASP.Net Core MVC Project

I tried to make a calculator using the Strategy pattern in ASP.Net Core MVC (following an example from the Internet) Please review my code and tell me what could be wrong and how to make it better? My ...
WarmingZ's user avatar
1vote
1answer
2kviews

Detecting supported browsers in ASP.NET MVC (Server side vs. Client side)

I want to check client's browser version, and if it's too old, display a message that the user should update their browser in order to use the website. The website is built using ASP.NET MVC. I have ...
Hooman Bahreini's user avatar
0votes
0answers
63views

Credit based order system

I'm implementing a system, which requires an order to be active. I have a class called Yritys, which is the customer account who would have credits. 1 credit would mean 1 day of service use. Yritys (...
jluck's user avatar
0votes
1answer
109views

Use Request with Fileupload in Controller

I wrote a fileupload function for my application. Basically the application is a web based folder structure, which has files included. I don't know, but I am not happy with it. Is it too long? Can I ...
Spedo De La Rossa's user avatar
0votes
1answer
7kviews

Generic Wrapper class for HTTPClient methods

I am trying to using HttpClient for making API calls from a different domain and for that purpose I have created the following service class after doing some research. It is 4.7.2 framework and not a ....
chiru1983's user avatar
5votes
2answers
3kviews

Repository pattern with Unit of work using ADO.NET in C# to authenticate user from database

So I am using the latest version of Dapper and it works great for mapping my POCO classes but there are some scenarios where I need to return a DataSet instead of ...
Rahul Sharma's user avatar
2votes
0answers
69views

Managing invalid cookie when 2 users use the same computer and therefore share the same cookie

I have asked this question on stackoverflow... here, I am asking for some feedback on the solution that I have implemented. I am using ASP.NET MVC default template to logout user: ...
Hooman Bahreini's user avatar

153050per page
close