EDIT:
So, I ended up making my own basic solution to this problem, and it can be found in my own answer to the question below. Or, here's a link.
Original Post
I'm doing some UI programming for a small .NET application. The application has some collections of items that need to be displayed in a grid sort of format (X columns by Y row...
I want to have an enum as in:
enum FilterType
{
Rigid = "Rigid",
SoftGlow = "Soft / Glow",
Ghost = "Ghost",
}
How to achieve this? Is there a better way to do this? It's gonna be used for an instance of an object where it's gonna be serialized/deserialized. It's also gonna populate a dropdownlist.
...
So I've got a script that I'd like to add to a page using a ScriptManager, but the script gets added multiple times. The script I'm trying to add plus the call to register it (in the C# code behind) are as follows:
string buttons = @"var overflowEls = getElementsByClass(""descriptionBox"");
for (var i = 0; i < overflowEls.leng...
Here is a C# program that tries Marshal.SizeOf on a few different types:
using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential)]
class AClass { }
[StructLayout(LayoutKind.Sequential)]
struct AStruct { }
[StructLayout(LayoutKind.Sequential)]
class B { AClass value; }
[StructLayout(LayoutKind.Sequent...
Where I can change compiler options for C# project in VisualStudio 2008 (without command prompt). I need it to turn off optimization to compare optimized IL-code and unoptimized IL-code.
...
Anyone know how to convert either a TrueType Font or JPG image into a PNG image with Alpha Transparency in .NET?
I basically want to create a script-looking signature image that has a transparent background so that I can programmatically add that png signature into PDF documents after they've been created. I can do this with a normal J...
We have an application parsing date/time values in the following format:
2009-10-10 09:19:12.124
2009-10-10 12:13:14.852
2009-10-10 13:00:00
2009-10-10 15:23:32.022
One particular server all of the sudden (today) started failing to parse any times 13:00:00 or later. This particular client has five servers and only one has the problem...
Is it possible to accomplish something like this using linqtosql?
select * from table t1
left outer join table2 t2 on t2.foreignKeyID=t1.id
left outer join table3 t3 on t3.foreignKeyID=t1.id
I can make it work using both DataLoad options or join syntax. But the problem is whenever I add a second left join, linqtosql queries with MULT...
First, this topic is a general regex question, but applies to a specific product - VirtualURL.NET (.NET HttpModule). I am using this product to do regex URL rewriting.
I have a situation which I am attempting to accomplish in a single regex rule. I am matching against the following URLs:
~/directory/page.aspx?id=idval
~/directory/pag...
I'm working with an interface generated by from a wsdl, and I'm running into an issue when trying to host my service as a Windows Service.
The following line appears above the interface. Unless I change it from
[System.ServiceModel.ServiceContractAttribute(Namespace="http://xxxxxx.com/", ConfigurationName="IService")]
to
[S...
If I have a Winforms control, is it possible to tell if there are windows (from any application) above it? Basically, I need to know what parts of my control are actually visible on screen.
...
I'm working on a project that calls a web service using WSE3. The types originally generated using VS2005 have been modified over time. Now, I need to change the name of the type in the SOAP message. I gather that should be done using XmlTypeAttribute, but that does not affect the type name. As an experiment, I used XmlElementAttribu...
I've read some discussions about this subject, and there's something I just don't understand.
The most common answer seems to be this: use a ReadOnly Property to return cached data, use a Function to return non-cached data. Don't use a WriteOnly Property at all, cause "it doesn't make sense".
There is no performance reason for this. In...
Hi there,
I have quite a large project, actually 2 but they share a lot of projects between each other. The problem being when i compile from NOTHING i.e. no dll's in my common bin dir it fails..
This is due to the fact that some projects are not compiling before others that are dependent on them.
I have fixed it manually going throug...
This is also one of the interview question i have faced recently.
Description :
The task is $ 100(Please consider some currency) will be given to me.I need to purchase three items itemA,itemB,itemC.The cost of (I am not sure 0.25$ or 0.75 $ are meaningful,so think it as other currency) itemA=0.25$,itemB=0.75$ and itemC=20$. I need to p...
We install a windows service from a custom action as described here: CodeProject
Every so often, when uninstalling our application, it does not properly uninstall the service. Instead it "marks the service for deletion".
You can see this message by running installutil.exe /u on our executable, when it is supposedly uninstalled.
Has a...
I have Bitmap. I want to apply median filter to my bitmap. But I can’t use GetPixel() and SetPixel() because speed is very important factor for me. I need very fast way to do it. May be it can be done with a Graphics.DrawImage(Image, Point[], Rectangle, GraphicsUnit, ImageAttributes).
After median filter I want to apply binaryzation fil...
I am trying to return an html string from a method in a class library (don't ask why). What i would like to do within the method is get an instance of a POCO from my domain, then open an html document (maybe from a file or maybe it is a string from somewhere else), then pass the POCO to the document (which has bindings to the POCOs prop...
I am not sure if this can be done, but here's the scenario.
I want to turn this sql into linq:
SELECT * FROM Department d
INNER JOIN Employee e ON e.DepartmentID = d.DepartmentID
Department - Employee is 1 to many relationship.
I have created a custom object that I would like to populate the result into.
public class DepartmentSum...
I need to gather information from a number of web sites on a regular basis throughout the day and present that information to a number of client applications via a web service interface.
Is it possible to do this and deploy the resulting "application" via a commercial hosting package or do I need to go to a dedicated server in order to ...