Thursday August 17, 2006  |
 |
This looks very promising, more to follow:
|  | Posted at 1:56 PM by Dan Kohls | Comments () |  | |
|  | Posted at 2:36 PM by Dan Kohls | Comments () |  | |
Wednesday August 16, 2006  |
 |
For the first time ever, a new warning message appeared in my system tray this morning indicating that Visual Studio was waiting for an internal process and that I should contact Microsoft of this problem appeared regularly. After a little research, I found that running IISRESET from the command prompt cleared up the problem. However, it this problem persists, I might try the 'Repair' option under 'Add/Remove Programs'. |  | Posted at 9:57 AM by Dan Kohls | Comments () |  | |
Wednesday May 3, 2006  |
 |
A tip to easily identify which PC you're logging onto via a KVM, or for embedding login information for a Virtual PC image.
This setting allows you to add additional text to the title of the standard Windows Logon and Windows Security dialog boxes.
- Open your registry and find or create the key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
- Create a new String value, or modify the existing value, called "Welcome" and containing the text you wish to display.
- Exit your registry, you may need to restart or log out of Windows for the change to take effect.
To change the Message Shown on the Logon Box:
- Open your registry and find or create the key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
- Create a new String value, or modify the existing value, called "LogonPrompt" and containing the text you wish to display.
- Exit your registry, you may need to restart or log out of Windows for the change to take effect.
|  | Posted at 10:35 PM by Dan Kohls | Comments () |  | |
Tuesday May 2, 2006  |
 |
Intellisense The Intellisense feature in the Microsoft Development Environment need some cajoling to display parameter comments from class libraries.
The problem You diligently create summary comments, but they are not displayed by Intellisense when you're editing code in other projects.
IntelliSense works correctly if you're working within the same project, but not other projects within the same solution.
The solution The class library project must generate an XML Documentation File.
- Go to the assembly project (DLL Library) properties within the solution
- Change Configuration Properties. Set Configuration to "All Configurations". Go to Build | XML Documentation File.
- Set this field to exactly the same name as the assembly, adding the extent “.xml”. The name must match the DLL name or IntelliSense will not find it!
- Perform a “Rebuild Solution”. The environment will create an XML Documentation File, and copy it to the start up project bin directory, along with the associated assembly dll.
- Close the Microsoft Development Environment. Yes, close it.
- Run the Microsoft Development Environment...…and all should be fine. IntelliSense will now correctly display all summary comments
|  | Posted at 1:40 PM by Dan Kohls | Comments () |  | |
Tuesday April 25, 2006  |
 |
Sometimes the simplest tools can be the most difficult to deal with. Case in point: JavaScript. While you probably already know that the Visual Studio debugger works for C#, C++, VB, and J#, did you know that it works with JavaScript too?
Here's a quick way to get started:
1) Add the keyword 'debugger' to your JavaScript to debug. (i.e., debugger; )
2) In Internet Explorer, select 'Tools |Internet Options' from the menu, click on the 'Advanced' tab, and make sure 'Disable Script Debugging (Internet Explorer)' is not checked. Click 'OK' to save your change.
3) Start your ASP.NET application with Debugging.
Once the point of execution reaches the 'debugger;' statement, the code will appear within the Visual Studio debugger, where you can use the source code debugger commands that you already know and love!
|  | Posted at 10:50 AM by Dan Kohls
Modified on 4/25/2006 by Dan Kohls | Comments () |  | |
Monday April 24, 2006  |
 |
It wouldn't take too much effort to create a similar, simpler implementation for 1.0 & 1.1. |  | Posted at 9:09 AM by Dan Kohls | Comments () |  | |
Friday April 14, 2006  |
 |
When building your own control ASP.NET, it is often useful to store some of the control's properties in ViewState. However, ViewState is not guantanteed to always be available; it can be turned off at the Page or Application level, thereby crippling your control. Microsoft recognized this with version 2.0 or ASP.NET and introduced the concept of ControlState.
For those of us not fortunate enough to be able to use ASP.NET 2.0 all the time, I came of with the following solution:
Build your code behind properties using the following example:
public class WeekNavigator : System.Web.UI.UserControl { protected System.Web.UI.HtmlControls.HtmlInputHidden ControlState;
...
public DateTime SelectedWeek { get { if( ControlState.Value.Length==0 ) return DateRangeStart( DateTime.Now ); else { byte[] utfBytes = Convert.FromBase64String(ControlState.Value); string uncodedState = System.Text.Encoding.UTF8.GetString(utfBytes); return DateRangeStart( DateTime.Parse(uncodedState) ); } } set { byte[] utfBytes = System.Text.Encoding.UTF8.GetBytes(value.ToString()); string base64 = Convert.ToBase64String(utfBytes); ControlState.Value = base64; } } ...
}
In the .ASCX file, add the following control:
<input type="hidden" id="ControlState" runat="server">
|  | Posted at 11:40 AM by Dan Kohls
Modified on 4/24/2006 by Dan Kohls | Comments () |  | |
Friday March 17, 2006  |
 |
|  | Posted at 10:31 AM by Dan Kohls | Comments () |  | |
Wednesday March 8, 2006  |
 |
|  | Posted at 1:27 PM by Dan Kohls
Modified on 3/8/2006 by Dan Kohls | Comments () |  | |