Questions tagged [asp.net]

ASP.NET is a web application framework developed by Microsoft to allow programmers to build dynamic web sites and web applications.

24 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
717 views

OAuth 2.0 implicit flow implementation

I have been implementing the OAuth 2.0 implicit flow to secure the API I use in an Angular SAP. Please, could you review my code? I am sure there is a lot of stuff to improve in it. I have separated ...
4
votes
0answers
3k views

REST Web API Claims / Identity 'refresh' per request

I intend to expose a ASP.Net REST API for a project. I would like to use the default ASP.Net Identity system to provide the SQL backend. Users are managed in a different project. For my REST API ...
4
votes
0answers
734 views

Wrapping a GridView with custom controls

My aim is to create a server control which inherits from a GridView and outputs the basic output wrapped in external markup, including other controls. For example, the output will look something like:...
3
votes
1answer
916 views

Proper way to display form with filtering in ASP.NET MVC 5

I want to create page when user can use form to display filtered data in table. Form has to remember its own state, because after every refresh it shouldnt change. So after submitting form I should ...
3
votes
0answers
4k views

Unity Owin per request lifetime middleware

Having changed my website over to owin, I can no longer use Unity's PerRequestLifetimeManager. So I'm writing some middleware for owin in the style of Autofac's ...
2
votes
0answers
137 views

Ninject binding for Dbcontext

I have an asp.net web API and I am using EF6 to connect to a third party rest API which sells online game codes. We made a deal with the company so clients have to call my rest API in order to get the ...
2
votes
0answers
109 views

How to optimize code to only pull separate table rows that are necessary

I have a Company Class, and separate normalized Address Class. I did this because the Address table will hold more than just Company Addresses, so I don't want "CompanyAddress", "EmployeeAddress", "...
2
votes
0answers
447 views

RESTful API combining three other APIs

I have created a RESTful API that uses three other APIs with Visual Studio 2017 in .NET Core. It is the first time I have ever programmed in .NET so I am sure the code could use a lot of improvements. ...
2
votes
0answers
47 views

Creating many aspx pages

I just want to ask if its okay to create many aspx pages. What i did was, i made a guitar store website that has 6 brands and each of them have their own webpage. The code is like this: The aspx.cs ...
2
votes
0answers
5k views

Securing Web API using token authentication and allowing external application to post or get data

Implementing OAuthAuthentication with OWIN and Identity to secure Web API and let external application like Chrome Extension to access our self hosted API for getting and posting data through our ...
2
votes
0answers
227 views

Dynamically created controls in Page_Load()

I have a question regarding creating controls in runtime in ASP.NET 4.0. I'm building a application and in admin.aspx page I have multiple controls (DropDownLists) which are dynamically created with ...
1
vote
0answers
26 views

Bookmark controller with IMemoryCache

I'm just doing a small hobby project to solve a little problem I have and I'm using it as a learning exercise for ASP.Net MVC 5, .Net Core 2 and Bootstrap. I'm using a nuget package that handles ...
1
vote
0answers
56 views

Helper class for ASP.net to return data from SQL server

My goal is to create a class that I can call from my webpages like this. Similar to a data access layer? ...
1
vote
0answers
79 views

Populating a container with dynamic pairs of connected sortable lists

I am working on an application which is used to assign work to Operators based on the Category of the work. Each Operator has several Categories of work they are qualified to work on. They have a ...
1
vote
0answers
92 views

Add or modify bunch of data into database

I got my code works fine, but I am not really sure whether the approach that I took is a best practice or not. So, I decided to ask in this forum instead. So here is my situation: I got my model ...
1
vote
0answers
113 views

Retain previous values in Label

I am trying to write a simple program, from which the following can be achieved. Button1_Click, the number on the Button is increased by 1. The increased number is ...
1
vote
0answers
1k views

ValidationAttribute to validate a string against a JSON schema

This is my implementation of an .NET ValidationAttribute to validate a string against a JSON schema. The JSON schema file is stored within the application as an ...
1
vote
0answers
82 views

Bootstrapped tabbed table view

This produces tabbed tables. Here's how it looks: Each table displays comments of E-commerce products. The variable dtProductComments is ...
1
vote
0answers
1k views

Unit of work using session for NHibernate for WebApi and MVC

My goal was to use the NHibernate Session and to create a UnitOfWork class that I could use thoughout my project. My goals are: Calling Commit should commit everything including un-flushed state (...
1
vote
0answers
1k views

Create JSON object from self-nested LINQ query

I created this function to created nested JSON object using a Linq query. How can I optimize this and make it more readable? ...
1
vote
0answers
1k views

Azure Active Directory controller

I have a class called AzureActiveDirectoryController. This class has some methods: one to create users, one to get the app name, one to register schema extensions (...
1
vote
0answers
2k views

DataTable 'adapter' to HTML table generator

This is a project I am working on, which generates an HTML table out of a query result. (The result DataTable of an SQL command via SP) This section of the ...
-1
votes
1answer
243 views

Partition TPL Tasks in ASP.net 4.0 for WCF Service

Want to know if using partition code like this is ok to do to partition tasks in ASP.NET 4.0 inside of a WCF service. My goal with this code is to try to do non-blocking calls without spinning up too ...
-1
votes
1answer
2k views

ASP.NET MVC multi language website

What is the best way to make an ASP.NET MVC multi language website? The following code is what I use, but I need to make sure from your real-world experience that my code is the best way for ...