.net

Generating DLL assembly dynamically at run time.

Hello World! :-) I have an interesting challenge that I'm wondering if anyone here can give me some direction. Currently I have some code that is being generated dynamically. Another words a C# .cs file is created dynamically by this program, and the intention is to include this C# file in a project where you want to use it. The chal...

DateTimePicker-like Input Control

Hello, I'm not very experienced with .NET development, so forgive me if I've missed something obvious. My scenario is quite simple: my program is going to deal with both the Imperial and Metric systems of measurement. I need an input control that will be able to elegantly house {feet, inches} and {meters, centimeters} (only one set at a...

How do you sell the idea of ASP.net over OSS?

How many of you tried to sell ASP.net to client or boss but go up against the wall of free OSS stacks(PHP, RoR...etc.)? Nothing wrong with OSS or ASP.net. I'm interesting in how to overcome selling ASP.net solution against OSS. ...

Is there a way to put inner controls inside a ASP.NET Custom Control?

I want to do something like (Updated example): <uc:Tabs> <Tab Name="A handy tab"> <Node Url="~/Default.aspx" /> <Node Url="~/Node2.aspx" /> </Tab> <Tab Name="Another handy tab"> <Node Url="~/Neato.aspx" /> <Node Url="~/Node3.aspx" /> <Node Url="~/Node4.aspx" /> </Tab> <uc:Tabs> Possible? Any tutorial...

Install order: Sharepoint ajax and .NET 3.5 ajax

As far as I know Sharepoint 2007 uses ASP.NET Ajax 1.0 with System.Web.Extensions 1.0 while I'm creating webparts with VS2008 SP1 and .NET 3.5 SP1 which includes System.Web.Extensions 3.5. So what is the order of installation and how do you install to get both versions working? ...

Change ToolStripPanel overflow behavior for dynamically added ToolStripItems

I have a Windows Forms ToolStripPanel that I dynamically add new ToolStrips to it. Each ToolStrip has ToolStripItems that I dynamically add to it (mostly ToolStripButtons). I would like to have all the ToolStrips fit on one row as long as you can see all the ToolStripItems in each ToolStrip. If adding a new ToolStripItem to a ToolStrip...

What's the easiest way to rename the columns of a DataGridView showing a List<T>?

I have a DataGridView, whose DataSource I am setting to a List<T>. T in this case is a class with a property called Foo, whose header I want to show as Foo bar. If it was a datatable, I could just change the query: select Foo as [Foo bar] from Baz But with something like this, where I'm setting the DataGridView's DataSource to a List...

Using [0] or First() with LINQ OrderBy

If I have a structure like this  Albums     - Album         - Discs             - Tracks and I want to order a collection of albums by the title of the first track on the first disc. Is there something similar to the following I could do (keeping in mind I need to use the OrderBy extension method that accepts a string)? alb...

Is there an equivalent to out-of-process COM EXE in .NET?

One of the nice things about COM/ActiveX was the out-of-process EXE. You could have an EXE which exposed methods and properties in a form usable by both other processes, including VBScript and JScript. At the same time the EXE could have its own functionality, related or unrelated to that exposed by its type library. What is the .NET eq...

Spring PropertyPlaceholderConfigurer for .NET web.config/app.config

Is there an equivalent for the Sprint PropertyPlaceholderConfigurer for .NET app.config or web.config files? We are currently using different version of app.config for different environments (web.prod.config, web.qa.config, etc.) which get renamed when the app is deployed. However, most of the config file is the same for each environme...

How to get SSRS Data Source credentials and open an SQL Connection in .NET

I am using an ASP.Net and C# front end to run some reports. I want to open an SQL Connection to the data source used by the report. When the report uses integrated security it is easy enough to create a connection, however I want to create a connection when the user name and password are stored by the reporting server. I can get SQL Se...

WPF: Allow TextBox to be resized but not to grow on user input

I have a TextBox defined inside a window like so: <Window x:Class="NS.MainWindow" ... SizeToContent="WidthAndHeight"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="100" /> <ColumnDefinition MinWidth="200" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> ...

NTFS Alternate Data Streams - .NET

How would I create/ delete/ read/ write/ NTFS alternate data streams from .NET? If there is no native .NET support, which Win32 API's would I use? Also, how would I use them, as I don't think this is documented? ...

Game architecture and design strategy for a multiplayer card game

I am relatively new to game development so I decided I wanted to create a hobby project from scratch for both experience and entertainment. The specific game is similar to poker known as Three Card Brag. The game is played in the movie Lock, Stock and Two Smoking Barrels. I have been reading up on some of the topics on SO regarding gam...

Determining best compression algorithm to use for a series of bytes

For a personal project of mine, I'm writing up a small class to compress to and decompress from a rather obscure format. I've got the full spec, but that's not where the problem is. First, this 'format' uses a set of 6 different compression types as well as uncompressed blocks of byte data. The formats are RLE, an offshoot of RLE wher...

Any news of the DevShock SMPP Component?

I am maintaining a program that uses the DevShock SMPP component for .NET. I have noticed though that for a long time (at least 6 months) the website has a "New Site Under Construction" notice, saying that it will be ready by September 2008. Does anyone know if it will ever be back? Does anyone know of another free comparable library/co...

I want to know what functions are available from a Win32.DLL

I have a DLL file that has some helpful functions I want to call in my application. Unfortunately I don't have the documentation for it any longer. Is there any way I can discover what are the functions exported by the DLL and their method signature? Maybe there's a utility that lists the functions and their arguments. Know of any? ...

Listbox item foreground problem

I am facing a problem with one of my XBAP (WPF Browser application) projects: Here I have two list boxes: One a simple list containing text content Second one containing an expander as each item: Now when I click on the item in the first listbox (on the left side), the foreground changes to white and then changes back to black if ...

IDisposable GC.SuppressFinalize(this) location

I use a default IDisposable implementation template (pattern) for my code. snippet: public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } protected virtual void Dispose(bool isDisposing) { if (!this.disposed) { if (isDisposing) { //cleanup managed resources } ...

.NET Encrypt bytearray

Well the title says it all :P is there any way to encrypt a bytearray without using a stream?? ...