Chris Pietschmann

husband, father, hacker, entrepreneur, futurist, innovator, autodidact

NAVIGATION - SEARCH

WI-INETA: Scott Hanselman to present at WI .NET Users Group's Deeper in .NET 2006!

On April 22nd at the Wisconsin .NET Users Group's Deeper in .NET 2006 event, Scott Hanselman will be presenting on "Anatomy of a Successful ASP.NET Application: Inside DasBlog". DasBlog is one of the most popular ASP.NET blogging engines. In this presentation Scott will cover creative uses of HttpModules and HttpHandlers, using background threads within ASP.NET, internationalization, caching, skinning, creating a macro language, Web Services that are more than SOAP and more. This day long event... [More]

ASP.NET: Registration of Controls in Web.Config

In ASP.NET 1.x controls had to be registered in each page they were used. New since ASP.NET 2.0, controls can be registered in the web.config file. Visual Studio 2005 supports full intellisense when editing .aspx pages. This feature allows commonly used controls to be more easily used through out your application. Web.Config <system.web> <pages> <controls> <add tagPrefix="mycontrol" src="~/Controls/Header.ascx" tagName="header"/> <ad... [More]

ASP.NET: Maintain Scroll Position On Postback

The MaintainScrollPositionOnPostback page directive attribute allows pages to automatically maintain the current scroll position across postbacks. This feature is usefull for large pages where scrolling is necessary to view input controls down further on the page. This works in ASP.NET 2.0 and later.

<%@ Page MaintainScrollPositionOnPostback="true" %>
A simple but very usefull feature.

ASP.NET: The secret App_Offline.htm file

If you place a file named app_offline.htm into the root of an ASP.NET 2.0 application, the application will shutdown and any page request for the application will return this file instead. This feature makes it extremely easy to take down an application while a large update is being made. As soon as you remove the file any page requests to the application will continue as normal. This works with ASP.NET 2.0 and later. http://weblogs.asp.net/scottgu/archive/2005/10/06/426755.aspx

ASP.NET 2.0: "Atlas" now has a Go-Live license

At last, the new March ASP.NET "Atlas" CTP comes with Go-Live. I downloaded the latest release and am planning on playing around with it alot soon. I've been waiting for it to have a Go-Live license so I can use it in some of my personal projects I'm working on. If you don't know what ASP.NET "Atlas" is; it's basically an AJAX (Asynchronous Javascript And Xml) framework for ASP.NET 2.0. They are also expected to be releaseing an Atlas Refresh this month, which includes bug fixes and more featu... [More]

ASP.NET: Use VB.NET and C# within the App_Code folder

When I was creating my new blog site (this site your looking at), I chose to write it in C#. I had a problem with the App_Code folder because I had some code in VB.NET code and some C# code I needed to put in there. I didn't want to rewrite my VB.NET code in the App_Code folder just so I could write the rest of the code for the site in C#. Luckily, the ASP.NET Team had already thought about just this kind of circumstance. They implemented a way to partition the App_Code folder into sub-fold... [More]

Are you ready to go Deeper in .NET!?

It's time for the Deeper in .NET 2006 event. This years event will be held Saturday April 22, 2006 at the Hyatt Regency Milwaukee. Registration is FREE for this full day packed full of excellent speakers, Free food and plenty of door prizes (books and software). You even have a chance to WIN a copy of MSDN Premium Subscription with Visual Studio 2005 Team Suite, worth over $10,000, if you register by April 18th! I have attended the last two annual events, and my expectations have always been ex... [More]

The My namespace in Visual Basic 2005 is extensible!

Yes, that's right. You can add your own custom functionality to the My namespace. Microsoft has even created a My.Blogs library that adds functionality for read and writing to blogs. And, there is an MSDN TV episode that explains how to use My.Blogs. Simplify Common Tasks by Customizing the My Namespacehttp://msdn.microsoft.com/msdnmag/issues/05/07/My/ My.Blogs Code Sample for Visual Basichttp://msdn.microsoft.com/VBasic/Downloads/Code/MyBlogs/ MSDN TV: Adding Blogging to Your Apps with ... [More]

T-SQL: Parse a delimited string

Parsing a delimeted string in T-SQL is fairly simple to do, but it does take a nice little chunk of code. I most commonly use this chunk of code when I need to pass an array from an application into a SQL Stored Procedure. The best way to implement this code into an application would be to create a SQL Function that you pass in a delimted string and it returns a table of values. This way you don't have to duplicate the code everytime you want to use it. The following example parses the delimete... [More]

ASP.NET Development Server: Run application on Root

The ASP.NET Development Server inside Visual Studio 2005 runs the web application in a subfolder by default instead of on the root. This is an annouance for some. Can't it be configured to run the web app in the root? Yes, it can and theres an explanation of how to configure it on Scott Guthries blog. "How to Run a Root “/” Site with the VS/VWD 2005 Local Web Server"http://weblogs.asp.net/scottgu/archive/2005/11/21/431138.aspx

MSN Spaces Removes Chinese Bloggers Blog

If this guy really doesn't want to be sensored then he needs to go pay a hosting provider to host his own website. Then he can blog about what ever he wants. I host my blog on my own website because I know I can trust myself to not victimize myself with political concerns. Read the story:http://rconversation.blogs.com/rconversation/2006/01/microsoft_takes.htmlhttp://scobleizer.wordpress.com/2006/01/03/microsoft-takes-down-chinese-blogger-my-opinions-on-that/ MSN really has two option... [More]

My new website is coming soon!

