.net-2.0

Clickonce: setup.exe opens .application file in browser. Normal?

Hey :) I've just deployed our first ClickOnce application. Unfortunately it requires far more than one click to install our application. The user downloads the setup.exe and executs it The default browser pops up (e.g. Firefox) and the user has to download an ourapp.application file Afterwards he can start this file and after some sec...

Find Type of Type parameter

Consider the following: private T getValue<T>(String attr) { ... } How do I check to see what Type is? I was thinking of: if("" is T) // String if(1 is T) // Int32 But I am sure there is a better way! -Theo ...

Processing grid input in .net 2.0

I am building the UI to an application that uses Syncfusion grids to display data to the user. I'm using C#/.NET 2.0. There are many users using the application and many different ways in which a user can change the grid's appearance. I need to process each grid change and save the result down to the server in an orderly fashion. For exa...

Profiling ASP.NET website and controls

Consider a website that uses master pages and web user controls excessively. (1)Master -> (2)page - > (3)web control > (4)web control -> (5)web control this example of five levels may contain multiple web controls at each level. Please don't bother commenting about the design of this scenario, it is outside my grasp (not capabilities,...

How to implement a rich label in WinForms?

Amazon has an address correction feature and I want to implement something similar. One problem I ran into is how to create a label that supports different formatting (like in the image). I could plunk down a browser control or a richtextbox control, but that seems like a massive overkill. Is there something simpler? Maybe an imp...

Correctly disposing user controls and child controls in C#

Hi we are experiencing a few problems with the IDisposable pattern. In this case there is a user control 'ControlA' with a FlowLayoutPanel, which contains more usercontrols 'ControlB'. When calling Dispose(bool), I check if disposing if true, and if IsDisposed is false. I then try to explicitly dispose each ControlB in the FlowLayoutPa...

Any possibility to add subtitl in AxWindowsMediaPlayer control ?

Hi I am using axWindowsMediaPlayer control in my windows mobile application with using .net CF 2.0, I want to play the video with subtitle.(SRT file type) Any one know how to add the SRT file in AxWindowMediaPlaye ,It is possible ? Pl. give me some suggestions Thank you in advance. ...

Can I use a .NET 4.0 library in a .NET 2.0 application?

I'm running into some problems using my .NET 4.0 libraries in .NET 2.0 applications. I guess I was under the impression that being a Windows DLL, my other .NET apps would be able to access it. Is this not the case? Any recommendations in terms of supporting applications in both environments? EDIT: I realize that I'd need to install t...

can we use ColorPicker Ajax Control in asp 2.0?

Use of ColorPickerExtender in asp 2.0 Provide Example ...

iron speed designer 5 enterprise code customization wizard does not work keep on rebuilding the application

Hello, I know someone who works on Iron speed designer version 5 and I was looking to help him with an issue he is facing with a web application in asp.net on .net 2.0 platform generated using the iron speed designer. We built a page and customized it by adding a asp.net checkbox and send email coding. After we did this now, the code ...

Get resource without reading it completely into memory

I have an application on the Compact Framework that has some large embedded resources (some of them are several megabytes). I am calling assembly.GetManifestResourceStream(...) which returns a Stream object. However, I noticed that on some devices this call not only takes quite a while but causes the device to run out of available memo...

Unable to start service written in .NET 2.0 on Windows XP Embedded

I've created a small executable that can be launched either as a normal application by calling MyApp.exe or as a service by calling MyApp.exe -s. Because I'm trying to keep as simple as possible, I "install" this app by manually running sc create MyAppService binPath= "C:\MyApp\MyApp.exe -s" Then I start the service with net start My...

parsing email text reply/forward

Hi, I am creating a web based email client using c# asp.net. What is confusing is that various email clients seem to add the original text in alot of different ways when replying by email. What I was wondering is that, if there is some sort of standardized way, to disambiguate this process? Thank you -Theo ...

running asp.net 3.5 and asp.net 2.0 in same site

We're running ASP.Net 2.0 on our corporate web site, and I'd like to get it up to ASP.Net 3.5 as smoothly as possible. The project/solution architecture in VS 2005 is an ASP.Net 2.0 web project and an .Net 2.0 data access layer project which is used by the site code. Upon opening the projects in a new VS 2008 solution they seemed to be...

Amazon EC2 multiple servers share session state

Hi everyone, I have a bunch of EC2 servers that are load balanced. Some of the servers are not sharing session, and users keep getting logged in and out. How can I make all the server share the one session, possibly even using a partitionresolver solution public class PartitionResolver : System.Web.IPartitionResolver { ...

Visual Studio 2008 - .NET 2.0 targeted application won't run in XP (mscorwks.dll could not be loaded)

I have a .NET 2.0 targeted C# windows forms application that is running fine on XP when .NET 3.5 is installed. However, when .NET 2.0 only is installed I get the error: "WindowsFormsApplication1.exe - .NET Framework Initialization Error" - "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll could not be loaded" I have tried thi...

C# Interface Inheritance (Basics)

Why does the following produce a compiler error: public interface OwnSession : ISession { } [...] OwnSession s = SessionFactory.OpenSession(); // compiler error (in german unfortunately) [...] "SessionFactory" returns a "ISession" on "OpenSession()" (NHibernate) ...

How to detect whether an EventWaitHandle is waiting?

I have a fairly well multi-threaded winforms app that employs the EventWaitHandle in a number of places to synchronize access. So I have code similar to this: List<int> _revTypes; EventWaitHandle _ewh = new EventWaitHandle(false, EventResetMode.ManualReset); void StartBackgroundTask() { _ewh.Reset(); Thread t = new Thread(new ...

C# Image.Clone to byte[] causes EDIT.COM to open on Windows XP

It appears that cloning a Image and converting it to a byte array is causing EDIT.COM to open up on Windows XP machines. This does not happen on a Windows 7 machine. The application is a C# .NET 2.0 application. Does anyone have any idea why this may be happening? Here is my Image conversion code: public static byte[] CovertIma...

What's the most efficient way to combine two List(Of String)?

Let's say I've got: Dim los1 as New List(Of String) los1.Add("Some value") Dim los2 as New List(Of String) los2.Add("More values") What would be the most efficient way to combine the two into a single List(Of String)? Edit: While I love the solutions everyone has provided, I probably should have also mentioned I'm stuck using the .N...