August 2006 - Posts
The much awaited Internet Explorer 7 RC 1 available for download now. Download and give it a try. It's available for 64-bit Windows too (XP and 2003 Server).
As known, connection pooling is an inbuilt feature of ADO.NET that internally caches open database connections to serve for later requests. While the need to manually clear the connections in the pool may not really arise, .NET 2.0 gives you a knob to do so. Meet these two methods:
However, these methods do not clear/close the connections in the pool immediately. Rather, the methods "mark" any existing connections in the pool for close so that they are not used to fulfill database connection requests - this forces to create a new connection and return it to the caller. The actual closing of connections will happen at a later point of time.
Sample post done from Windows Live Writer application.
This is cool!
Get your copy from the download page.
One of the cool features in ASP.NET 2.0 is the ability to set focus to the input control having invalid input. This is accomplished by setting the SetFocusOnError property of the associated validator control(s) to true. However, the same feature can be achieved in ASP.NET 1.x using the documented and undocumented client-side API of the ASP.NET validation framework. Here is how:
Plug in the following script block in the .aspx file
var refCtl = null;
for (var i=0; i<Page_Validators.length; i++)
refCtl = document.getElementById(Page_Validators.getAttribute("controltovalidate"));
if (refCtl != null)
In the code-behind, have this one liner in the page's load event:
<submit button>.Attributes.Add("onclick", "setFocus();");
This code has been tested for ASP.NET 1.x with Internet Explorer 6+.
As part of the software factory releases, Microsoft has released Web Service software actory today. Check it out at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/servicefactory.asp
Other service factories:
1. Smart Client Software Factory: http://msdn.microsoft.com/smartclientfactory
2. Mobile Client Software Factory: http://msdn.microsoft.com/library/en-us/dnpag2/html/mcsflp.asp
I was recently tasked with developing a utility for Tablet PC - this utility will let users sign using pen/ink and store the signature as an image file. Trust me, I have not even touched a tablet PC before (shameful!) and thinking about writing a utility, be it .NET or non-.NET looked as a big task.
Anyway, I decided to get my hands dirty and started searching MSDN to see what I need to do tablet PC development using .NET. Apparently what I all needed was just a 15MB file - Microsoft Windows XP Tablet PC Edition Development Kit (ver 1.7), thats it -I don't even need a tablet PC (mouse can be substituted for the pen!).
After running through few articles through some googling and the SDK documentation, things became not at all complicated. All it took to accomplish the task - giving a ink surface to let the user sign using the pen and saving it as a file - was just less than 10 lines of code!
InkOverlay InkOverlay1 = new InkOverlay(Panel1.Handle, true);
InkOverlay1.Enabled = true;
byte signData = InkOverlay1.Ink.Save(PersistenceFormat.Gif, CompressionMode.Maximum);
FileStream signFileStream = new FileStream(@"C:\SignImage.gif", FileMode.Create);
signFileStream.Write(signData, 0, signData.Length);
I've attached the utility screenshot and the saved file. Power and productivity of of .NET!!
A new MSDN-like document generator, code-named "Sandcastle" is available (in CTP) from Microsoft. It is said to be working with and without XML-based document comments and generates HTML Help-based help file. I am planning to give it a try this week-end!
Download it from http://www.microsoft.com/downloads/details.aspx?FamilyID=E82EA71D-DA89-42EE-A715-696E3A4873B2&displaylang=en
Microsoft has made MSDN Library available for free download now. It was earlier available only for MSDN subscribers. Users with low-bandwidth connections may not be really happy because the download size of the libarary (full) is more than 1.5 GB!!
Anyway, May 2006 edition of MSDN Library is here: http://www.microsoft.com/downloads/details.aspx?FamilyId=373930CB-A3D7-4EA5-B421-DD6818DC7C41&displaylang=en. Download and enjoy!