.net-3.5

Best way to interact with Command Line application

I need to write a component for an application that interacts tightly with a command line application. The command line application asks a series of questions, performs some computations, then terminates (which i need to detect). Essentially, i want to wrap up this interaction in a wrapper class. Has any one achieved similar in the past...

.NET 3.5 - Configuration system failed to initialize exception

In my winform app, I am trying to add a userSetting, although the error is occuring with appSettings too. When the setting is added I get an exeption thrown that says: "Configuration system failed to initialize" with a Inner Exception "Unrecognized configuration section userSetting" Exception Details: System.Configuration.Configuration...

Dynamically add multiple instances of the same user control type when button is clicked

Is it possible to add instances of the same user control when an "add" button is clicked and maintain ViewState? The user interface here is similar to the Gmail file-attachment process, where the user can click "attach another file" and another file upload box appears. My page is surrounded by an UpdatePanel. I am able to get 1 control...

Letterpress in WPF

How can I achieve the letterpress effect on a text in .NET WPF? ...

Improve coding with List Intersect using Net 3.5

I've a class that has a list of IDs with a function for adding new IDs from a list of objects. I've got this resolved, but I'm sure this can be done with much less code. Public Class Page Private _IdList As List(Of Integer) Private _HasNewItems As Boolean = False Public Sub AddItems(ByVal Items As List(Of Item)) Dim itemsI...

Can you develop using .NET 3.5 SP1 and run under just .NET 3.5

Can I develop a website which utilizes ADO .NET Entities in the .NET Framework 3.5 SP1 and then deploy it on another machine with just the .NET 3.5 framework? ...

Why is IEnumerable.Count() capped at 200?

Is there a limit to the rows that IEnumerable.Count() (or IQueryable.Count()) using LINQ to SQL? For whatever reason, if my query returns more than 200 records, I only get 200 from IEnumerable.Count(). I've even tried using IEnumerable.LongCount() (even though the number of results shouldn't be high enough to need it). I've also verif...

Convert System::DateTime to _timeb

I have a legacy C++-based application that timestamps incoming network traffic using the CRT _ftime() function. The _ftime() function returns a _timeb structure, which has a 32-bit and a 64-bit implementation. We are using the 32-bit implementation, which looks like this: struct _timeb { long time; // 4 bytes unsi...

Winform Checklistbox Headers/Columns

Is there a way to implement a new column with a header in a checklistbox in vb.net? I've done a bit of searching, but didn't find much on the topic. Should I just abandon the quest and use a listview or some other control? Thanks for any/all help! JFV ...

How can I test my server has .net 3.5 SP1 installed?

Hi, Is there a way I can upload a file to my web server to test whether .net 3.5 SP1 was installed properly? Maybe use a new feature or something? ...

Continuous Integration Fix for NAnt 0.86 Beta 1 with .NET 3.5

Hi All, I have been trying to use the latest NAnt (0.86 Beta 1) for a few weeks now in several .NET 3.0/3.5 projects as using multiple .sln solution files to build the platform code on my build server but alws ran to error and having this problem : BUILD FAILED Solution format of file 'C:***\Platform.sln' is not supported. ...

What's the best way to monitor a socket for new data and then process that data?

Please pardon my C#.Net newbie status. If this is obvious and I missed it from the docs, a link to the relevant page or sample code would be appreciated. I am working on an application that will accept a TCP socket connection from a Java application. (Yes, Java is required on that part. It's a Sun SPOT device and Java is the only option...

Custom ServiceHost in wcf configuration file?

hi there, i wonder if there is a way to specifiy a custom ServiceHost (i.e. a ServiceHost derived class) in configuration? thanks ...

Should I share the Entity-Framework context or create a new context for each operation?

I'm not that clear on the best-practice concerning the use and re-use of the entity-framework Context. My question is, should I try to create 1 context and re-use it many times for different queries or should I create a new context for each query? For example if I have a form with 10 charts all with data queried from the same tables, s...

Converting an XML document to fluent C#

I'd like to convert an external XML document without any XSD schema associated with it into a fluent .NET object. I have a simple XML file like: <application> <parameters> <param></param> <param></param> </parameters> <generation /> <entities> <entity ID="1"> <PropTest>Test</PropTest>...

How to retrieve text from the clipboard in partial trust

We have a RichTextBox WPF control and since we control the layout, we simply cannot allow any rich content... Therefor, we need to strip all data except text from the clipboard. For example, if someone is trying to copy/paste lets say text from a table directly from Microsoft Word, the RichTextBox also takes into account that this text...

ASP.NET MVC ViewData Null

Hi, I am currently creating an e-commerce site using C# ASP.NET MVC and have just come across a problem. On pages such as product pages and search results pages, I have to pass Lists of data from my controller to the ViewPage and that works just fine. However, a null reference exception occurs if the Viewdata equals null. It happens ins...

How to serialize an IList<T>?

I've got an OR mapper (iBatis.Net) that returns an IList. // IList<T> QueryForList<T>(string statementName, object parameterObject); var data = mapper.QueryForList<Something>(statement, parameters); I'm trying to use it in an webservice an want to return the data 1:1. Of course I can't return IList in a WebMethod, because it is an int...

Where can I get PLinq for VS 2008?

Since it's integration to the framework, the package seems to have been removed from the web. can someone point me to a download site where i can download it and use it with my .net 3.5 application? ...

Can I dynamically add HTML within a div tag from C# on load event?

Mind you, I am using master pages, but can I locate a div within the page and throw some html in there? Thanks. ...