.net

When should you not use an ObservableCollection and Databinding?

dhopton's comment got me thinking. What are some situations where you wouldn't want to use an ObservableCollection? ...

Do we need to install Complete Dotnet framework

Do we need to install complete donet frame work for just executing .net application, can't we just embedded the CLR in the Executable itself. ...

What pattern/patterns work best for developing rule/decision engine

I am working on a decision engine / rule evaluation engine. For example: Input: Customer and all the offences done by the customer Output: Consequences of the offences A sample case would be: Input: Customer(Jhonny Chimpo, 999-00-1111), Offences ( Broke window, slapped boss, kicked team lead in his groin) Output: Gets pink slip So ...

Synching object properties to DataTable

Hi all, I'm using a DataTable to sync some properties of a list of objects to a TreeView. When labels are edited, I want the relevant property of the relevant object to be updated, and labels to sync when the properties are changed elsewhere. Currently I'm updating the object's DataTable row when the property changes, and update the pr...

Windows Forms Control - Huge list of filenames

Which control would be best for showing a huge (300.000+) list of filenames? I've tried DataGridView, but it seems to be overkill and also slow. Are there better alternatives? ...

How to change toolstrip overflow Priority

I want design a componet,it work like win7 explorer's directoy bar,it will add toolstrip item to reflect all directoy,I do this.but when the width less than all componet's width ,it will overflow some button.it first overflow the most left button,nomally it will overflow the most right button,how can I do this? thk ...

Difference between Seq.map and Seq.collect in F#

In F#, what is the difference between functions "Seq.collect" and "Seq.map"? They seem equivalent from the description on MSDN. ...

Linq-To-SQL Check existance of a record before returning resultset.

I'm looking for a simple solution to replace my standardized junk way of validating whether a record exists before attempting to retrieve the data. Currently, whenever one of my methods are called, I do something to the effect of... private Record DoSomething(int id) { if(data.Records.Count(q=>q.Id==id) > 0) { return data.R...

Define RequiredAttribute on .net model depending on current user

I'm struggling with a basic concept that is used by DynamicData in ASP.NET or the DataForm in Silverlight. I do not have code since I'm still trying to understand the mechanism. As far as I understand Attributes, the idea is to annotate the model by adding a RequiredAttribute to a property of a model class to indicate to the framework, ...

Stripping MS Word Tags Using Html Agility Pack

Hi Everyone, I have a DB with some text fields pasted from MS Word, and I'm having trouble to strip just the , and tags, but obviously keeping their innerText. I've tried using the HAP but I'm not going in the right direction.. Public Function StripHtml(ByVal html As String, ByVal allowHarmlessTags As Boolean) As String Dim html...

Likelyhood of a PC having .net 2.0 framework installed

Hello, What is the likelyhood of a PC having the .net 2.0 framework installed nowadays .. ? ...

Invoking a Thread .NET .this vs. .control

I've noticed that when "giving focus" back to your main thread, when invoking from another thread, you can either invoke "this" or the control that you would like to, well invoke. I've noticed this doesn't matter when giving control back, so can anyone explain why I would invoke a control over the main thread? Does it matter, or is the...

How would I port this delphi 7 prog to .net (C#)?

http://forums.alliedmods.net/showthread.php?t=64767 The source acts like its missing a ton of stuff I can't find like uh TBX and some other things I don't really know the language, but I have hoping I could get it to compile with delphi 2009/2010.net and then see about porting its IL. (to C# I guess) The reasoning behind this is becau...

VB.Net and C# Projects in 1 Solution

Is there a way for me to create multiple projects using different languages under 1 solution in VS 2008? If so, how? ...

c# Creatchildcontrols / RenderContents problem..help

Hi there, I am trying to get a c# server control which i have already built to use not only create child controls but also rendercontents. At the moment my control uses the rendercontents method to do some fucntions and transform xml using xslt. this works great, however i then wanted to add after this transformation a couple of textb...

Is it possible to map multiple DTO objects to a single ViewModel using Automapper?

Hello, I was wondering if it is possible to map multiple DTO objects to a single ViewModel object using Automapper? Essentially, I have multiple DTO objects and would like to display information from each on a single screen in ASP.NET MVC 2.0. To do so I would like to flatten the DTO objects (or parts of them...) into the Viewmodel and ...

Extract PDF form field names from a PDF form

I'm using pdftk to fill in a PDF form with an XFDF file. However, for this project I do not know in advance what fields will be present, so I need to analyse the PDF itself to see what fields need to be filled in, present an interface to the user accordingly, and then generate an XFDF file from that to fill in the PDF form. How do I ge...

ASP.NET ProfileBase.Create behavior when supplied with an existing username

When supplied with a username that already exists, does ProfileBase.Create return the ProfileBase associated with the existing user (and if the username does not exisit, creates a new user and returns the new user)? Apologies for the trivial question, but MSDN documentation really is of little help. ...

C#/.NET library for source code formatting, like the one used by Stack Overflow?

I am writing a command line tool to convert Markdown text to html output, which seems easy enough. However, I am wondering how to get nice syntax coloring for embedded code blocks, like the one used by Stack Overflow. Does anyone know either: What library StackOverflow is using or if there's a library out there that I can easily reus...

How to get "raw" facts data from Analysis Services

We are developed a custom MOLAP engine for live processing a large amount of data in process. And now we got a requirement to integrate SSAS with our system. Dimension's meta info and attributes data are very easy to get. But how can I get facts data without making SSAS to calculate aggregates i.e. data that stored only on leafs? Aggre...