.net-3.5

Subtext 2.1.2 SecurityException

I'm trying to get Subtext 2.1.2 working on my local machine (IIS7). I downloaded the zip file (http://subtext.googlecode.com/files/SubText-2.1.2.zip) and extracted it, then created the application in the directory. Now, when I try to run the application it throws a security exception (note: I am running full trust). Here's the exception...

Update binding of TreeViewItem using code? (XAML / WPF)

Hey I have a TreeView whose ItemsSource is set to a Model I have. 3 levels deep is an object whose state can change and, rather than write a View and ViewModel for each stage (very lengthy business) I wanted to just update this using code. So basically I have an event that is fired once my model updates, I catch it then find the TreeV...

Date Input Validator (dd-MMM-yy, client side) ASP.NET 3.5 + MaskedEditValidator

I need a client-side date validator on a text box. BAM - Custom Validator. Operator="DataTypeCheck", Type="Date". Boo-ya. Golden, except that all dates get input in the format dd-MMM-yy. This method works fine for "12/12/2009" but fails on "12-Dec-09". So, how do I get client side validation of dates in whatever format I choose to ent...

.Net Framework v3.5, Service Pack 1 for windows 7

When i try to install .Net Framework v3.5, Service Pack 1 on my PC wich have a windows 7 os an error message tels me that there is a compatibility probleme. How can do to execute this installation??? ...

How to effectively work with devices over a serial connection?

I have struggled with this for a long time, and I did get a solution working eventually but it wasn't pretty, and I am hoping to gain a little wisdom from the stackoverflow community about how this should be done. Basically I am working with motors that connect to the computer using a daisychained USB connection and I have to communicat...

.Net c# Generic issue

Here is an example : public class B<T> {} public class D : B<int> {} public class A<T, S> where T : B<S> {} public class C : A<D, int> {} public class Test1 { public class test1 { A<D, int> t = new C(); } } What I would like do to is in declaring class C, only say : C : A<D>. Why I need to repeat int ? Because int...

Disable "envelope" key on Samsung i760

I wrote a simple "baby smash" style program for my Samsung i760 with C# and the .Net Compact framework version 3.5 recently. I kept it very simple and it works for the most part. When I let my daughter "test" it out the first thing she did was to press the envelope key on the physical keyboard which brings up the messaging screen. I spen...

any quickstart guides for .NET 3.5?

Hi, I have been programming with .NET 2.0 version for quite sometime and would like to move onto the latest version to keep up-to-date with latest technology. the latest version seems to have many new concepts like WPF, WCF, LINQ etc. what is the best way to quickly learn the basics of these new technologies without spending months readi...

Creating portable (non-installing) windows applications in C#

I have a .net 3.5 application and i'd like to make it portable. It's simple and runs perfectly, i've sent the .EXE + .DLL's to some friends and it works as intended when running the exe with the .DLL's and the .ICO (that i have used in it) along in the same folder. What i want is simple: creating a single EXE file that cares the dll's, ...

Saving Bitmap Images in WPF via C#

Hey I display images in my WPF app using BitmapImage. However, I would like an easy way to save these (as JPG) to a different location (ideally into a Stream or object that can be passed around) Is it possible using BitmapImage or do I have to use other means? If so what other means are there for either loading an Image and saving as J...

Can a .Net 2.0 winforms client app connect to a Windows Server .Net 3.5 WCF service? - architectural advice needed

In the bank I work all client workstations have .Net 2 installed it is outside my control to influence or get a newer version of the framework installed at the client end. On the server end I have more control and can write a .Net 3.5 WCF service if I choose. I've an existing fat client that I'd like to refactor and shift it's data acc...

Delaying or briefly pausing windows messages

Hello, I have a Winforms DataGridView in my application. When the user selects a row and hits enter, I load a new form with details related to that row. It takes about a second to get the data and show the screen. Some of the users are pretty fast and they start entering keystrokes relevant to the form e.g Pg Down/Pg Up, even before...

ListBox Foreground Color Problem for Selected Item Without ItemContainer

The following code, behaves little strange. <ListBox SelectionMode="Multiple"> <StackPanel> <TextBlock>Selection is Black</TextBlock> </StackPanel> <ListBoxItem> <StackPanel> <TextBlock>Selection is White</TextBlock> </StackPanel> </ListBoxItem> </ListBox> Note that first selection stay...

Finding the first number in a string using .NET 3.5

I have a bunch of strings I need to extract numbers from. They're in the format: XXXX001 XXXXXXX004 XX0234X There's a lot of these, and i need to loop over them all and extract all the numbers. So what's the quickest/most efficient way, using ASP.NET 3.5, to find the first instance of a number within a string? Update I should've inc...

Conditional formatting in a DataGrid using .Net Compact Framework 3.5

This is very standard in the full .net version. I want to Bind to a collection of objects and then handle a RowDataBound event of some sort and change the background color of the row based upon one of the objects properties. Is this possible in Windows Mobile using the .Net CF 3.5? ...

Is my asynchronous I/O callback function recursive?

I'm writing an asynchronous read callback function and as I'm learning C# at the moment would like to ask if the following is recursive (It's not mine but mine will be similar is construct): protected void ReadCompleted(IAsyncResult iResult) { byte[] byIn = (byte[])iResult.AsyncState; try { F...

Exception from Lambda Expressions

Strange one that i don't still get, is this: Say, try { stateClient.Socket.BeginSend(messagePrefixed, 0, messagePrefixed.Length, SocketFlags.None, ar => stateClient.Socket.EndSend(ar), stateClient); } catch (SocketException ex) { // Handle SocketException. } catch (ObjectDisposedException ex) { // Handle ObjectDispo...

Loading a .NET 3.5 assembly via reflection in .NET 2.0

I have an interesting situation and am trying to do something that I'm not even sure is possible. I have a .NET 2.0 project that via reflection loads an assembly, and calls a specific method on that assembly. We are looking at moving forward and starting to use .NET 3.5 in the environment, but want to minimize risk with regard to this ...

Converting a generic list to a CSV string

I have a list of integer values (List) and would like to generate a string of comma delimited values. That is all items in the list output to a single comma delimted list. My thoughts... 1. pass the list to a method. 2. Use stringbuilder to iterate the list and append commas 3. Test the last character and if it's a comma, delete it. Wh...

Customized WrapMode in DataGridView

I'm using an editable DataGridView Windows form to display a list of variables which can have different types of information, the format of which is unknown to the application: paths, strings, numbers, and so on. The form is using source data binding. Some of the values may be long, and I would like to display them on several lines rath...