.net

Unit testing with Expressions?

Hi All, I am unit testing some code that interactes with a repository, that takes an expression (Expression<Func<Entity, bool>>) to filter the results, like so: int orderId = 10; _respository.GetFiltered(order => order.Id == orderId); I am having a problem Unit Testing, more specifically setting up expectations that an expression wi...

Does .net nuke support ajax?

When i try to add a .ascx control which uses ajax, I get an error. Is there any way to include ajax built controls in .net nuke? ...

Mutual notification patterns

Propose to consider the following problem. Suppose we have some composite object. Are there patterns that describe the solution of mutual notification of composite object parts, when states of these parts are changed ...

How to use RegEx?

Hi, I haven't used RegEx so please excuse me... I have a string like: string str = "https://abce/MyTest"; I want to check if the particular string starts with "https://" and ends with "/MyTest". How can I acheive that? ...

Custom Numeric Format Strings: Dynamic Decimal Point

I am trying to format a double in C# such that it uses the thousand separator, and adds digits upto 4 decimal places. This is straight forward except that I dont want to have the decimal point if it is an integer. Is there a way to do this using the custom numeric format strings rather than an if statement of tenary operator? Currentl...

Can I specify a default namespace in my XSL stylesheet for each element created?

I am using .NET to transform XML from a DataSet to the sitemap format. Here is where I am at right now. As you can see, I create the root element with the correct namespace. I noticed that if I created child nodes, they all got an empty xmls-attribute (<url xmlns="">...</url>), unless I specified the namespace when I create the element i...

Display tooltip in dropdownlist items mouseover event

i have one database in that three column named id.name,mobile_no. i want to display mobile no as tooltip in dropdownlist items. dropdownlist item showing name . tooltip showing mobile number which is in database so fetch from database. how it is? rply i want code in c#.net ...

LDAP Directory Entry in .Net - not working with OU=Users

Hi Guys. I have the following code (C#): (Tweaked from: http://www.eggheadcafe.com/conversation.aspx?messageid=31766061&amp;threadid=31766050) DirectorySearcher dseSearcher = new DirectorySearcher(); string rootDSE = dseSearcher.SearchRoot.Path; DirectoryEntry rootDE = new DirectoryEntry(rootDSE); stri...

Reading CSV files in .NET?

How do I read large CSV files using C# & display it on the browser? ...

Command Line Parsing

I need a command line parsing utility. In the brief 10 second that I've spent googling, I found NConsoler. Can anybody recommend anything else? ...

So, .NET doesn't have built-in Office functionality?

I always thought it did, though I don't know where I got the idea... I'd always assumed it was easy to treat a spreadsheet as a 2D array for instance, but some searching on SO suggests everyone is using 3rd-party libraries? Or, are all those people needing a solutions which doesn't require Office to be installed... if I don't have this r...

Is there any way to get newly added rows in datagridview?

I have a datagrid view that is bind to a custom collection. I have add remove options in the UI which will add and delete a row in datagridview. Is there any way to get newly added rows in datagridview? ...

How can I define a custom (datamember) view for a databound sealed object on a combobox?

Take System.Drawing.Point for example. If wanted to bind a few points to a comboBox with a special view that displays: Point 1: 1, Point 2: 2 Point 1: 5, Point 2: -3 ... Point 1: -7, Point 2: -6 Since I can not modify System.Drawing.Point, and I would like a solution that works for a large dataset coming from a database, is there a way...

Long running jobs in Quartz.Net

I've a job in Quartz.Net which triggers quite frequently, and sometimes runs for long, how do i cancel the trigger if the job is already running? ...

Console application questions (build release/ not loading solution file)

I've got a couple questions about .net console applications. I created the console app, and included a solution file during the create, but when I open the solution file, it only shows the project, not the solution. Why doesn't the solution load in the solution explorer? Also, I don't seem to be able to build the project in 'Release' m...

.NET Remoting HelloWorld

This is my Hello World Remoting App. using System; using System.Collections.Generic; using System.Text; namespace Remoting__HelloWorld.UI.Client { public interface MyInterface { int FunctionOne(string str); } } using System; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime...

.NET Component for Excel 2003 spreadsheet generation using templates for formatting

The problem my application is trying to solve is this: Currently, several stored procedures are run, the data is manually copied out of the SQL results into a blank spreadsheet, and reporting analysts format the data. This process has been deemed too long and costly. The ideal solution (in my mind) is a .NET application with a componen...

Where can I find a list of Microsoft Paradox ODBC driver error codes?

I am currently using a Microsoft ODBC driver to connect a .NET application to a Paradox Database. Periodically I get errors like ERROR [HY000] [Microsoft][ODBC Paradox Driver] Reserved error (-3034); there is no message for this error. I would like to find a list of error codes that can translate -3034 into something that means somet...

Override the Refresh Crystal Report that brings up their criteria page

I have a vb.net winforms application. I have created a criteria form that populates parameters in a Crystal Report. These parameters are pretty simple, IE customerId, StartDate, EndDate, etc... This works fine, but if the user presses the crystal reports "Refresh" button on the CrystalReportViewer control then the CrystalReports criter...

Security and UAC for .NET

My WindowsForms application needs to access the Internet, but when I try to open a WebRequest the application crashes. I noticed when I run the application from a simple folder (My Documents for example) it works, but if I run from "Program Files" folder it doesn't. I know that the problem resides in the UAC permissions, but I don't unde...