.net

What is the Best WPF Ribbon Control Suite?

I'm going to add a WPF Ribbon UI to my program. What is the best suite of WPF controls including a ribbon control, based on your experiences? Thanks! ...

Should MVC Controller be in separate DLL?

I've created a .NET winforms MVC. The Controller and View are in the same EXE. Model is in a set of DLLs that get used by several groups. The MVC is very explicit. Model knows nothing of Controller and Controller knows nothing of View. I'm thinking to put the Controller in its own DLL so that it can be unit tested. Highly unlike so...

Write-only queue?

I'm working on an application that loads untrusted assemblies via an interface. Each of those assemblies should be able to add one or more GameAction objects to a thread-safe queue used by the server. The first iteration of design was to just pass the queue--something like this: public interface IGameClient { void HandleStateChange(I...

Microsoft Developer Certification

Can someone recommend how to get started in developer certification? Which certs should i get first? ...

Html.ActionLink in asp.net MVC object value in wrong format

I have a html.actionlink that i wish to display a link to a members profile page like this: http://somesite.com/members/{username} When use the following markup <%= Html.ActionLink(r.MemberName, "profile", new { MemberName = r.MemberName } )%> I get a link that looks like this: http://somesite.com/members?MemberName={username} What ...

Using Regex to edit a string in C#

I'm just beginning to use Regex so bear with my terminology. I have a regex pattern that is working properly on a string. The string could be in the format "text [pattern] text". Therefore, I also have a regex pattern that negates the first pattern. If I print out the results from each of the matches everything is shown correctly. The ...

Msbuild task - Build fails because one solution being built in release instead of debug

I'm hitting a weird issue with msbuild, and I'm thinking it might just be an environment issue. We're using msbuild to build a number of separate solutions, and it seems to work on my machine. But on a couple other machines, it's not working. I've tracked down the issue, and it looks like one of the solutions (or one of the projects i...

Performance penalty to running multiple service hosts?

Following on from this question: http://stackoverflow.com/questions/334472/run-wcf-servicehost-with-multiple-contracts Are there any performance penalties from running multiple service hosts as suggested in one of the answers? I am looking at implementing a solution with 4-5 service contracts, and could define one class implementing t...

Graphics tablet/stylus library

Does anyone know of any libraries for .net that allow you to use graphics tablets? specifically i am after the pressure sensitivity of the pen, but the 'eraser' and buttons on the pen would be useful too. thanks ...

Can you call a WCF with basicHttpBinding in a .net 2.0 winforms app?

Hi, From what I know basichttpbinding is backward compatible to .net 2.0 correct? It seems that when you reference the WCF service, the API is different. My service uses SSL, and it has a username and password you have to set. In .net 2.0 the API is totally different, and having issues calling an endpoint correctly. ...

How do I make a single test project for C++ and C#

Hi to everybody!! I'm kind a newbie in .net stuff, however I'm developing a same project in two languages, C++ and C#; nothing too complicated, just a couple of classes in each project that basically do the same. Now, I need to make a single test project for both sets of code, so my question is how can I make a project, most likely a c...

Capture console exit C#

I have a console application that contains quite a lot of threads. There are threads that monitor certain conditions and terminate the program if they are true. This termination can happen at any time. I need an event that can be triggered when the program is closing so that I can cleanup all of the other threads and close all file ha...

NULL vs Default Value in SQL Server Database

Are there any implications to using default values, such as empty strings, when inserting rows into a database. The problem with using nulls that they have to be checked for when using the data in an application, whereas a default value can be handled much easier. ...

LINQ COUNT on multiple columns

If I have a table with a title column and 3 bit columns (f1, f2, f3) that contain either 1 or NULL, how would I write the LINQ to return the title with the count of each bit column that contains 1? I'm looking for the equivalent of this SQL query: SELECT title, COUNT(f1), COUNT(f2), COUNT(f3) FROM myTable GROUP BY title I'm looking fo...

Cruise Control .Net - Builds across domains

Currently our developent enviroment consists of a Dev server, a Staging server and a Production server. Our production server and staging server live on the same domain while our build server and dev server are on a different domain. Is it possible to have my build server (Cruisecontrol .Net) access the two servers that are outside its...

What reusable code should every developer have in their toolbox?

I'm trying to build up a library of reusable code to use from project to project. As I write code snippets and components, I'm trying to decide which libraries I will get the most use out of long term VS will I really use this again? What code or components do you reuse that should every developer have? I'm primarily interested in .net...

Best ORM Tool

I am looking for the best ORM tool for my upcoming .net web project. I have come across Tier Developer and MS Entity Model framework as the some of the choices. Does anyone guide me which one would be the best? Entity Framework model seems to have issues with referential integrity constraints (cascade delete). Which one would be a better...

Advice on text editor for custom document format or domain model

What I'm trying to create is a text editor backed by an XML document. This document will get read into a domain model I then want to allow editing. Some of the traits I'm looking for are: Display only textual content and not require escapes to link text to domain model (want to avoid showing any kind of markup) Types of sections can ha...

Defining an Entity Framework 1:1 association

I'm trying to define a 1:1 association between two entities (one maps to a table and the other to a view - using DefinedQuery) in an Entity Framework model. When trying to define the mapping for this in the designer, it makes me choose the (1) table or view to map the association to. What am I supposed to choose? I can choose either of ...

asp.net mvc and css: Having menu tab stay highlighted on selection

Is there a better way to do this? I have an HTML helper extension method that checks if the current tab menu is the the selected one and then chooses .selected css class or not. I put the html.IsSelected link in each li as <li class="<%=Html.IsSelected(string a, string b)%>" > where a is the tab name and b is ViewData assigned. i...