I am planning to rewrite a current system that I previously worked on a portion of. I am doing this as a learning exercise. Below is a description of the old system, basic architecture of the new system, some best practices I want to follow, the goals I want to acheive and my questions.
Let me explain the old system:
1. SQL Server Datab...
I'm trying to retrieve a custom Attribute set on a page's class from inside the MasterPage. Normally to do this I would need to reflect directly on the specific class, but inside the Master page it's always referred to as the Page type (the parent class).
How do I determine the specific type of the Page property?
Here's an example of w...
I am looking for a high-quality free JPG compression library with C# interface, as an alternative to the standard Image class of .NET.
Any suggestions?
...
Is it possible to force my C# solution file to make a single DLL containing all the projects in the solution, instead of one DLL per project? This dude says that isn't possible but I notice that's a post from 2004. I'm using Visual Studio 2008 Team System and it's a C# application.
...
Is it possible to mute Flash and/or Firefox from a .Net app? Our app knows when it's about to initiate a phone call, so it would nice if it could mute any streamed audio on the user's browser.
Let's assume the user is known to use Firefox and the streamed content will be Flash based.
This post mentions some tools to mute Flash and Fla...
Given an object reference, is it possible to programmatically determine if the object was created in the current appdomain or instead is a proxy to an object in another appdomain?
...
I am trying to setup a project using Entity Framework 4, POCO, and Code-Only.
Is it possible in entity framework for type of a navigation property to be an interface?
I have a "Task" class. A Task can be assigned to a user or a group each of which are represented by a separate class and stored in separate tables. The classes look som...
I'm trying to use the built-in .NET session handling to share sessions across multiple ASP.NET applications. I can't use a custom session implementation.
I have multiple web servers, each with its own hostname, configured to point to the same codebase
I'm using a HttpModule that manually sets the application name, so as long as request...
I have code which could be executed using a Provider that doesn't support transactions, or doesn't support nested transactions.
How would I programmatically determine such support?
E.g. The code below throws a System.InvalidOperationException on the final commit when using the MySQL .NET Connector, but works fine for MSSQL.
I'd like t...
I need to load two versions of the same DLL in order to compare their outputs. I assume that I can use AppDomains for this, but I need some guidence.
...
Say I have an event defined in an interface.
I then have many classes that implement that interface.
The creation of these classes is managed by StructureMap.
Now say I have one delegate that I want to use as the event handler for ALL of these newly created instances.
Is there a way to tell StructureMap to append an event handler...
Here's what I am trying to do. I have a website that lets users submit requests that are queued up in a Jobs table that the service picks up and processes. I have a status column in the table that denotes whether the request is queued up for processing or being currenty processed by the service or the service has completed processing the...
Hi there,
When I bind my datasource to my grid
dataGrid.DataContext = myObservableCollection;
.. and when a value of a cell is for example >100 how can I have the cell pulsate on and off in a different color?
Thanks for the help
...
I have a client -> service -> server, architecture and I want to introduce validation.
I have dtos being passed over the service and get transformed into domain objects on the server.
Say if a user enters in a value and I need to check this value against the database to see if it exists and if so return an error and highlight the fie...
I have a table with a DateTime column
the column can have NULL values
Now I connect to the database using an ODBC connection and get the value into a DataTable in .net / c#.
I am able to check it for NULL by going
if(String.IsNullOrEmpty(table.rows[0][0].ToString())
{
//Whatever I want to do
}
Is String.IsNullOrEmpty the correc...
Hi there,
i have a validation rule like so:
public class MyRule : ValidationRule
{
public override ValidationResult Validate(object value, CultureInfo cultureInfo)
{
if ((int)value < 0)
{
return new ValidationResult("Error, value must be > 0");
}
else
{
return Val...
List<string> a = new List<string>() { "a", "b", "c" };
List<string> b = new List<string>() { "a", "b", "c", "d", "e", "f" };
b.RemoveAll(a.Contains);
If you loop through b it will now only contain d e and f. Can anyone expand out whats actually happening, because currently it doesnt make any sense at all.
Edit: I was more talking abo...
I wish to be able to write entries to a console application which will describe when actions have been completed, possibly writing them to a .txt file at one point.
I would like it to be used with a separate GUI application running at the same time so i can use the application and monitor the log simultaneously.
I only assume the Diagn...
Hey, I am attempting to use the Microsoft.MSHTML (Version 7.0.3300.0) library to extract the body text from an HTML string. I've abstracted this functionality into a single helper method GetBody(string).
When called in an infinite loop, the process eventually runs out of memory (confirmed by eyeballing Mem Usage in Task Manager). I susp...
Does anyone know of a .NET profiler which works with Azure to figure out code bottlenecks.
I have tried to integrate dotTrace profiler - but haven't had any success.
Does anyone know of any that work with Azure ? Seems something which is very needed ?
...