I'm trying to generate some C# code using xslt - its working great until I get to generics and need to output some text like this:
MyClass<Type>
In this case I've found that the only way to emit this is to do the following:
MyClass<xsl:text disable-output-escaping="yes"><</xsl:text>Type<xsl:text disable-output-escaping="yes">><...
I want to make an Application that only has a NotifyIcon. It doesn't need to have at all a "Main" Form. When I want to achieve something like this, I just create an invisible form and run it, but would there be a more "elegant" way of doing this, I'd like to know it.
How do you generally do this? This application can't be a Windows Serv...
Hi,
I'm trying to read my compiled C# code.
this is my code:
using(OleDbCommand insertCommand = new OleDbCommand("...", connection))
{
// do super stuff
}
But!
We all know that a using gets translated to this:
{
OleDbCommand insertCommand = new OleDbCommand("...", connection)
try
{
//do super stuff
}
...
I am trying to get a very simple autosizing layout on a winform (C# .NET). I've tried TableLayoutPanels and FlowLayoutPanels but nothing works.
I have a usercontrol which is a container for other usercontrols which are created at runtime - I've called it StackPanel as I want it to list the child controls vertically. I've tried this usin...
I'm using C# and VS2010. I have a dll that I reference in my project (as a dll reference not a project reference). That dll (a.dll) references another dll that my project doesn't directly use, let's call it b.dll. None of these are in the GAC.
My project compiles fine, but when I run it from Visual Studio, I get an exception that b.dll...
I want to add culture to window application so that it can be used globally.
For this I want to use Only one Resource File.
Right now what I do is adds control manually to that file and reads them at page load.
I want this thing to become automated.
How should I proceed
...
I've been using this code as a queue that blocks on Dequeue() until an element is enqueued. I've used this code for a few years now in several projects, all with no issues... until now. I'm seeing a deadlock in some code I'm writing now, and in investigating the problem, my 'eye of suspicion' has settled on this BlockingQueue<T>. I can't...
I am investigating the use of Entity Framework in my organization. We use Oracle DBMS, and therefore (for good or ill) are using the "pseudo-boolean" pattern common in Oracle where instead of having a boolean column (which doesn't exist in Oracle) you have a 1 character column with a check constraint to force it to "Y" or "N".
So, if I...
Hi, I have this scenario...
1.- I'm providing a "Dynamic Table" for wich users can define Fields. Each Dynamic Table will have as many rows/records as needed, but the Field definitions are centralized.
2.- My Dynamic Row/Record class was inherited from the .NET DLR DynamicObject class, and the underlying storage was a List appropriatel...
I have situation where I have to call method of interface using reflection, like this
object x = null;
MethodInfo method = interfaceExists.GetMethod("ShutDown");
method.Invoke(x, new object[] { 4 })
As you can see I do not create instance of object! And, as I can supposed, I receive exception
Non-static method requires a target
...
Hello I have a project using webforms. I applied routing on one of the page. My route is structure like this : http://localhost:3576/Request/Admin/Rejected/ => http://localhost:3576/Request/{role}/{action}/{id}
Everything works great but i have a javascript error:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Win...
Hi,
I have a msi file. I want to get the Revision Number of this file.
I can get it by properties->summary ({690D33BD-602F-4E71-9CB5-1CF2E9593DEE})
But I want to get this number using .net code.
So can u please help me out in this...
...
Is there a .NET (2.0) framework method to remove the XML special characters?
Like " & etc.
It's easy enough to write one, but I'd rather use the framework's if one is available.
...
I have a .NET (3.5 w/ Dev Studio 2008) app that hosts a visual Active X (written in C++ w/ Dev Studio 2003). Have access to all sources, but can't easily move the Active X control up to 2008.
This as worked fine in the past. Made some changes to the Active X control and now, when calling one method on the Active X, I'm getting a TargetP...
As stated in the framework design guidelines and the WWW in general, the current guideline is to name your constants like this
LastTemplateIndex
as opposed to
LAST_TEMPLATE_INDEX
With the PascalCasing approach, how do you differentiate between a Property and a Constant.
ErrorCodes.ServerDown is fine. But what about private constants wi...
Hi,
I am transforming an XML document but after the transform my DTD goes away and also the first line which tells the XML version is missing.
<?xml version="1.0"?>
The code I am using to transform the XML file is:
// Load the style sheet.
var xslt = new XslCompiledTransform();
xslt.Load("XSLTFile1.xslt");
...
Hi.
I'm trying to get StructureMap to put a Castle.DynamicProxy around some of the objects it creates. I have used the EnrichWith-feature earlier, but I think RegisterInterception would suit me better in this case, since I use scanning.
The problem is that in the "Process(object target, IContext context)"-method, I can't find out which...
Hi all,
I'm trying to send an image using a TCP socket. The client connects to the server without any problems and start to receive the data. The problem is when I try to convert the stream to an image using FromStream() method, I get an OutOfMemory Exception. Can anyone help me out? Really important!! Here is the code;
client snippet
...
I have a page, called foo.aspx and i d like to rewrite the url as bar.something
How to do this? How does url rewrite happens in asp.net
Should i create a generic handler?
or should i get some url rewrite modules and add to app?
...
Hi guys! I'm stuck in a problem, i cannot workaround! I have a Oracle client 11, with registry key set to AMERICAN_AMERICA.WE8ISO8859P1. I cannot edit this key, but my application must get data from Oracle in Italian culture format. So I want to edit culture info form my application only. I'm trying to using OracleGlobalization class in ...