<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Sonu Kapoor's WebLog</title><subtitle type="html">Application Developer, Writer and much more ...</subtitle><id>http://weblogs.asp.net/sonukapoor/atom.aspx</id><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sonukapoor/default.aspx" /><link rel="self" type="application/atom+xml" href="http://weblogs.asp.net/sonukapoor/atom.aspx" /><generator uri="http://communityserver.org" version="3.0.20510.895">Community Server</generator><updated>2004-12-09T12:29:00Z</updated><entry><title>Moved Blog</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sonukapoor/archive/2005/01/15/353645.aspx" /><id>http://weblogs.asp.net/sonukapoor/archive/2005/01/15/353645.aspx</id><published>2005-01-15T18:34:00Z</published><updated>2005-01-15T18:34:00Z</updated><content type="html">I have finally managed to move my blog to my own website, which I am still building. The blog however is already fully functional. Please update your bookmark to the &lt;a href="http://kapoorsolutions.com/blog/"&gt;new location&lt;/a&gt;. I really appreciate all the experience, which I got from weblogs.asp.net. Thanks so much.&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=353645" width="1" height="1"&gt;</content><author><name>SonuKapoor</name><uri>http://weblogs.asp.net/members/SonuKapoor.aspx</uri></author></entry><entry><title>Have you heard of Snippet Compiler?</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sonukapoor/archive/2005/01/08/349048.aspx" /><id>http://weblogs.asp.net/sonukapoor/archive/2005/01/08/349048.aspx</id><published>2005-01-08T05:00:00Z</published><updated>2005-01-08T05:00:00Z</updated><content type="html">Just saw this cool tool called "&lt;a href="http://www.sliver.com/dotnet/SnippetCompiler/"&gt;Snippet Compiler&lt;/a&gt;" and thought you would be interested in. Always wanted to compile quickly some code snippets without opening Visual Studio .NET and creating a new project? This small and easy to use tool lets you create such snippets with the benefit of having intellisense, compiler errors, warning, tooltips etc. . Here is a screenshot how it looks like:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.sliver.com/dotnet/SnippetCompiler/SnippetCompiler.PNG" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sliver.com/dotnet/SnippetCompiler/SnippetCompiler.zip"&gt;Downlod it here.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Sonu Kapoor&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=349048" width="1" height="1"&gt;</content><author><name>SonuKapoor</name><uri>http://weblogs.asp.net/members/SonuKapoor.aspx</uri></author></entry><entry><title>Manage TV viewing via XML</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sonukapoor/archive/2005/01/04/346282.aspx" /><id>http://weblogs.asp.net/sonukapoor/archive/2005/01/04/346282.aspx</id><published>2005-01-04T15:25:00Z</published><updated>2005-01-04T15:25:00Z</updated><content type="html">Ever heard of viewing&amp;nbsp;TV via XML? &lt;br /&gt;&lt;br /&gt; &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt; &lt;p&gt;&lt;a href="http://membled.com/work/apps/xmltv/"&gt;&lt;em&gt;XMLTV &lt;/em&gt;&lt;/a&gt;&lt;em&gt;is a set of utilities to manage your TV viewing. They work with TV listings stored in the XMLTV format, which is based on XML. The idea is to separate out the backend (getting the listings) from the frontend (displaying them for the user), and to implement useful operations like picking out your favourite programmes as filters that read and write XML documents.&lt;/em&gt; &lt;/p&gt;&lt;/blockquote&gt;Sonu&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=346282" width="1" height="1"&gt;</content><author><name>SonuKapoor</name><uri>http://weblogs.asp.net/members/SonuKapoor.aspx</uri></author></entry><entry><title>Currency Conversion rates via a Web Service</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sonukapoor/archive/2005/01/03/346002.aspx" /><id>http://weblogs.asp.net/sonukapoor/archive/2005/01/03/346002.aspx</id><published>2005-01-04T00:12:00Z</published><updated>2005-01-04T00:12:00Z</updated><content type="html">&lt;p&gt;Some time ago I found the following&amp;nbsp;&lt;a href="http://www.webservicex.net/WS/WSDetails.aspx?CATID=2&amp;amp;WSID=10"&gt;Web Service&lt;/a&gt;, which provides the currency conversion rates for free. The &lt;a href="http://www.webservicex.net/ws/default.aspx"&gt;WebSite&lt;/a&gt; also provides some other very nice services. I thought it would be interesting to bookmark that one. What kind of Web Service do you use to do the currency conversion?&lt;br /&gt;&lt;br /&gt;Sonu&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=346002" width="1" height="1"&gt;</content><author><name>SonuKapoor</name><uri>http://weblogs.asp.net/members/SonuKapoor.aspx</uri></author></entry><entry><title>Add a JavaScript Confirm function when deleting a row from a datagrid</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sonukapoor/archive/2004/12/29/343685.aspx" /><id>http://weblogs.asp.net/sonukapoor/archive/2004/12/29/343685.aspx</id><published>2004-12-29T15:41:00Z</published><updated>2004-12-29T15:41:00Z</updated><content type="html">&lt;p&gt;Lets say your datagrid looks like this:&lt;br /&gt;&lt;br /&gt;&lt;font face="Courier New" color="#a52a2a" size="2"&gt;&amp;lt;asp:datagrid OnItemDataBound="dg1_OnItemDataBound"...&amp;gt;&lt;br /&gt;&amp;lt;Columns&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;asp:TemplateColumn&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;ItemTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;lt;asp:Button runat="server" Text="Delete" id="btnDelete" CommandName="Delete" CausesValidation="false"&amp;gt;&amp;lt;/asp:Button&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;lt;/ItemTemplate&amp;gt;&lt;br /&gt;&amp;lt;/asp:TemplateColumn&amp;gt;&lt;br /&gt;...&lt;br /&gt;&amp;lt;/asp:datagrid&amp;gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;And in your ItemDataBound of the datagrid you just need to add this:&lt;br /&gt;&lt;br /&gt;&lt;font face="Courier New" color="#a52a2a" size="2"&gt;Sub dg1_OnItemDataBound(ByVal sender As Object, ByVal e As DataGridItemEventArgs)&lt;br /&gt;&amp;nbsp; If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CType(e.Item.Cells(0).FindControl("btnDelete"), Button).Attributes.Add("onClick", "return confirm('Are you sure to delete this item?')")&lt;br /&gt;&amp;nbsp;&amp;nbsp;End If&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;font face="Times New Roman" color="#000000" size="3"&gt;Sonu&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=343685" width="1" height="1"&gt;</content><author><name>SonuKapoor</name><uri>http://weblogs.asp.net/members/SonuKapoor.aspx</uri></author></entry><entry><title>&lt;XSLT:Blog /&gt; added TopXML.com to the legend list.</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sonukapoor/archive/2004/12/28/339039.aspx" /><id>http://weblogs.asp.net/sonukapoor/archive/2004/12/28/339039.aspx</id><published>2004-12-28T20:10:00Z</published><updated>2004-12-28T20:10:00Z</updated><content type="html">&lt;p&gt;&lt;a href="http://topxml.com/"&gt;TopXML.com&lt;/a&gt; is one of the companies I work for since a while and now they have been added as a &lt;a href="http://www.xsltblog.com/archives/2004/12/xsltblog_welcom_1.html"&gt;legend of the XSLT community&lt;/a&gt; to the &lt;a href="http://www.xsltblog.com/"&gt;&amp;lt;XSLT:Blog /&amp;gt;&lt;/a&gt;. I am sure that I dont need to explain what TopXML.com is about. If you dont know TopXML.com, I recommend that you take a look and you surely will understand why &amp;lt;XSLT:Blog/&amp;gt; added it.&amp;nbsp;A short &amp;lt;snip&amp;gt; of what &amp;lt;XSLT:Blog/&amp;gt;&amp;nbsp;thinks about TopXML.&lt;/p&gt; &lt;blockquote dir="ltr" style="MARGIN-RIGHT: 0px"&gt; &lt;p&gt;"As if I needed any more reasons to make myself look like a fool it seems I forgot to add one *VERY* obvious entry into my last post. To try and avoid any further embarrassment would like to welcome TopXML.com to the "Legends of the XSLT Community" section of this blog. If not obvious please visit TopXML.com and you will quickly understand why TopXML.com should be considered a legend of the XSLT community. TopXML has been promoting the use of XSLT for a very long time providing everything from sample code to complete applications built in XSLT to the development communities abroad."&lt;/p&gt;&lt;/blockquote&gt;Sonu&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=339039" width="1" height="1"&gt;</content><author><name>SonuKapoor</name><uri>http://weblogs.asp.net/members/SonuKapoor.aspx</uri></author></entry><entry><title>New Design on XMLPitStop</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sonukapoor/archive/2004/12/22/330024.aspx" /><id>http://weblogs.asp.net/sonukapoor/archive/2004/12/22/330024.aspx</id><published>2004-12-22T17:58:00Z</published><updated>2004-12-22T17:58:00Z</updated><content type="html">Just in the case you haven't recognized yet. &lt;a href="http://xmlpitstop.com"&gt;XMLPitStop&lt;/a&gt; has a new design and a cleaner structure. Furthermore we have an admin section which allows us to manage articles and code snippets easily. Feel free to submit your thoughts and ideas to &lt;a href="mailto:headgeek@xmlpitstop.com"&gt;headgeek@xmlpitstop.com&lt;/a&gt; . &lt;br /&gt;&lt;br /&gt;Sonu&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=330024" width="1" height="1"&gt;</content><author><name>SonuKapoor</name><uri>http://weblogs.asp.net/members/SonuKapoor.aspx</uri></author></entry><entry><title>Cast from type 'DBNull' to type 'String' is not valid.</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sonukapoor/archive/2004/12/21/329284.aspx" /><id>http://weblogs.asp.net/sonukapoor/archive/2004/12/21/329284.aspx</id><published>2004-12-21T23:00:00Z</published><updated>2004-12-21T23:00:00Z</updated><content type="html">&lt;p&gt;I have seen this question many times in the ASP.NET forums and thought that it would be a good idea to blog about. &lt;br /&gt;When you are working with functions in the HTML of your DataGrid and passing the value (which can be also NULL) from the database to a function, which accepts a string, then you will get such an error. &lt;br /&gt;&lt;br /&gt;Cast from type 'DBNull' to type 'String' is not valid.&lt;br /&gt;&lt;br /&gt;To get this working you will have to pass the value as an object. That means the function must simply accept it as an object instead of a string. Something like this:&lt;br /&gt;&lt;br /&gt;&lt;font face="Courier New" color="#a52a2a" size="2"&gt;&amp;lt;asp:datagrid id="datagrid".....&amp;gt;&lt;br /&gt;&amp;lt;Columns&amp;gt;&lt;br /&gt;&amp;lt;asp:TemplateColumn ...&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;ItemTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;%# DoSomething(Container.DataItem("TheValue")) %&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;/ItemTemplate&amp;gt;&lt;br /&gt;&amp;lt;/asp:TemplateColumn&amp;gt;&lt;br /&gt;&amp;lt;/Columns&amp;gt;&lt;br /&gt;&amp;lt;/asp:datagrid&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;And in your Codebehind:&lt;br /&gt;&lt;br /&gt;&lt;font face="Courier New" color="#a52a2a" size="2"&gt;function public DoSomething(Dim obj as Object)&lt;br /&gt;&amp;nbsp; If not IsDBNull(obj) then&lt;br /&gt;&amp;nbsp;&amp;nbsp;' Do the processing here...&lt;br /&gt;&amp;nbsp; End If&lt;br /&gt;end function&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Sonu&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=329284" width="1" height="1"&gt;</content><author><name>SonuKapoor</name><uri>http://weblogs.asp.net/members/SonuKapoor.aspx</uri></author></entry><entry><title>XML Reblogger passed 1000 posts in nearly one month</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sonukapoor/archive/2004/12/16/317361.aspx" /><id>http://weblogs.asp.net/sonukapoor/archive/2004/12/16/317361.aspx</id><published>2004-12-16T15:19:00Z</published><updated>2004-12-16T15:19:00Z</updated><content type="html">The Reblogger which was published on &lt;A href="http://weblogs.asp.net/sonukapoor/archive/2004/11/11/256040.aspx"&gt;Thursday, November 11, 2004&lt;/a&gt; and started initially with 127 posts has passed today Thurday, 16 December 2004 1000 posts in nearly one month. This is so great. &lt;a href="http://www.topxml.com/reblogger/"&gt;Interested in Reblogger for your own WebSite?&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Sonu&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=317361" width="1" height="1"&gt;</content><author><name>SonuKapoor</name><uri>http://weblogs.asp.net/members/SonuKapoor.aspx</uri></author></entry><entry><title>XMLPitstop is looking for Authors</title><link rel="alternate" type="text/html" href="http://weblogs.asp.net/sonukapoor/archive/2004/12/09/279007.aspx" /><id>http://weblogs.asp.net/sonukapoor/archive/2004/12/09/279007.aspx</id><published>2004-12-09T17:29:00Z</published><updated>2004-12-09T17:29:00Z</updated><content type="html">David Silverlight the headgeek of XMLPitStop.com told me that he is looking for authors who want to contribute articles on &lt;a href="http://www.XMLPitStop.com"&gt;www.XMLPitStop.com&lt;/a&gt;. If you have any ideas for an article and would like to publish it on XMLPitStop.com then you can contact either me via the contact page or directly David Silverlight (&lt;a href="mailto:headgeek@xmlpitstop.com"&gt;headgeek@xmlpitstop.com&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;Sonu&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=279007" width="1" height="1"&gt;</content><author><name>SonuKapoor</name><uri>http://weblogs.asp.net/members/SonuKapoor.aspx</uri></author></entry></feed>