.net-3.5

ASP.net iFrame wanna-be

I have been tasked with a project where I am to add a new application and have it within an older application (web applications). This is an internal application and management decided that they want it wrapped in this older app. The older application is a ASP.net web app using the 3.5 framework. My original plan was to use jQuery and...

WinForms Retrieve Keyboard State without Form/UserControl

I'd like to retrieve the state of the Ctrl keys in a place where I don't have a form. Normally to get a key state I'd use Control_KeyDown / KeyUp events. However, the code that needs to know whether Ctrl is pressed is outside any form. There is a form displayed, but the code is supposed not to depend on that form but finding the key sta...

Resolve path of Excel

Actually I intended to ask the following question: For an executable that lies in a directory defined in %PATH%, how can I find out in which of these directory it is found? because I need to run Excel from C# using Process.Run(...), and just indicating "Excel" works fine: Windows seems to know where to find it. However I need...

Possible ways to manipulate a thread's execution from another thread?

This is a two part question. First, let's say that I have a function that is executing in a another thread: private AutoResetEvent StopEvent = new AutoResetEvent( false); public void WorkerThread() { while( !StopEvent.WaitOne( 10)) { a(); b(); c(); } } Now I want to pause this thread. Thread.Suspend is out of the qu...

Display a "Yes / No" alert box in C# code behind

I am trying to display a "Yes / No" messagebox from codebehind in C#. I want to call an "AddRecord" procedure if the user clicks "Yes", and do nothing if the user clicks "No". Ideally, I want to use the code below, but from codebehind: OnClientClick = "return confirm('Are you sure you want to delete?');" I search on SO and google,...

WPF Combobox with auto-complete/auto-filter?

I am eager to find some solid (free, Open Source, or tutorial/example) code to make a WPF Combobox do autocomlete/autofilter as the user types. But everything I've tried so far has had some sort of problem... A Reusable WPF Autocomplete TextBox came close, but I can't get it to work with more than one filter (more info here). WPF autoc...

Creating a customized "Yes / No" alert box in asp.net (javascript) - Part 2

I am trying to create a customized messagebox using javascript but not getting too far. string txtConfirmMessage = "On " + DateTime.Now + ", "; txtConfirmMessage = txtConfirmMessage + sUserID; txtConfirmMessage = txtConfirmMessage + " added this record. Do you want to continue? "; btnSubmit.OnClientClick = @"return confi...

64-bit OutOfMemoryException with SqlDataAdapter

The environment is: 64-bit Windows ~50GB RAM .NET 3.5 SP1 SQL 2008 The code is (essentially, from memory): System.Data.DataTable table = new System.Data.DataTable(); SqlCommand command = new SqlCommand("SELECT XmlColumn FROM Table WHERE ID = UniqueID", Connection); SqlDataAdapter adapter = new SqlDataAdapter(command); adapter.Fil...

Running .NET 3.5 built Mixed mode assemblies in .NET 4 using app config requires Framework 3.5 as well

This is similar to already created thread here: http://stackoverflow.com/questions/3179028/mixed-mode-assembly-in-net-4 Using the app config, I was able to force the assemblies to run on .NET 4. On an XP Machine, I installed just the .NET 4 (without .NET 3.5 or 2.0) and tried to run the built application. It fails to load the mixed mode...

Adding WCF service reference with additional DLL breaks

I have the following classes defined in an external assembly from a third-party vendor: namespace ThirdParty.Vendor.Code { [Serializable] [XmlInclude(typeof(Test1Data))] [XmlRoot(Namespace = "", IsNullable = false)] public abstract class DeviceTestData { protected DeviceTestData(); } [Serializable] [XmlRoot(Namespac...

Can we add gmail widget in our application in developing in .Net3.5

I want to add gmail widget in my application so that user can check using gmail widget. ...

How to debug DTC issues?

I have a unit test for some code that occasionally throws a "The transaction has already been implicitly or explicitly committed or aborted." exception. Google gives me lots of wonderful hits but none that I've read seem to apply. If I run the unit test locally the exception is never thrown. If I run it on the build server manually the...

NamedPipeServerStream C# proper usage - I keep getting IOExceptions

I've been searching for a while but it seems to be difficult to find any definite answers on how to recover from exceptions thrown by calling NamedPipeServerStream.BeginWaitForConnection. I have an application that sets up a named pipe server on a well known name and listens for messages to perform certain actions. It works fine and da...

Weird DateTime.Parse exception in 3.5?

This line of code works on my computer (64-bit Win7). I tested on XP 32bits in a VM. It works fine. static bool HasExpire { get { return DateTime.Now >= DateTime.Parse("10/20/2010"); } } However on a client machine it throws this exception: An unhandled exception was generated during the execution of the current web request. Inf...

Will .NET Framework 1.x apps run on PC's with .NET 4.0 only?

Basically, i am trying to determin if an application made for 1.x will run on a computer with just one copy of the .NET framework installed which is a higher version than what i am targetting, ie: it only has one copy of .NET 2.0, or 3.0, or 3.5 or 4.0 - has one copy of either of these and thats it, the hypothetical computer would not ha...

dynamic data website using ado.net entity framework and mysql giving an error just on the server

I have an asp.net dynamic data website .net 3.5 built on ado.net entity framework with mysql database. Currently I have just one table in my entity model. Everything is working fine on my local machine but when i uploaded on my server i got this error message: "More than one item in the metadata collection match the identity 'mtDBModel...

Information needed on how to code for Windows 7 Taskbar in c#

Hello, What i know so far about how to code for win 7 taskbar features is that i can either use .net 4 or WinAPI code pack in .net3.5 or pinvoke. My question is that can i code for win 7 task bar features using .net3.0 or prev and using pinvoke can i use features such as thumbnail toolbar, jumplist, overlay icon Thanks ...

Difference in RIA services between .NET 3.5 and 4?

I am about to start a new project. Using VS2010, Silverlight 4, and RIA Services are a given. However, due to the web server we have available, there is some question of whether we can use .NET 4 or whether we will have to stick to .NET 3.5. I know that RIA Services can work with .NET 3.5. But what I'm curious about is whether there ...

Redirecting the Trace.axd output

I have a custom control that is show only with a given set of config values. I want to capture the trace.axd data and output it to this control. web.config writeToDiagnosticsTrace="true" ... <listeners> name="WebPageTraceListener" type="System.Web.WebPageTraceListener, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyT...

Tool that can combine many XSD files into one?

I need to create XML serializer classes for approximately 65 XSD files, for which I am using Microsoft's XSD.EXE to generate the C# code... However, I keep running into Window CMD's character limit in the resulting output file (in which XSD.EXE combines the name of every XSD included): "The specified path, file name, or both are too lon...