.net

Interactive .NET Charting tools?

We are looking to implement some complex charting graphs for a new application we are building. Some of the charts are scatter graphs that sometimes have a high clustering of data in specfic areas. Is there a charting tool that is similar to Google Maps that gives you a high level view, and then if there is too much clustering, a user ...

Process.Start fails with Path not found exception

Why the api Process.Start fails if it is called from a mapped drive. Steps to do create a project which calls Process.Start() on a simple exe. Map this folder as another drive letter access the same launching application via the mapped drive. When it is accessed via mapped drive it fails with an error message System can not find the path...

Multiple "= new" in vb.net with the same variable. Does garbage collection dispose and how?

Dim x as whatever Try x = new whatever(1) something is done with x x = new whatever(2) something is done with x Catch Finally x.dispose End Try What happens to x = whatever(1) Does garbage collection find the pointer to the first new and destroy it or what? ...

Possible ways for testing automation of ASP.NET2.0/ADO.NET project

What approaches could you please suggest me for testing (using NUnit?) a complex ASP.NET 2.0 solution - large web-site with a number of depending assemblies (App_Code is inside on of them). I want to test web pages functionality - will web controls like GridView, FormView, DetailsView, etc insert and load the data from SQL Server 2008 p...

How to get instances in all private fields of an object?

I would like to use reflection to investigate the private fields of an object as well as get the values in those fields but I am having difficult finding the syntax for it. For example, an object has 6 private fields, my assumption is that I could fetch their FieldInfo with something like myObject.GetType().GetFields(BindingFlags.NonPu...

How to speed up export of .NET DataGrid to Excel?

I am using the folowing function to export the information from my DataGrid to Excel. But when it asks me if I want to Save or Export, it takes too long. Anybody knows why/anybody got similar experiences? void ExportToExcel3() { Response.Clear(); Response.AddHeader("content-disposition", "attachment;filename=FileName.xls"); ...

Can I use .net 4.0 beta without having vs2010?

Possible Duplicate: Can I use .NET 4.0 beta in Visual Studio 2008? I have VS 2008 professional, and yesterday installed .net 4.0 Beta 1 (without vs2010). I want to try parallel Fx lib, but I don't know how to add .net 4.0 references. It is possible to use 4.0 version without visual studio 2010? ...

Can I access the TLS of a DIFFERENT thread?

Long story short, I'm working on a .NET profiler that at one point gets a notification that a managed thread is running on a certain native kernel thread, which is not the currently executing thread. In this notification, I'm hoping to record a pointer in the TLS of the target thread. Again, that's not the current thread. I'm not seeing...

get the html text by executing url

Hi, We used chilkatdotnet.dll to do this. The dll has a function called GetEmail(url) that will execute the url and return the html text that is rendered by the url. for example if we say GetEmail('www.stackoverflow.com') it will return the html text same as the one that we get when we click on view source. We are trying to implement th...

Intelligent UTF-8 to UTF-7 in .NET

If I have a string of UTF-8 characters and they need to be output to an older system as UTF-7 I have two questions pertaining to this. How can I convert a string s which has UTF-8 characters to the same string without those characters efficiently? Are there any simple of converting extended characters like 'Ō' to their closest non exte...

RuntimeType instead of Type in C# Unit Test

Hi, In one of my unit tests I want to check if all public methods are returning type of ActionResult. Here's my test method: [TestMethod] public void Public_Methods_Should_Only_Return_ActionResults() { MethodInfo[] methodInfos = typeof(MyController).GetMethods(BindingFlags.Public | BindingFlags.Instance | BindingFl...

CruiseControl .NET - what to configure to avoid multiple triggering of CI builds

Hi, I want got CuriseControl .NET based CI process installed for my development - a small team of 15 developers, concurrently working on several projects in one solution. Now my question is what do i need to configure so as to avoid any potential multiple concurrent CI builds getting triggered. I amy be asking a stupid question here, b...

Properties and Methods

I'm new to the .NET world having come from C++ and I'm trying to better understand properties. I noticed in the .NET framework Microsoft uses properties all over the place. Is there an advantage for using properties rather than creating get/set methods? Is there a general guideline (as well as naming convention) for when one should us...

How do I set the color of an individual point in an Excel scatterplot using .NET?

I am trying to set the color of individual points in an Excel scatterplot through C#, but can't get it to work. Here is the code I am currently using. Note that the MarkerStyle and MarkerSize part of the code works - so my issue is really about color. I suspect I am missing a cast somewhere. var point = (Excel.Point)series.Points(index)...

Dispose question

When you have code like: Bitmap bmp = new Bitmap ( 100, 100 ); Graphics g = Graphics.FromImage ( bmp ); Pen p = new Pen ( Color.FromArgb ( 128, Color.Blue ), 1 ); Brush b = new SolidBrush ( Color.FromArgb ( 128, Color.Blue ) ); g.FillEllipse ( b, 0, 0, 99, 99 ); g.FillRegion ( b, pictureBox1.Region ); pictureBox1.BackColor = Colo...

Unable to overwrite uploaded images in C# using the Image object

I am trying to create a utility in C# using the MVC framework where a user uploads a picture which is used to crop pieces out of to be used as thumbnail icons (only one user at a time will be doing this at any given time). The user can then upload a different picture and continue cropping. I have a controller action that handles the fi...

In .NET, how do I write a UTF-16 XMLDocument to a string with a BOM

I am building an XmlDocument on the fly in .NET with an xml document. I then transform that with the Transform() method of an XslCompiledTransform. The Transform() method threw an exception because an invalid character for the encoding was found in the stream. When I copy/paste the string with the help of the TextVisualizer in Visual St...

ASP.NET C#: Caching Database Results, When/How Invalidate (on per-record basis)

Hello, my application shows contact information (from approx. 2000 contact records with various detail information (names, phone numbers etc.) that form the base of a contact grid) which typically rarely changes. A good number of users have the authority to edit this information though, and if it is edited, it is required that the chang...

Prevent .NET config file being overwritten during install

I'm using InstallShield 2010 Express to install a .NET WinForms app. The latest InstallShield project is a major upgrade, so I've used the Upgrade Paths section to allow upgrades from earlier versions of my app. The problem is that config settings made during the initial install (written to Program Files\MyCompany\MyApp\myapp.exe.confi...

How do I build control that determines property value based on bound DataSource?

Hi, I have a database of people and shirts. Each person has specific shirts that he likes to wear. For this, I have three tables. Person, Shirt, and PersonShirt. PersonShirt consists of a list of rows with a PersonId and ShirtId. For UI, I'm using a CheckedComboBox. This is a combo box of checked items. For a specific person, the combo b...