ASP.NET is a web application framework developed by Microsoft to allow programmers to build dynamic web sites and web applications.
0
votes
1answer
35 views
Creating controls on a page which differ slightly depending on an external state
I've got a part of my application which deals with tracking the dates a particular item is worked on. It is a single aspnet page, which displays controls to either start or stop tracking, depending on ...
1
vote
2answers
55 views
Get Word Doc from SQL table, save temp file, edit that file, save new doc in a different table
I have Frankensteined the crap out of this method and just wanted to make sure of two things.
I'd like to make sure that this is the best route to take. If it isn't, I would welcome with open arms ...
2
votes
1answer
39 views
SQL Inserting up to 10'000 records from a table to a secondary table
I'm relatively new to ASP.net and working with larger data sets as a fresh graduate, and I am currently maintaining/developing for an ASP webform and T-SQL system at the moment where we have a ...
3
votes
1answer
55 views
Utilizing Areas to handle subdomains with shared state/resources
I am currently working on a side-project and have the basic foundation and architecture I want in place for the site. I wanted to get your opinion and thoughts on my current practices and methods ...
4
votes
1answer
71 views
3
votes
1answer
39 views
Modifying the response object for creating and downloading a document
I've been looking at some code done in C# ASP .NET WebForms and for some reason I really don't like the below code. What is the best alternative for creating a document and downloading it in Webforms, ...
4
votes
3answers
78 views
Central Database class
I have this web site I inherited as part of my job and it has some old code. I'd like to optimize it, but I don't really have the time to do it right, so I'm looking for some "low hanging fruit" to ...
8
votes
1answer
133 views
First SignalR application (Connecting 2 clients; mobile and desktop)
Two days ago I started reading about SignalR and today I started writing a simple application. I have written the code below so far, but I was wondering if you have some tips to improve my code.
...
4
votes
2answers
80 views
Gathering tokens from ASP.NET routes
This is one of the (many) utilitarian classes I have that I use with my ASP.NET sites.
The basis of this one is to make gathering certain tokens that I use periodically, to make URL's more friendly.
...
2
votes
0answers
33 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 ...
3
votes
1answer
102 views
Web API Interview Practical Test
A week ago, I applied for a 'Software Engineering Internship' at one of the company. Since I know C++, C#, Java well and have worked on couple of ASP.NET MVC projects with MS SQL server before, I knew ...
1
vote
1answer
52 views
Safe Login Standards [closed]
I'm really trying to wrap my head around application safety in some web pages. I'd like to mention some of the things I've done in the past and hear some critiques on how I can get better. ...
6
votes
1answer
307 views
Identity OAuth implementation with Owin
I am building an MVC 5 application using code-first Entity Framework 6 and a customised ASP.NET Identity model for authentication.
I will only be authenticating against external OAuth providers ...
0
votes
0answers
25 views
Simple and reusable system for user registration and tracking and auto-updates - follow-up
This is a follow up question of this one.
Since the original question was posted, it has turned out that in some cases I want the code to be synchronous and in others to be async.
I have updated the ...
5
votes
1answer
144 views
Combating magic strings in a web application
I'm on a quest to combat all the magic strings which tends to pile up in an ASP.NET MVC application.
All reviews will be highly appreciate but please note that:
Some of the classes contains more ...
2
votes
2answers
72 views
Validating users with Roles
I am using the following to validate my user which works but i wish to incoperate roles so I used the reg iis to add the standard tables aspnet_UsersInRoles.
What I basically want is the ability to ...
3
votes
1answer
87 views
Using the ConcurrentBag as an object pool for an ASP.NET application
Is there anything wrong with this implementation of an object pool that will be called from an ASP.NET application?
The object I want to pool has extremely expensive initialization, so currently I ...
2
votes
2answers
113 views
Save data button
This is a commonly used format for our save button for a lot of our pages. I parameterized (to prevent SQL injection) a lot of this. For this page, there's a ton of textboxes and other stuff, so ...
-1
votes
1answer
57 views
WCF generic proxy caller
I have an ASP.NET web-client and many WCF services. I used it this way:
...
3
votes
3answers
86 views
Should I be using a stored procedure for this function in my code behind?
We typically do our saves and deletes for our asp.net pages (SQL Server as back-end) in the code behind. I've seen some reference the idea of creating a stored procedure for this purpose. Is this the ...
1
vote
1answer
58 views
Using custom negotiator and custom formatter in Web API 2
Here's my custom formatter which I want to use for "application/x.product" content type:
...
6
votes
2answers
274 views
Audit table queries for various combinations of search criteria
I've created a search page on a rather large Audit table (populated by triggers on every database). There are 4 fields you can search by (and I put each textbox next to each other): User ID, Table ID, ...
0
votes
1answer
32 views
3
votes
1answer
44 views
Extracting SoftDelete from DbContext
I have a DbContext with a SoftDelete implementation inside it. To make it more clear and maintainable, I wanted to extract it to ...
3
votes
2answers
69 views
External application for the web application deployment
I need an external application that helps deployment of the web application. The application should create the aspnetdb database on the dedicated SQL server. Then ...
2
votes
2answers
137 views
Checking overlap ranges between two prices
I have a method (C#, .NET framework 4.0) to check overlapping ranges between two prices.
I have a process, which will have one or more ...
3
votes
3answers
369 views
Master detail INSERT in Entity Framework 6 Database First MVC 5
I have a DB with a master table called "facturas" and another detail table "facturas_detalle." I would like to insert to them, so this is a "Database-First".
I need some guidance or advise of best ...
4
votes
1answer
58 views
Resolve entity behaviour based on enumeration type
The core of this question is removing a Static Class smell from my Web-Api/MVC solution. It presently works but feels kind of dirty.
Present Solution
Standard solution with 6 projects:
MVC
Api
...
2
votes
1answer
54 views
Refactored to use polymorphism in place of case statements
The purpose of the below code is to return different types of job objects based on an argument named "jobType."
The original code for the below methods was implemented as a switch statement. I ...
5
votes
3answers
130 views
ASP MVC Controller Unit Test
So I've been writing a unit test using Rhino Mocks to a controller in my ASP MVC application. The test passes, but I'm interested in your opinion and if there's something I should be doing differently ...
5
votes
1answer
277 views
MVC app to associate users with roles
I'm a beginner to web programming and just started a MVC project from scratch. Because this will become a large project eventually, I would like to make sure that I'm doing things kind of right from ...
1
vote
0answers
18 views
Reviewing LLBLGen code for dropdown databinding
I'm using a lookup table to store all my data for comboboxes (like gender male, female etc.), in order to give an easy management tool in my cms. I am using LLBLGen for my DAL.
...
1
vote
0answers
99 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?
...
7
votes
3answers
258 views
Parsing pipe delimited lines
I am parsing the following line of code via a specific format.
Line is:
S|111111|87654321|Bar UK|BCreace UK|GBP|24/08/2010|
The Format is:
...
0
votes
1answer
74 views
Binding data in a TemplateField
This is my current RowDataBound function. I think this functionality is a bit horrrendous really and it winds up with an extreme amount of LINQ SQL queries being ...
4
votes
2answers
102 views
XML/HTML Read/Write
I am developing a .Net application that involves reading data from XML and writing to HTML. The methods to do these tasks are all in the same class as the data they read/write are properties of ...
1
vote
2answers
77 views
Float.Parse issue
I have telerik radgrid that has an SQL backend. What this function is doing is conditionally formatting the cells with in the radgrid. It checks each column to see if the min and max values are within ...
8
votes
3answers
322 views
Simple Google ReCaptcha validation
Linked:
Google reCAPTCHA Validator: Iteration II
I have also created a simple Google Recaptcha Validation class to handle verification.
I used some code from CodingFusion's post Google New ...
6
votes
2answers
305 views
Google reCAPTCHA Validator: Iteration II
This is a follow-up to the other post I made (less than an hour ago) about my Google reCAPTCHA C# implementation: Google reCAPTCHA Validator
This adds support for error messages, so that you can ...
2
votes
1answer
422 views
Listing users in Azure Active Directory
The code below is the Index Action from a User Controllers. Basically this code returns a list of users from Azure Active Directory using Azure Authentication Library (ADAL).
However I need to show ...
2
votes
1answer
122 views
Global.asax singleton
Please help me decide whether this should be good or bad idea to declare a Singleton variable in Global.asax file. (It is not actually singleton pattern, I just want to make sure that only one ...
6
votes
1answer
1k views
Don't search for minors, it isn't allowed
I have a search form that doesn't require much in terms of input parameters, but the Date Of Birth is import for this particular search.
I have been working on creating a way that the form can be ...
1
vote
1answer
41 views
Authentication management
I have the following code and I think it's almost impossible to read and to maintain. I prefer self-explaining and modular code where variable and function names tell what I'm trying to do, but I ...
4
votes
1answer
81 views
User Registration Form Layout
I am working on a site where I need to be able to accommodate frequent flyers but I am not so good at user interface design when I am given such a long leash.
I am using ASP.NET (I am restricted by ...
6
votes
2answers
139 views
Zip Code to City, State for registration form
Took me a couple of days (in between working on other projects) to get the code working, but now that I do have it working I would like to know if there is a way that I could make it work better, or ...
6
votes
3answers
360 views
Generic getting single value from DB in C#
Few months ago I posted my code Getting a single value from the DB. I implemented suggested changes and this is how it looks like right now:
...
3
votes
0answers
78 views
Global Modal User Alerts in ASP.NET from masterpage [closed]
I'm working to implement global alerts by which they reside on the master page, and can be called from both content pages as well as user controls. I'm having an issue with the latter. The goal is to ...
2
votes
2answers
91 views
Basic survey app
I am learning MVC 5 .NET and this is a bit different than Rails activerecord when creating relations. I have created a basic survey app that has a Survey class and this relates to the questions and ...
2
votes
1answer
462 views
MVC Repository Insert Using async
This is practically my first time using async in my code. I read about dos-and-donts but I wanted to get some feedback on what I've written.
I'm using a repository ...
1
vote
1answer
239 views
Converting table data into nested JSON
I'm new to C# (coming from a JavaScript background) and it seems like this code could be greatly improved.
This SQL query:
...