.net

Can I do this with an IQueryable<T> ?

Hi folks, is it possible to add an extension method to IQueryable<T> and then, for my Linq2Sql or EF or NHibernate or LinqToObjects, define it's functionality / how each repository will impliment this method / translate this method to some sql? For example, imagine I want the following :- var result = (from q in db.Categories() ...

how can i combined the framework and installer in single msi using wix

hello, how can i combined the framework and installer in single msi using wix. reply me soon Samir ...

how to change background color of form when image selected from menuitems

in my form, i have application to change background color of form, when the menu item selection changed, on which event the code is needs to write, pls help me thanks in advance.. ...

Debugging CommandBinding's CanExecute

I have a user control with a button bound to the NavigationCommands.RefreshCommand. The handler for the command is the parent control. The handler's CanExecute looks like this: e.CanExecute = !IsConnecting; // IsConnecting is a Dependency Property For some reason, the button will remain disabled until I click on the window. If I clic...

Silverlight 4 and TCP Sockets

Most of the software we develop has to communicate with hardware devices in the local network using TCP/IP, UDP/IP or serial ports. This is probably the only reason we still target WPF instead of Silverlight for our UI. Socket support in Silverlight 2/3 is poor at best and way to limited. I've read the updated desktop mode in Silverligh...

ODP ADO.NET driver returns decimal with extra zero in string representation

Hello, Today's problem is as follows: we have a table in an Oracle database. The table contains a field that is of the type Number(18, 3). On the surface, both saving and loading data from said field work perfectly. However, further inspection reveals, that numbers that have three decimal digits in them, e.g. 500.001, are read from the...

net csharp LinkButton : Handling Server and Client side Events

I have a LinkButton server control which have some attached method in OnClick Event in somepage.aspx.cs file throw it's Id (control), I want to add another Server side Event also to that LinkButton. How to achieve that? Edit: on default.aspx.cs this is a line of code which open a new window lnlBtnProfile.Attributes.Add("onClick", "ne...

Configuring Automapper in Bootstrapper violates Open-Closed Principle?

I am configuring Automapper in the Bootstrapper and I call the Bootstrap() in the Application_Start(), and I've been told that this is wrong because I have to modify my Bootstrapper class each time I have to add a new mapping, so I am violating the Open-Closed Principle. How do you think, do I really violate this principle? public sta...

Difficulty in using VB Code Dom (having If expressions in generated code)

Hi guys, I have difficulty in using the vb code dom. Basically, I want to compile this piece of code dynamically: Imports System Imports System.Collections.Generic Imports Microsoft.VisualBasic Namespace Formula Public Class TsCalculator Public Sub New() End Sub Public Shared Function Evaluate(ByVal Ts As Dictionary(Of String, ...

how will I call the on change event of the ajax dropdownlist?

Hello All, In my MVC application I am using an ajax dropdownlist and an ajax Cascading dropdownlist I want to write the onChange event of the cascading dropdownlist please tell me what shall I do. I am posting the view page that I am using and the js file that creates the cascading dropdownlist.Please tell me where all the places I nee...

Performance profiler for .NET with an API

I'd like a profiling application for .NET with an API for me to use to gain on-the-fly metrics and then dynamically alter application settings for performance optimisation. Does such a program exist? Thanks ...

How to select a second level cache provider in nhibernate

i have a 3 tier app, .net 3.5 one db infinite servers that talks directly with him. my orm impl is fluent nhibernate. i wanna use second level cache on servers cause of the long distance between them and the db. whats best cache provider for my case? i already implemented a notification mechanism that can clear updated items from cache ...

References not updating in Solution Explorer.

I had added some references to my C# Windows Projects through the Solution Explorer. When I am trying to load the same project on another machine, I see a yellow mark on all the references that Visual Studio is not able to detect. Therefore, I installed all the libraries that were being referenced, but still Visual Studio is not updating...

Changing the homepage from default.aspx to abc.aspx

i have designed my homepage of my webpage as abc.aspx not default.aspx . How can set the abc.aspx as homepage? ...

How to bring a system out of standby programatically?

Is there a way to do it in c# or vb.net? I have to bring a system out of standby and play a notification sound if it is in standby mode, at specific time intervals. Is this possible? ...

C# arrays: finding custom minimal element

How do I specify a custom code for comparison when finding a minimal element in my Array? For example, I have two arrays: int[] a = new int[] {3, 6, 8}; int[] b = new int[] {9, -2, 5}; I want to figure out, what would be the minimal ratio of the elements with respective indexes (i.e. find minimum of 3/9, 6/(-2) and 8/5) and then retu...

What news/talk from the Microsoft PDC (2009) will have the most effect on you as a programmer?

(I have made this a community wiki) As a programmer that mostly works with .NET, the feature direction of the Microsoft development platforms have a great effect on my feature work. The recent PDC gives an insight into where Microsoft is going with it’s development platforms. So what from the PDC do you consider will have the most e...

.NET assembly in bin folder isn't found by webservice

I'm trying to deploy a webservice, and everything worked fine, until I changed the version number of one of the referenced dll's. The old version used to be 1.0.0.0 the new one is 1.0.0.1. This assembly is in the GAC (the SharePoint application also uses it) and in de bin folder of the webservice. I have re-compiled the application mul...

How to decrypt a string in cobol

Hi i'm looking for ways to decrypt a string in cobol that was encrypted in .net using RijndaelManaged. I have control of the algorithm so it doesn't need to be Rijdnael, but i just need to ensure that the data is encrypted. Any help advice is appreciated. Thanks Sean [Edit] - the data is encypted in a c# windows service that i've cre...

Reconnecting a disconnected network drive

If I try to write a file to a network drive, that is disconnected, I get an error. If I doubleclick the drive in explorer, the network drive is reconnected. Using System.Io.Driveinfo.IsReady I can check if a drive is ready - but how can I reconnect it in code? ...