.net

Fix a font size for .NET GUI

Hi, Depending on the font settings (DPI and such) on the user's computers, I can have text become too big to fit in a button and moves down to the next line (wrap), so if it is a small button that says "Do xyz", it will only show "Do" unless I increase the height on the user's computer, but it looks fine on mine. Is there any way to fo...

Most elegant way to morph this sequence

Hi folks: I've got the Day of the week stored in a database table (that I do not control), and I need to use it in my code. Problem is, I want to use the System.DayOfWeek enum for representation for this, and the sequences are not the same. In the database, it's as follows: 1 2 3 4 5 6 7 S M T W T F S I need it as follo...

monitor table in data base

hi all i want to make a web site to act as a monitor to a certain table in data base or act as a listenter on that table eg lets say i have table employees i want to make a web page that listen to changes occurs on that table (all DML operations) whenever a record is inserted i want this page alert me that a "1 row is inserted in tab...

MVVM Light toolkit - maintained? Here today - gone tomorrow? ...

Hi there, I have been taking a look at mvvm light toolkit, i must admit i haven't got a lot of experience with it but i live what i see.. I did use the mvvm toolkit (microsoft) but currently use vs 2010 and no templates are available as yet. I was looking for some insight into mvvm light toolkit... Is it always maintained ? i..e its...

How to use Transaction in Entity Framework?

How to use transactions in Entity Framework? I read some links on Stackoverflow : http://stackoverflow.com/questions/815586/entity-framework-using-transactions-or-savechangesfalse-and-acceptallchanges BUT; i have 3 table so i have 3 entities: CREATE TABLE Personel (PersonelID integer PRIMARY KEY identity not null, Ad varchar(30), S...

My Visual Studio 2008 web application keeps throwing a .Net error when I first run it, but refreshing fixes it

As stated in the title my web application builds successfully, although every time I run it in debug mode I get the following .Net error: If I hit refresh then the application gets no more errors until I next start it up again, any ideas? Here is my global.asax file: <%@ Application Language="C#" Inherits="MyCompany.Web.MyApp.Shell...

How can I configure a Factory with the possible providers?

I have three assemblies: "Framework.DataAccess", "Framework.DataAccess.NHibernateProvider" and "Company.DataAccess". Inside the assembly "Framework.DataAccess", I have my factory (with the wrong implementation of discovery): public class DaoFactory { private static readonly object locker = new object(); private static IWindsorC...

How can I get JSLint.VS Addin to work with Visual Studio 2010?

I love the JSLint add-in - very useful. Having just upgraded to VS2010, I want it working in my new environment. The problem is, regardless of location/path, it does not show up in the Addin Manager (under Tools menu). Any ideas? ...

mark rows as deleted or updated befor loading them in a dataset

Hello, I'm developping a sync solution enables filtering but is there any way to load the changes form the source database into a dataset and mark the deleted or updated rows to transfer this dataset to client and update its data? thanks. ...

Should the code being tested compile to a DLL or an executable file?

I have a solution with two projects. One for project for the production code and another project for the unit tests. I did this as per the suggestions I got here from SO. I noticed that in the Debug Folder that it includes the production code in executable form. I used NUnit to run the tests after removing the executable and they all fa...

Sample MS application for ASP.NET MVC?

I am getting started with my first MVC project and want to start off on the right foot. I know the basics of how to create a quick and dirty MVC application. However, I'd like to get my hands on a resource that uses best practices for developing ASP.NET MVC applications (either a document or a sample quickstart app) Any help is apprecia...

Windows Mobile 6 - .net Socket advice [Compact Framework 3.5]

Hi, I'm trying to open a socket that will receive all packets sent to the Windows Mobile Device over the Active Sync network. I'm using code from: CS Network Sniffer for Windows Specifically: //For sniffing the socket to capture the packets has to be a raw socket, with the //address family being of typ...

Transaction in Entity Framework refactoring and best performance

I try to use transactions in Entity Framework. I have 3 tables Personel, Prim, Finans. In Prim table you look SatisTutari (int) if i add data in SatisTutari.Text instead of int value adding float value. Transaction must be run! Everything is ok but how can I refactoring or give best performance or best writing Transaction coding! I have...

How can i Execute a Controller's ActionMethod programatically?

Hi folks, I'm trying to execute a controller's Action Method programatically and I'm not sure how. Scenario: When my ControllerFactory fails to find the controller, I wish it to manually execute a single action method which i have on a simple, custom controller. I don't want to rely on using any route data to determine the controller/m...

How does Windows differentiate between a regular EXE and a .NET exe?

This might be a duplicate entry. Excuse me if it is. I was asked in an interview as to how Windows OS differentiate between a regular EXE and a .NET EXE. My reply was, when a .NET exe is build, the compiler puts some information into the header. The information is PE32 or PE32+. Windows verifies the header to determine if it needs to...

Andromda and .Net Web Service

Im starting a new project in .net and i want to used andromda framework for code generation, i had used andromda for J2EE code generation and it works great for me, but reading at Andromda site could see that it works with .net as well, so i decided to used for my new project but i couldnt find an web services implementation with it, bas...

.Net reflection to get description of class / property etc?

Hi, I know its unlikely but I was wondering if there is any way to get the comments (i.e. the bits after the ''') of a class or property..? I have managed to get a list of properties of a class using the PropertyInfo class but I cant find a way to get the comments / description.. I need it for a guide I am writing for the administrators...

midl.exe cannot load mscorlib.tlb

I'm trying to use midl to turn an idl file into a tlb. However, when I try I get this warning: warning MIDL2015: failed to load tlb in importlib : mscorlib.tlb and I then get a subsequent error: error MIDL2337 : unsatisfied forward declaration : _Object..... I'm certain that the error is due to the first warning. I've tried the same ...

What exception type to throw for unrecognized ID paramater?

ITool GetTool(Guid tool) { if (tool == Hammer.Id) return new Hammer(); else if (tool == Drill.Id) return new Drill(); else throw new ....? } What's the most appropriate exception type to throw here? NotSupportedException is the closest I've found but I don't think that's quite right. ...

With the .NET "WinForms" SplitContainer control, how can I hide a panel dynamically?

Calling MyPanel.Panel1.Hide(); or MyPanel.Panel2.Hide(); simply hides the controls inside the panel... but I want to have the other side of the panel fill up the whole space. So, if I hide Panel1, I want Panel2 to take up the whole space, and I want the splitter to disappear. Is that possible, if so, how? ...