.net

How to submit a multipart/form-data HTTP POST request from C#

What is the easiest way to submit an HTTP POST request with a multipart/form-data content type from C#? There has to be a better way than building my own request. The reason I'm asking is to upload photos to Flickr using this api: http://www.flickr.com/services/api/upload.api.html ...

.NET MenuStrip with native Windows renderer?

Does anyone know how to have the MenuStrips to rendered with native Windows look and feel depending the OS version the user is using? The current renders don't do it... I'm currently using a third party control that can do it but uses MainMenu and ContextMenu instead of what I'm looking for, the MenuStrip... ...

.NET DLL that references older .NET assemblies

I am referencing some .NET DLLs in my .NET 3.5 project. Those DLLs have references to .NET 2.0 assemblies (like System.Data, etc.). I can not recompile those DLLs. I would like to install only .NET 3.5 and not have to install .NET 2.0. Will those DLLs work just fine? If not, is there anything I can do to have them use the 3.5 assemb...

Show only one instance of messagebox.show in c#

I have a created a custom keyboard shortcut for my application, when the user press combination keys of CTRL + ALT + Q, i show a messagebox "Are you sure you want to log out ?" Then if clicked YES, i log out of the application. Problem : I want to make sure that, only once instance of message box shows. No matter how many times the user...

.NET SOA commercial recommendation

I am looking for a .NET middleware system that covers message queueing, distributed caches, failover/redundancy. I'd prefer to look at a standards based commercial solution of some kind. What would you recommend? Anything available which from a company point of view has stood the test of time, which is highly likely to stay in business?...

Sending/Receiving Faxes in .NET

Hello, I need to send/receive faxes through my web application, and I am not sure where to begin. Basically, a client clicks a button to send a fax, and records in the database under the client's name when a fax is received. Preferably through an API from a service based fax company... I will be hosting this application on a dedicated...

c# default parameters

In other languages I can set up the method signature like cookEgg(boolean hardBoiled = true) this defaults the parameter hardboiled to true, if I don't receive a parameter in the method call. How would I achieve this in c#? Many thanks ...

Integrated authentication in ASP.NET for a BlackBerry client

I'm developing an asp.net application which has Windows Authentication enabled(anonymous access disabled). I've created a sub directory called 'Mobile' containing the pages that need to be accessible from a black berry mobile device. These pages contain read only text and a few buttons for performing some actions(no AJAX, no javascript)....

Is using reflection a design smell?

I see a lot of C#, .net questions solved here using reflection. To me, a lot of them look like bending the rules at the cost of good design (OOP). Many of the solutions look unmaintenable and "scripty". Is using reflection a good practice in general? Are there things that can only be solved by reflection? edit: Please give examples wh...

How to control output format in ASP.Net web service

We're switching from a legacy app written in ColdFusion to an ASP.Net Web Forms application. One requirement is to move over the legacy web service. The address can change, but the format of the input and responses have to be the same. I'm relatively new to web services, but I know that there are both SOAP and JSON output formats for a ....

Web service in visual studio 2005

Can we create webservice in visual studio 2005 . ...

ASP.NET MVC: Is UpdateModel an "expensive" operation (due to Reflection)?

Hello, I wondered whether UpdateModel is considered an "expensive" operation (due to Reflection lookup of the model properties), especially when seen in the context of a larger web application (think StackOverflow)? I don't want to engage in premature optimization but I consider it a design choice to use UpdateModel which is why I'd lik...

Anyone have examples of the Blackboard Pattern?

Does anyone have any examples of the Blackboard concept from p.165 of 'The Pragmatic Programmer'? I want to have several small sub-systems (DLLs and EXEs) mostly independent of each other. There are some assemblies that will be used by all EXEs. These assemblies will nearly all use the same database. Rather than using interfaces for ...

Cache Reflection Results (Class Properties)

Hello, considering that fairly static data should not be re-evaluated but cached instead, I wondered if it is possible to use Reflection to obtain class properties once, and then cache them so that I could dynamically evaluate object properties and read/assign values, but not have the Reflection overhead every time I do that. Is this po...

Does .NET has an Exception that similar to Delphi's EAbort ?

Does .NET has an Exception that similar to Delphi's EAbort ? Currently, define my own "AbortProcess" inheriting Exception. Together with My.Application.UnhandledException handler that ignoring "AbortProcess" I'm still wondering if similar mechanic in .NET is already exists. Class AbortProcess Inherits System.Exception End Class Su...

List of WPF functionalities that aren't in Silverlight 3

A common technical decision nowadays is whether to build a ClickOnce rich client application or a web application. Here I'm focussing primarily on choosing between a WPF application or a Silverlight application. The chief benefit of Silverlight is obvious - it can be hosted in a browser. But, if a programmer used to WPF was to star...

Unnecessary null check in KeyedCollection<TKey, TItem>.Contains(TKey)

Just found an unnecessary null check in KeyedCollection.Contains(TKey). Appreciate it's only a very small optimization, but shouldn't thought this sort of inefficiency be picked up by an automated code analysis tool? Here's the C# generated by reflector: public bool Contains(TKey key) { if (key == null) { ThrowHelper.ThrowArgumen...

word wrap for label in winforms

Hi how can we get word wrap functionality to a label in winforms? I place a label in a panel and added some text to label dyanamically. But it exceeds the panel length. How can i solve this? Thanks in advance ...

Cobertura equivalent available for C# .NET?

Is there a Cobertura (or other code coverage tool) equivalent for C# .NET? ...

Stored procedure and .NET: SELECT INTO on temporary table: suppress result

I'm accessing a stored procedure from ADO.NET. The stored procedure should eventually returns a single result set. To compute this result, a temporary table is filled with a SELECT INTO statement. The problem is that the result of the SELECT INTO statement is also returned as a result set to .NET. Can this be suppressed? Or should I...