An new year and a new look for PietschSoft.com is coming! I am currently working on a new website for PietschSoft.com. My blog isn't going anywhere. Since it is the main content of my site I am making it the center of my site. I am working on making existing URL's for my blog still work with the new site. But, I'm not sure if I'll maintain compatibility for the URL of the RSS feeds. For any of you who are consuming the RSS feeds; they may break when I launch the new site. If any of t... [More]

ASP.NET: How to get a specific ConnectionString from the Web.Config by name

You have your ConnectionString for your ASP.NET web app stored in the Web.Config file. Now how exactly how do you get that ConnectionString out of there from within your code? Sample Web.Config section with a ConnectionString: <connectionStrings> <remove name="LocalSqlServer" /> <add name="LocalSqlServer" connectionString="Data Source=myDBServer;database=myDB;Integrated Security=True;" providerName="System.Data.SqlCl... [More]

ASP.NET Client Callbacks inside a User Control

Implementing Client Callbacks (AJAX) in ASP.NET 2.0 is actually really simple to do as long as you know a little JavaScript. Heres is a small example of using a Client Callback from within a User Control. I've tested this example with IE6 and Firefox 1.5 1 <%@ Control Language="VB" ClassName="ClientCallbackControl"%> 2 <%@ Implements Interface="System.Web.UI.ICallbackEventHandler"%> 3 <script runat="server"> 4 ''This is the variable that holds the client callback ... [More]

T-SQL: Join Tables by a Field that contains a delimited string

This is the first time I ran into a situation where I needed to Join two tables (one with a varchar field and one with a varchar field that contains pipe delimited data) so I decided to post it for other who may not know you can do this. Below is a simplified example with solution of getting all rows of the first table whos values are contained in the pipe delimited field of the second table. This is really simple to do and you don't even have to use any User-Defined Functions or Cursors to... [More]

.NET Framework - Check if Windows booted in Normal or Safe Mode

Heres a really small code sample on how to check which mode Windows was booted up in (Normal or Safe Mode). This works in .NET 1.x and 2.0.   1 'This code checks to see which mode Windows has booted up in.  2 Select Case System.Windows.Forms.SystemInformation.BootMode  3 Case BootMode.FailSafe  4      'The computer was booted using only the basic files and drivers.  5      'This is the same as Safe Mode  6 Case BootMode.FailS... [More]

RSS is no longer a one-way street

The Simple Sharing Extensions (SSE) from Microsoft is a specification that extends RSS allowing a bidirectional flow of data. I haven't read through the entire FAQ yet, but this sounds awesome! The SSE specifications are being licensed under the Creative Commons license, which allows anyone to use it and extend upon it as they see fit. Microsoft's SSE FAQ states:For example, SSE could be used to share your work calendar with your spouse. If your calendar were published to an SSE feed, chan... [More]

ASP.NET 2.0: URL Mapping with RegEx Support

The one big limitation of the URL Mapping functionality built in to ASP.NET 2.0 is that it doesn't support regular expressions. I ported my v1.1 URL Mapping implementation over to v2.0 and added support for regular expressions. It really wasn't too difficult; I only had to modify two lines of code to port it over to ASP.NET 2.0. Then I had to modify 4 lines of code to add RegEx support. My implementation works just like the ASP.NET 2.0 URL Mapping functionality with the addition of RegEx... [More]

VS '05 & SQL '05 Express Editions Available Now FREE!

The Express Editions of Visual Studio 2005 and SQL Server 2005 are now available for Free download. According to the site the Express Editions will be available for download for a period of 1 year. And the best part about the license agreement is there are no licensing restrictions that prohibit you from developing software with the Express Editions for commercial use. Download Site: http://msdn.microsoft.com/vstudio/express/

Configure Visual Studio 2005 for "Classic" ASP syntax highlighting and intellisense

You can use the Visual Studio 2005 IDE to edit your Classic ASP files and still utilize syntax highlighting and intellisense. All you have to do is associate the “.asp“ file extension with the Web Form Editor. When doing this you are telling the IDE to treat “.asp“ files the same as “.aspx“ files, in turn sort of “tricking“ the IDE in to giving you the syntax highlighting and intellisense that you want. The steps in setting up the IDE are as follo... [More]

Get Visual Studio 2005 and SQL 2005 Free!

If you attend Microsoft's Best of Visual Studio 2005 Launch or Microsoft's Best of SQL Server 2005 Launch and you'll receive a free copy of Visual Studio 2005 Standard Edition and SQL Server 2005 Standard Edition. VS '05 Launch - http://msdnevents.com/launchSQL Server '05 Launch - http://technetevents.com/launch  

A deep talk about ASP.NET Web Controls

This is another great episode of The .NET Rocks show. This weeks episode is all about writing Web Controls in ASP.NET. I think this is one of the more advanced topics they've covered on the show. I listened to it a couple times and since I don't author too many user controls, I think I'll have to play with more of the stuff they discuss. Miguel Castro on Web ControlsCarl and Richard run into Miguel Castro at a hotel bar at the MVP Summit 2005 in Bellevue, WA. This is the first real show we've d... [More]

FBI to get veto power over PC software?

There's no way they'll be able to keep me or anyone else from writing software and distributing it. I think software (like speech or text) qualifies under the 1st amendment. I can say or write what ever I want with out being punishable by law. Someone listening to my speech or reading my letter is no different than running my software. Even if somehow this would get passed, there is no way they'd be able to enforce it. Even if they were able to legally get Microsoft and Apple to make thei... [More]