.net

console.writeline >> redirectedoutput.txt garbled

I have a VB.NET 3.5 sp1 console application running on Windows XP sp3 from a batch file: "D:\Program Files\PartsDepotJob\PartsDepotJob.exe" >> "D:\Program Files\PartsDepotJob\partdepot.log.txt" The output looks like the following: 2/10/2009 9:03:19 AM Processing PO#: 2100 in 002 Created OE# 135 Processing...

String Templatization Engine for .Net

I’ve hit the need to be able to store templatized content separately from the code that generates the dynamic fields that fill that content (think mail merge in word). The use case generally revolves around the fact that I want to write code that can send out some type of dynamic content (often an email) which I want to allow my users to...

Calling managed code from Access 2003

I have cross posted on access-programmers.co.uk Please post responses on that forum is possible.. I have compiled a dll in c# 3.5.. where I set the solution properties to register the build for COM interop. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.InteropServices; name...

web service intermediarry between client and internal app design.

I'm creating a wcf web service that will be accepting many continuous requests, the web service will need to hold onto those requests until an internal application (which will be polling the web service every couple seconds) will make a request to the web service to determine if any requests exist and retrieve them if so. The internal a...

How do I pull value from a DataValueField?

I have a drop down list that reads from the SQL database. depending on the option selected, I want to pull the actual 'value from the DataValueField. how do I do that? Page_Load(object sender, EventArgs e) { ... ddlOption.DataTextField = "Option"; ddlOptions.DataValueField = "OptCode"; ... } protected void ddlOptionSelectionChange(ob...

Disable right click in silverlight

We're using silverlight in a kiosk type scenario. Is there a way to disable the right click ability to enter the silverlight configuration dialog? ...

Smooth scroll in Windows Forms ListBox

Is there a way to enable smooth scroll for ListBox class in Windows Forms framework? (I'm using C# and .NET framework 2.0). ...

Is there a way to see the color that will display for a .NET color name?

I'm using System.Drawing.Color, is there anything in Visual Studio that can display the color for the name? For example if I used Color.Cornsilk what would color would be displayed? ...

How to change the url based on a Drop Down List?

I am using a Drop Down List for selecting some options. Everything works fine, all I need is to change the name in the URL. Is there a way to change the URL ONLY based on the option? Default Puma - Default.aspx?Dept=Shoes&Type=Puma if Nike is selected - Default.aspx?Dept=Shoes&Type=Nike ...

Migrating to VSTO / Excel Interop Options

Hi We currently have an Excel spreadsheet containing a large amount of VBA code. The VBA code is responsible for: Manipulating, transforming and formatting sheet data. Making calls to C# and C++ COM exposed functionality. In doing so marshalling the sheet data into the C#/C++ methods, getting the results and updating the sheet with ...

What is the difference between Dim v As String() and Dim v() As String?

This may sound trivial, but what is the difference between Dim v As String() and Dim v() As String in VB.NET? ...

What is the correct way to sequence DLL versions

I've always understood that each number in the version (ex: 1.2.3.4) is treated as an regular int value. We are using some third party DLLs that follow a different convention and it seems to be causing problems with our patching process (patch won't overwrite the old DLL with the new one). The old version of the DLL is 1.38 The new ver...

allow .NET 2.0 runtime to run executables from network with full trust

Guys, this can't be for real I'm trying to make a .NET 2.0 executable run from a network drive and it turns out that since Microsoft .net 2.0 has no mscorcfg.msc installed on server 2003, in order to get one I have to install the full SDK. I simply want to run the dang thing without downloading 350Mb piece of crap! Sorry for rant... An...

What does it mean when a js error points to a part of the viewstate?

I am fairly inexperienced with asp.net ajax and am having a problem where a javascript error is thrown (object not found). The debugger then stops and points to a substring of my viewstate it looks something like the following (not exactly this since my viewstate is huge) with the section between the ellipses highlighted: <input type="...

How do I keep the Drop Down List option to be highlighted after a Redirect?

Hi, I am pulling my ddl options from a database, which sets the order of the list. How do I keep the selected option to display when I Response.Redirect? Page loads with Adidas -(ddl list order) Adidas, Nike, Puma when Nike is selected -(ddl list order) Adidas, Nike, Puma for Puma - -(ddl list order) Adidas, Nike, Puma Right now, t...

Uses for OnItemDataBound

What would you realistically use OnItemDataBound for on a Repeater ? ...

How to use different files in a project for different build configurations - Visual Studio C# .net

I have a c# .net winforms solution and I want to create two different builds: one that supports IE6 and one that supports IE7. A few of the files in one of my projects are different for the IE6 build versus the IE7 build, so I want to include the IE6 files when I build for IE6 and the IE7 files when I build for IE7. What's the best way o...

Filtering a list

In some cases I've been using a DataTable, filtering it witha DataView and displaying the DataView in a DataGrid. I've recently started switching to using my own classes. For example: [Serializable] [System.Xml.Serialization.XmlRoot("Items", Namespace = "http://mycomp.com/test")] public class Items: List<Item> { } [Serializable] [Sys...

What is a good open source .NET application to learn from?

I'm looking for a small- to medium-sized, open-source .NET application to learn from and model my own development after. Key features: Good project organization Unit testing Design patterns Follows good OO design principles Clear, human-readable code VB.NET is preferred, but C# also appreciated. Thanks! Dupe of: http://stackoverfl...

.NET/COM Interop problem - opening Outlook 2003 Send Mail dialog

We have a WinForms app, written in VB.NET (CLR 2.0), that does a lot of Outlook-related stuff. One of the things we do is programmatically open up a new Outlook 2003 'compose new Email' form, pre-populated with the 'to' address. Me.WordApp = New Word.Application Dim template As Object = System.Reflection.Missing.Value Dim newTemplate A...