.net

Catching exceptions within .aspx and .ascx pages

The questions says everything, take this example code: <ul id="css-id"> <li> <something:CustomControl ID="SomeThingElse" runat="server" /> <something:OtherCustomControl runat="server" /> </li> </ul> Now if an error gets thrown somewhere inside these controlls (that are located in a master page) they will take down the...

Emulate hard disk in .NET

Is there a way to emulate a disk drive in .NET, intercepting read/write/lock operations? I would like to create something with a front-end similar to GMail Drive in C#. Thanks, Tom ...

how to send rich text message in system.net.mail

how to send rich text message in system.net.mail need code for send a mail as html ...

Is there a standard framework for .NET parameter validation that uses attributes?

Is there a standard framework (maybe part of Enterprise Library... or .NET itself) that allows you to do common parameter validation in method attributes? ...

How can use SQLBulkCopy on a table with a GUID primary key and default newsequentialid() ?

When using SQLBulkCopy on a table with a GUID primary key and default newsequentialid() e.g CREATE TABLE [dbo].[MyTable]( [MyPrimaryKey] [uniqueidentifier] NOT NULL CONSTRAINT [MyConstraint] DEFAULT (newsequentialid()), [Status] [int] NULL, [Priority] [int] NULL, CONSTRAINT [PK_MyTable] PRIMARY KEY NONCLUSTERED ( [MyPrimaryKey] ASC ...

Any decent text diff/merge engine for .NET ?

Requirements: free, preferably open-source implemented in one of the .NET managed langs Google found these: A Generic, Reusable Diff Algorithm on codeproject An O(ND) Difference Algorithm for C# Diff/Merge/Patch Library for C#/.NET by Joshua Tauberer EDIT: No apps please, only libraries. ...

Most wanted feature for C# 4.0?

Some blogs on the Internet give us several clues of what C# 4.0 would be made of. I would like to know what do you really want to see in C# 4.0. Here are some related articles: C# 4 tag on Jon Skeet's blog 4 features for C# 4 What do you want in C# 4 Future Focus - I: Dynamic Lookup .NET 4, C# 4 and the DLR Channel 9 also hosts a ve...

Can you run a version 3 .Net binary on a version 2 CLR install?

We're considering writing the next version of out project in using .Net 3, but are wondering if we can take the hit on forcing end users to install the .net framework version 3. ...

Is there any way to create a stand-alone ButtonSpec in Krypton Toolkit?

I need to create a button that has the same style as ButtonSpec with its type set to Context, is there any way to create a ButtonSpec that isn't directly attached to another control, or have I missed a simple style option on another control? ...

How to convert a Unicode character to its ASCII equivalent

Here's the problem: In C# I'm getting information from a legacy ACCESS database. .NET converts the content of the database (in the case of this problem a string) to Unicode before handing the content to me. How do I convert this Unicode string back to it's ASCII equivalent? Edit Unicode char 710 is indeed MODIFIER LETTER CIRCUMFLEX A...

Using own exceptions in wse, not only SoapException

Is it possible to send my own developed exceptions over Soap to a client using http.sys?? ...

Text diff visualization control for WinForms or WPF

In continuation of the my previous question, are the any good controls for text diffs visualization? Something like StackOverflow's revision diff viewer but for WinForms or WPF Requirements: free, preferably open-source based on WPF or WinForms No apps please, only components. I'm not interested in OSS diff tools ...

How to convert HTML to XHTML?

I need to convert HTML documents into valid XML, preferably XHTML. What's the best way to do this? Does anybody know a toolkit/library/sample/...whatever that helps me to get that task done? To be a bit more clear here, my application has to do the conversion automatically at runtime. I don't look for a tool that helps me to move some p...

How can I create database tables from XSD files?

I have a set of XSDs from which I generate data access classes, stored procedures and more. What I don't have is a way to generate database table from these - is there a tool that will generate the DDL statements for me? This is not the same as Create DB table from dataset table, as I do not have dataset tables, but XSDs. ...

can I expose a class from another .net namespace as a class in my namespace?

Can I expose a class from another .net namespace as a class in my namespace? I use a class - antlr.collections.AST - as the return type for a function belonging to a class in my namespace; as a result, the user has to have using antlr.collections; using myNamespace; at the top of their files in order to use my function. Can I make m...

How do you parse a HTML string for image tags to get at the SRC information?

Possibly a lame question. But I've yet to find an answer to it. Currently I use .Net WebBrowser.Document.Images() to do this. It requires the Webrowser to load the document. Its messy and takes up resources. According to this Question Xpath is better than a regex at this. Anyone know how to do this in C#? Thanks ...

How to resolve a .lnk in c#

Hi, I need to find out the file/directory name that a .lnk is pointing to using c#. What is the simplest way to do this? Thanks. ...

Securing an assembly so that it can't be used by a third party.

I have written an assembly I don't want other people to be able to use. My assembly is signed with a strong name key file, but how do I secure the code so that only my other assemblies signed with the same key can call the members in this assembly? ...

Writing XML files using XmlTextWriter with ISO-8859-1 encoding (C#)

I'm having a problem writing Norwegian characters into an XML file using C#. I have a string variable containing some Norwegian text (with letters like æøå). I'm writing the XML using an XmlTextWriter, writing the contents to a MemoryStream like this: MemoryStream stream = new MemoryStream(); XmlTextWriter xmlTextWriter = new XmlTextW...

Recommend an Open Source .NET Statistics Library

I need to calculate averages, standard deviations, medians etc for a bunch of numerical data. Is there a good open source .NET library I can use? I have found NMath but it is not free and may be overkill for my needs. ...