.net

How do you use the ClearCookies method in WatiN?

I am just starting with WatiN and I want to make sure any cookies i have from previous sessions on the site are cleared off before I run the tests. The clear cookies command results in an exception that seems to be at the COM level. Unhandled Exception: System.ArgumentException: Value does not fall within the expected range. at ...

Naming conventions for abstract classes

I distinctly remember that, at one time, the guideline pushed by Microsoft was to add the "Base" suffix to an abstract class to obviate the fact that it was abstract. Hence, we have classes like System.Web.Hosting.VirtualFileBase, System.Configuration.ConfigurationValidatorBase, System.Windows.Forms.ButtonBase, and, of course, System.Col...

where can I lookup if I am running .net 3.5 or 3.5 sp1?

I want to verify if a computer is running .net 3.5 or 3.5 sp1, where do I look this info up? ...

How can I flip/rotate a PrintDocument in .NET ?

I have a document that I want to be flipped / rotated 180 degrees when printed. (This is due to the orientation of label stock in the printer). There is a property PrintDocument.PrinterSettings.LandscapeAngle but it is read only. I think this property is influenced by the printer driver and therefore not 'settable'. Is there a nice w...

How can I programatically display the context menu for a file?

In a C# program I would like to display the context menu for a file. For example: If the user clicked on the files name in my program, I would like to display the actual right click menu. By actual, I mean, the system context menu. I don't need programmatic access to the contents. I just need to display it. Any ideas to get me started?...

Scientific notation when importing from Excel in .Net

Hi, I have a C#/.Net job that imports data from Excel and then processes it. Our client drops off the files and we process them (important because I don't have any control over the original file). I use the OleDb library to fill up a dataset (I hate writing that code. Seriously, is there any code that a .Net developer dreads writing m...

How to Mock Indexed Property with Rhino Mocks ?

How can I Mock Indexed Property with Rhino Mocks ? ...

What are some good resources to look into synchronizing contact data on mobile devices with a .NET application?

Basically we want to be able to somehow synchronize our .NET application's contacts with the contacts on a mobile device (Pocket PC, iPhone, Blackberry, etc) Preferably a one shot deal that can interface with them all but that doesn't seem likely. Preferably also we're not writing applications (or at least very simple ones) for the m...

"The resource cannot be found." error when there is a "dot" at the end of the url

Hi, I'm using ASP .NET MVC Beta and I get the HTTP 404 (The resource cannot be found) error when I use this url which has a "dot" at the end: http://localhost:81/Title/Edit/Code1. If I remove the dot at the end or the dot is somewhere in the middle I don't get the error. I tried to debug but it I get the error from "System.Web.Cached...

Loading untrusted assemblies

My application has a plug-in model that allows third-party developers to write assemblies that will execute in the main application. Up until now, the practical use has been to allow only trusted developers to provide add-ins. I'd like to expose the framework to untrusted developers. To do that, I'd like to restrict the assemblies to in...

How can you statically compile Microsoft .NET code?

I saw this Ars Article about .NET Mono version being used to statically compiled and not have the JIT or CLR for the iPhone & Wii. I'm assuming you can also do this for PC's w/o .NET installed. The articles seem to imply this can only be done w/ Mono, but does anyone here know if there's a way to do it with Microsoft .Net implementat...

How do I determine whether the filesystem is case-sensitive in .net?

Does .net have a way to determine whether the local filesystem is case-sensitive? ...

How to you inspect or look for .NET attributes?

I have an enumeration for Status for a Task. Some of the statuses are considered obsolete, and I have marked them as obsolete, as seen below: public enum TaskStatus { [Description("")] NotSet = 0, Pending = 1, Ready = 2, Open = 3, Completed = 4, Closed = 5, [Description("On Hold")][Obsolete] OnHold =...

Get Firefox URL?

How can I get the url from a running instance of firefox using .NET 2.0 windows/console app? C# or VB codes will do. Thanks! ...

Code to create CAPTCHA code in ASP.NET?

Hi, I want to create a CAPTCHA similar to http://www.gigbooks.com/getcaptcha.php this one. But its in PHP an anyone provide me the code to create the same in ASP.NET ? I am using ASP.NET 2.0 (C#) Thanks, ...

MFC vs. CLR?

In a visual studio C++ project, would MFC be faster than using the CLR? I'd specificily be using 2008. Oh and the reason I ask is because I have experience with .NET but not so much with MFC. I understand what MFC is but have never really used it much. ...

WPF - Bind listbox SelectedIndex to a TextBlock in the list.

Hi, I would like my listbox to number each item using the SelectedIndex property + 1. How would I do that to the Text property of a TextBlock in a DataTemplate of the listbox??? Malcolm EDIT: i dont think I mean the Selectedindex just the index of the listboxitem. ...

AjaxControlKit in .NET 2.0 from Visual Studio 2008

Hi, I am working on a project which was developed in Visual Studio 2005 (.NET 2.0). I have Visual Studio 2008 and on opening the solution the files are converted to older framework. But the project uses a AjaxControlKit which I guess is not available by default in ASP.NET 2.0 and hence it throws an error that a reference/library is mis...

What are the proper and complete steps to deploy a .NET application from Visual Studio for public use?

I usually write C# programs for myself, or just parts of other applications. Now, I have been working on a project that I would like to eventually commercialize and I am interested in the easiest way to deploy a simple application from VS 2008 that will primarily be downloaded and installed. I am not just interested in installer choice...

.net / c# test wanted for a non techical MD

Dear all i am looking for an half finished .net application to test my .net c# applicants. As I come from a differnt coding background, it is difficult for me to assess people skills hence a great test would do a good job! Regarding checking candidates' test performance, I can ask a friend, no problem ! Does a practical test exist out...