ASP.NET - Raj Kaimal

Browse by Tags

All Tags » ASP.NET (RSS)

XMLSerializer and invalid XML

A user had pasted some text from powerpoint into a textarea in one of our web apps which was eventually serialized into XML. Upon trying to de-serialize the XML, the web server threw the exception below: System.InvalidOperationException: There is an error...
Posted by rajbk | 5 comment(s)
Filed under: , , ,

LINQ to SQL Paging Gotcha

.csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode...
Posted by rajbk | 3 comment(s)
Filed under: , ,

Windows 7 – Start Bar and Task Bar

I Installed 7 RTM yesterday and I am really  impressed by the speed improvements compared to Windows Vista. Even though I am still learning the new features, there are a couple of things I have seen that I really like so far. You can now click on...
Posted by rajbk | 2 comment(s)

FormView Binding Gotcha

Version: ASP.NET 3.5 SP1 When performing two way databinding, Null values and Nullables get changed to string.Empty in the FormView. The way the FormView control handles null values has caused me some grief :-( Consider a FormView bound to an ObjectDataSource...
Posted by rajbk | 1 comment(s)
Filed under: , ,

Uploading an Excel file to SQL through an ASP.NET webform

The method below describes how to upload a file to a webserver and then import the file into SQL using either LinqToSQL or SQL Bulk Copy. The sample code only shows how to import xls and xlsx files but it could easily be extended to support csv files...
Posted by rajbk | 3 comment(s)
Filed under: , , ,

Loading an XML file in your Silverlight project into memory

Version : Silverlight 2 Beta 2 Reading an XML file in an XAP package can easily be done with the help of a helper class like so: 1: public static class XmlHelper 2: { 3: public static XElement LoadDocument( string fileName) 4: { 5: //No longer required...
Posted by rajbk | 3 comment(s)
Filed under: , , ,

Connection strings in LINQ to SQL classes.

Version : VS 2008 RTW When you have a team working on a project that contains a LINQ to SQL class (dbml), you might see the following message when trying to add a Table entity or stored procedure in a dbml created by a fellow developer: The objects you...
Posted by rajbk | 5 comment(s)
Filed under: , ,

LinqDataSource exceptions

Prerequisite: LinqDataSource & SqlDataSource Master/Details When working with the LinqDataSource, you may get the exceptions listed below. 1. Operator '==' incompatible with operand types 'Int32' and 'Object' The exception occurs because anytime a...
Posted by rajbk | 7 comment(s)
Filed under: , ,

.NET Framework Libraries Source Code - License - MS-RL

When I first read Scott's post , I missed the Microsoft Reference License (Ms-RL) which the .net Framework libraries is released under. The key thing to remember is this: "Reference use" means use of the software within your company as a reference, in...
Posted by rajbk | 1 comment(s)
Filed under: ,

.NET Framework Libraries Source Code

Scott just announced that his team will be releasing the souce code to the .NET base class libraries, ASP.net, Windows Forms and WPF! The big advantage to this is that when you are stepping through the code, you no longer see the horrible "[External Code...
Posted by rajbk | with no comments
Filed under: ,
More Posts Next page »