.net

FOSS Intelligent Character Recognition (ICR)

Does anyone know of an open source Intelligent Character Recognition (ICR) library? There seems to be plenty out there for OCR but I am focusing on recognizing handwriting and would love it if there was an open source solution out there. Thanks in advance, Jason ...

What is the best way to get and set selection when using databinding in winforms?

I use binding in a win-forms application (.Net 2.0), and I try to find the best way to maintain the selected items in my data bound controls. I read that the best way to access the selection is by using CurrencyManager's (or bindingSource's) "Current" and "Position" properties. The problem is that I can't find a way to select nothing (Po...

Setting up ASP.NET pages on IIS 6

I have virtual host where I have set up an IIS 6 server. In the extensions I have added ASP.NET v1.1.4322 and ASP.NET v2.0.50727 and set them to allowed, but I still get a file not found error when using aspx files. Do I need to setup mimetypes for aspx or anything else? ...

Why do my ASP.NET pages render slowly when placed on the server?

I have a simple aspx page with a GridView control. I'm loading the GridView with search results after the click of a button. Everything works, but the HTML rendering on the browser is very slow in IE with a result set > 2000 (works fine in other browsers.) I realize it's slow due to the record count, but is there a way I can make it fas...

Custom GridView Pagination

I started to work on a custom Gridview extension. I added some basic css stuff, looks ok, now I would like to move on. I never worked with custom control events. I currently have an error "event PageIndexChanging which wasn't handled." I have the MyGridview class in a something.aspx. I'd like to handle pagination in the MyGridview clas...

Translate this app.config xml to code? (WCF)

I have the following app.config section that I need to translate into code. I have seen several examples, but still cannot quite get it to work. Could anyone help? <system.serviceModel> <bindings> <basicHttpBinding> <binding name="MyService" closeTimeout="00:01:00" openTimeout="00:01:...

impersonation and BackgroundWorker

Hello guys, I have a little bit of a problem when trying to use the BackgroundWorker class with impersonation. Following the answers from google, I got this code to impersonate public class MyImpersonation{ WindowsImpersonationContext impersonationContext; [DllImport("advapi32.dll")] public static extern int Log...

Why doesn't my interface inherit?

I must be doing something wrong public interface IActor { //actor stuff } public class BaseShip : IActor { //base ship stuff } public class PlayerShip: BaseShip { //Only the stuff for this particular ship } Why then doesn't this work: IActor player = new PlayerShip(); Or List<IActor> actors = new List<IActor>(){new P...

Where can I download the free developer version/edition/pack of Crystal Reports for .NET?

I'm looking for version 11 if possible, but cannot find it. I have the older version that comes with visual studio 2005 but need the more recent one. Thanks for any help. ...

How to print a ReportViewer's report without showing a form

While I realize that I could just show the form off-screen and hide it, along with many other forms of WinForms hackish wizardry, I'd rather stick with the zen path and get this done right. I have a SSRS local report (so no server) that I want to give the user the option of either viewing or printing (in other words, I don't want to forc...

Web Services, ADO.NET Connection Pool, Timeout Error

If I have an .asmx Web Service that only exposes one call. One that takes a few params and inserts those values as a record in SQL Server 2005 table. What should that method look like to be as "kind" to the ADO.NET Connection Pool as possible? What should it look like if its going to be called maybe 10 times a second (spread out) over m...

How to get Total for a DataSet.DataTable on a GridView?

I have a gridview that shows (50)rows of data per page. I have the Total showing for the Amount that is shown due to a previous request by the user. Now they want to have the total for the Entire result, regardless of what page they are on. How do I do that? I did the following for my Complete Total Count: After the Gridview result ...

Organizing assemblies (assembly structure) in C#

Say you are writing an app like Photoshop where you have effects (filters), etc, should one make each of these filters a separate assembly using a separate project? The main idea is to have each of these filters as nodes, so think of it like: sourceImage -> Sharpen -> Darken -> Contrast -> Blur ... It seems to me that it would make s...

NMock2, Rhino mock. Which one to choose?

I'm using Visual Studio unit testing framework and have the need to using a mocking framework. And I'm not sure which of the mocking frameworks NMock2, Rhino mock that I should choose. Would you please share your experience? Thanks! ...

Value Equality with Bidirectional Association in C#

Background I have two objects which have bidirectional association between them in a C# project I am working on. I need to be able to check for value equality (vs reference equality) for a number of reasons (e.g to use them in collections) and so I am implementing IEquatable and the related functions. Assumptions I am using C# 3.0, ....

jQuery Dialog and Setting a Textbox Value

so I have a modal dialog i use with jQuery in my asp .net page. I am trying to set a textbox value using jquery. here is some sample code: <div class="popup-template popup1"> <div class="content"> <input type="text" id="tbX" value="asdf" /> <input type="button" onclick="$('#tbX').val('TEST VALUE');" value="Input Te...

Generating the next available unique name in C#

If you were to have a naming system in your app where the app contains say 100 actions, which creates new objects, like: Blur Sharpen Contrast Darken Matte ... and each time you use one of these, a new instance is created with a unique editable name, like Blur01, Blur02, Blur03, Sharpen01, Matte01, etc. How would you generate the next...

What is the fastest way to get varbinary data from SQL Server into a C# Byte array?

The title speaks for itself. I'm dealing with files/data near 2MB in size. ...

Create instance of generic type?

If BaseFruit has a constructor that accepts an int weight, can I instantiate a piece of fruit in a generic method like this? public void AddFruit<T>()where T: BaseFruit{ BaseFruit fruit = new T(weight); /*new Apple(150);*/ fruit.Enlist(fruitManager); } An example is added behind comments. It seems I can only do this if I give ...

Value equality comparisons on new objects

I've overridden Equals and GetHashCode in an abstract base class to implement value equality based on an object's key property. My main purpose is to be able to use the Contains method on collections instead of Find or FirstOrDefault to check if an instance has already been added to a collection. public abstract class Entity { publi...