<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sumit Gupta &#187; .NET</title>
	<atom:link href="http://www.sumitgupta.net/category/programming/net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sumitgupta.net</link>
	<description>bookmarking my life</description>
	<lastBuildDate>Wed, 08 Feb 2012 11:23:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>GDI+ Generic Error</title>
		<link>http://www.sumitgupta.net/gdi-generic-error/</link>
		<comments>http://www.sumitgupta.net/gdi-generic-error/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 08:28:54 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[VB.NET/VB]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[GDI+]]></category>
		<category><![CDATA[Generic Error]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=534</guid>
		<description><![CDATA[I see lot of people asking about GDI+ Generic Error. Since this is &#8220;generic&#8221; error nobody can tell what is wrong with code. So did a work around and get it working. I had this error quite a time in early days of my programming and just found same error in one of junior&#8217;s code. [...]]]></description>
			<content:encoded><![CDATA[<p>I see lot of people asking about GDI+ Generic Error. Since this is &#8220;generic&#8221; error nobody can tell what is wrong with code. So did a work around and get it working. I had this error quite a time in early days of my programming and just found same error in one of junior&#8217;s code. Well from my experience I can say one thing. GDI+ Generic error 99.9% means &#8220;developer miss a detail or overlooked something&#8221;. Most common reason of error are negligence of</p>
<p>1. Path should be physical path</p>
<p>2. All folder should present before you create file.</p>
<p>3. Previous files should be in write mode if case of overriding files.</p>
<p>4. Make sure permission are for writing to User of process.</p>
<p>5. Do not include any special character which windows do not permit in folder name or file name.</p>
<p>6. FILE FORMAT has nothing to do with this error most often.</p>
<p>7. Recheck permission if you try all above.</p>
<p>8. Recheck Path again <img src='http://www.sumitgupta.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>Point #7 and #8 are most important solution and always works for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/gdi-generic-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Static Object in ASP.NET</title>
		<link>http://www.sumitgupta.net/static-object-in-asp-net/</link>
		<comments>http://www.sumitgupta.net/static-object-in-asp-net/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 12:03:22 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[Concept/algorithm]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[VB.NET/VB]]></category>
		<category><![CDATA[SQLConnection]]></category>
		<category><![CDATA[Static Object]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=520</guid>
		<description><![CDATA[Recently I found a problem in one of application we developed. Here my colleague use a Static SqlConnection object through a class in his code. He did that to save his effort of writing and Connection everytime. Everything works great during our development and online reviewing. However as soon as we lauch website in beta [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I found a problem in one of application we developed. Here my colleague use a Static SqlConnection object through a class in his code. He did that to save his effort of writing and Connection everytime. Everything works great during our development and online reviewing. However as soon as we lauch website in beta mode, it start creating problem which seems bit random in occurance and hence were hard to track. During this time I get involve in the project development and I was not very big fan on Static object and start to think against that code, which looks good to me at first. However for some reason I miss the basic of C# and ASP.NET and hence it took a while to recognize the problem was indeed the static code. So for those who did same mistake here is explanation of why Static object didn&#8217;t work in ASP.NET for connection.</p>
<p>When ASP.NET application is first called the complete code is loaded in Memory, specially the pages in App_Code folder and they act as part of web server and not as standard PHP site where they run and loaded on each request. Hence, once this happens all static object become static in memory for each and every request your server will get. This is indeed good way to share information between all User and all request, if that help your case. But in most general case you never want to share information between user in this dynamic method, which is not permanent. Anyways, for connection it really doesn&#8217;t make a difference if you share the object as you anyways want to open connection and close it as soon as you are done. In most case you have 1 simple insert or fetch query to run. And in a website with several users at a time it hardly make a difference as Sqlconnection are open and close in jiffy and took less than 1 second in most cases. For a shopping cart which has 100 -200 order per month this case will work just fine.</p>
<p>However, since connection is shared, there is every possible chance that if you fire a SQL query for say Reader, it get shared with some user on some other session and this is what you don&#8217;t want. It happens to our project when we have Bulk CSV upload which usually take 30-50 seconds, but if someone during this time fires and open other page of website they start to get random Database related errors. From SqlReader is close to field &#8220;Xyz&#8221; is not available, as they tend to share the connection with other requests.</p>
<p>Hope you avoid those problem. The colleague who did this in our project is not working with us anymore, but hey, where ever you are , please don&#8217;t punish us like this again !!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/static-object-in-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Session in ASP.NET handler Page</title>
		<link>http://www.sumitgupta.net/session-in-asp-net-handler-page/</link>
		<comments>http://www.sumitgupta.net/session-in-asp-net-handler-page/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 20:10:35 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#.NET]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=495</guid>
		<description><![CDATA[To use Session data in Handler Class you need to implement IRequiresSessionState which is part of Following namespace (using for helping copy/paste ) using System.Web.SessionState; Self reminder]]></description>
			<content:encoded><![CDATA[<p>To use Session data in Handler Class you need to implement</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">IRequiresSessionState</pre></div></div>

<p>which is part of Following namespace (using for helping copy/paste )</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Web.SessionState</span><span style="color: #008000;">;</span></pre></div></div>

<p>Self reminder <img src='http://www.sumitgupta.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/session-in-asp-net-handler-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET JavascriptSerializer for Array</title>
		<link>http://www.sumitgupta.net/asp-net-javascriptserializer-for-array/</link>
		<comments>http://www.sumitgupta.net/asp-net-javascriptserializer-for-array/#comments</comments>
		<pubDate>Sat, 28 May 2011 09:52:51 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[VB.NET/VB]]></category>
		<category><![CDATA[Jquery]]></category>
		<category><![CDATA[Serialize]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=484</guid>
		<description><![CDATA[I need to throw some database entry which are as simple as TIME, for this I got a string array in my ASP.NET code behind. I was throwing this String Array in JSON format after using JavascriptSerialize.Serialize method and it is making not so perfect Json script. I said it is not making perfect json [...]]]></description>
			<content:encoded><![CDATA[<p>I need to throw some database entry which are as simple as TIME, for this I got a string array in my ASP.NET code behind. I was throwing this String Array in JSON format after using JavascriptSerialize.Serialize method and it is making not so perfect Json script. I said it is not making perfect json because the expect result for me was something like this:</p>
<p>["10:20","10:30","10:40"]</p>
<p>but it was returing something like</p>
<p>{&#8220;d&#8221;:&#8221;[\"10:20\",\"10:30\",\"10:40\"]&#8220;}</p>
<p>the difference is that it is converting the array in to string, however the ideal result can be</p>
<p>{&#8220;d&#8221;:["10:20","10:30","10:40"]}</p>
<p>But we cannot change that functionality now, so what I realise we should use the eval function of javascript to make our Jquery or whatever JSON parse you are using. So my Jquery code looks like</p>
<blockquote>
<p>&#8230;.</p>
<p>success: function(data) {<br /> var items = [];<br /> $.each(data, function(ind, val) {<br /> var myobject = eval(val);<br /> $.each(myobject, function(i, v) {                    <br /> items.push(&#8216;&lt;option value=&#8221;&#8216; + v + &#8216;&#8221;&gt;&#8217; + v+ &#8216;&lt;/option&gt;&#8217;);<br /> });<br /> });<br /> }</p>
<p>&#8230;</p>
</blockquote>
<p>this convert the String to Javascript object using Eval function. Easy enough !!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/asp-net-javascriptserializer-for-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Read System TimeZone to DB</title>
		<link>http://www.sumitgupta.net/read-system-timezone-to-db/</link>
		<comments>http://www.sumitgupta.net/read-system-timezone-to-db/#comments</comments>
		<pubDate>Sat, 07 May 2011 17:22:58 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[Operating System]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[TimeZone]]></category>
		<category><![CDATA[TimeZoneInfo]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=476</guid>
		<description><![CDATA[I was looking for the TimeZone Database which also need to told me if Given Timezone is DayLightSaving enabled or not. After searching few hours on Internet I found few database that do not tell the Daylight Saving stuff. Then I found a function in TimeZoneInfo class that list all System Timezone, I loop through [...]]]></description>
			<content:encoded><![CDATA[<p>I was looking for the TimeZone Database which also need to told me if Given Timezone is DayLightSaving enabled or not. After searching few hours on Internet I found few database that do not tell the Daylight Saving stuff. Then I found a function in TimeZoneInfo class that list all System Timezone, I loop through it and got what I need.</p>
<blockquote>
<p>using (SqlCommand sqlCmd = new SqlCommand(&#8220;&#8221;, Connection.MyConnection))<br /> {<br /> sqlCmd.CommandText = &#8220;Insert into tblTimezone (TimeZone, TimeZoneDifference, isDST) Values(@TimeZone, @TimeZoneDifference, @isDST)&#8221;;<br /> sqlCmd.Connection = Connection.MyConnection;<br /> sqlCmd.Connection.Open();<br /> foreach (TimeZoneInfo tzi in TimeZoneInfo.GetSystemTimeZones())<br /> {<br /> sqlCmd.Parameters.Clear();<br /> sqlCmd.Parameters.AddWithValue(&#8220;@TimeZone&#8221;, tzi.DisplayName);<br /> sqlCmd.Parameters.AddWithValue(&#8220;@TimeZoneDifference&#8221;, tzi.BaseUtcOffset.ToString());<br /> sqlCmd.Parameters.AddWithValue(&#8220;@isDST&#8221;, (tzi.SupportsDaylightSavingTime ? 1 : 0));<br /> sqlCmd.ExecuteNonQuery();<br /> }<br /> sqlCmd.Connection.Close();<br /> sqlCmd.Dispose();<br /> }</p>
</blockquote>
<p>Keep it simple <img src='http://www.sumitgupta.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/read-system-timezone-to-db/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working Lot of new methodology</title>
		<link>http://www.sumitgupta.net/working-lot-of-new-methodology/</link>
		<comments>http://www.sumitgupta.net/working-lot-of-new-methodology/#comments</comments>
		<pubDate>Sun, 23 Jan 2011 10:11:14 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Blog: My thoughts]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[Joyous]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>
		<category><![CDATA[WCF]]></category>
		<category><![CDATA[WebService]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=439</guid>
		<description><![CDATA[It is good to back as programmer. Loving my new phase of development career, I got involved in development of a online card game. After lot of thinking and reading, I decide to use some new technology and methodology which I have been hearing about a lot. I don&#8217;t dare to use them as I [...]]]></description>
			<content:encoded><![CDATA[<p>It is good to back as programmer. Loving my new phase of development career, I got involved in development of a online card game. After lot of thinking and reading, I decide to use some new technology and methodology which I have been hearing about a lot. I don&#8217;t dare to use them as I feel the kind of project we were doing lately are not big enough to learn and implement those concepts. After for this project it really become necessity to these technology rather than just a decision making. For example to build a game UI, I have three option GDI+, DirectX or WPF.. I have done GDI+ before and doesn&#8217;t feel it is best to make complex Graphical interface even for like of poker game. Though I use it to build Chess Interface, but I know how problematic it was. Second came in DirectX, the best but the complex solution. I need more time to learn it and project is getting delayed. Then I choose to learn and work on WPF which is relatively easier than DirectX.</p>
<p>It was really a nice decision to choose WPF. It is not only easier for me to learn as I already have some experience in HTML and web programming, but it give me control which is best suited for programmer of my culture. With no efforts I am now able to create a better looking UI. Ofcourse I didn&#8217;t test the UI on Windowx XP yet, but otherwise it looks great. I am not going to test it on Windows XP anyways as we don&#8217;t going to support it. Once I have the UI ready. I need to now communicate with Online database. So for this I already know the solution called as Web Services. But where will I found the Web Service in Visual Studio 2010 .. oh I think they rename it as WCF.. nope, they make a new concept altogether called WCF. Hmm.. with past experience of webservice I know that it was the perfect solution for me, but again WCF is almost similar no difference to code, so what harm it does to use it. Afterall it bring some new security measure and ease. So I again learn WCF and it took me 1 hr to cover the difference between Web Service and WCF and I am up and ready with my solution.</p>
<p>Making game UI is really so exciting that I am now looking for opportunity to upgrade my Chess game to WPF interface. Programming is really fun with those concept of programming and tools that I learn in recent past. It was complex then before in planning, but easy to implement. However the attitude of programmer is they need something ease to plan and implementation they are not bothered. I must suggest using WPF and WCF in your project where you need them. I haven&#8217;t try but they says WPF and Silverlight has same code or reusable. Well if that is the case then surely I will start giving Silverlight solution in next quarter or so.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/working-lot-of-new-methodology/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.NET 4.0 On IIS 6</title>
		<link>http://www.sumitgupta.net/net-4-0-on-iis-6/</link>
		<comments>http://www.sumitgupta.net/net-4-0-on-iis-6/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 18:45:18 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Server Configuration]]></category>
		<category><![CDATA[.NET 4.0]]></category>
		<category><![CDATA[IIS]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=392</guid>
		<description><![CDATA[With my dedicated Windows 2003/IIS 6.0 server I want to run latest version of .NET framework on it. Hence I use my Web Platform Installer to install .NET 4.0. Everything goes smooth. It was piece of cake to install it. Now the time came to run my first .NET 4.0 Framework application, I configure a [...]]]></description>
			<content:encoded><![CDATA[<p>With my dedicated Windows 2003/IIS 6.0 server I want to run latest version of .NET framework on it. Hence I use my Web Platform Installer to install .NET 4.0. Everything goes smooth. It was piece of cake to install it.</p>
<p>Now the time came to run my first .NET 4.0 Framework application, I configure a New website in IIS. Select .NET framework 4.0 from ASP.NET tab in Website property. But what I found is I am getting 404 error. Strangely enough that Default.aspx page does exists and with .NET 2.0 it works just fine. So what goes wrong ? I search and experiment with web.config, but to no avail.</p>
<p>Then I found this article <a href="http://www.denalimultimedia.com/info/Articles.aspx?cid=20&amp;topic=IIS-6-ASP-NET-4-0-page-not-found-404" target="_blank">http://www.denalimultimedia.com/info/Articles.aspx?cid=20&amp;topic=IIS-6-ASP-NET-4-0-page-not-found-404</a>, which clearly mention that</p>
<ul>
<li>Install framework asp.net 4.0 and restart [Web Platform Installer does it just fine]</li>
<li>IIS 6.0 console should now display ASP.NET 4.0 under tab &#8220;ASP.NET&#8221; [It was again done if #1 above is right]</li>
<li>Under Web Services Extensions (in IIS console) .NET 4.0 framework might be set as: prohibited. This must be ALLOWED otherwise a browser might just return the error 404 page not found which is not very descriptive</li>
<li>ASP.NET 4.0 applications must be run in a separate process (Application Pool) otherwise you&#8217;ll get the error &#8216;Server Application Unavailable&#8217;.</li>
</ul>
<p>It is anyways always good to run different programming languages in different pool. For Example, if you want to run PHP on same server I use different pool for them. Covering those 4 steps I got my server working with .NET 4.0. Wondering why Web Platform Team forgot to complete 2 step in their installer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/net-4-0-on-iis-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make Web Not War</title>
		<link>http://www.sumitgupta.net/make-web-not-war/</link>
		<comments>http://www.sumitgupta.net/make-web-not-war/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 07:02:42 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Blog: My thoughts]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=355</guid>
		<description><![CDATA[This is what Microsoft has to say through it&#8217;s WEB portal (http://www.microsoft.com/web ), where it distribute one of leading platform for Web application development and deployment. Well this message can be a direct/indirect attack on those who thing Microsoft is up again only making $$$ and not services. Well guys you are wrong, check this [...]]]></description>
			<content:encoded><![CDATA[<p>This is what Microsoft has to say through it&#8217;s WEB portal (<a href="http://www.microsoft.com/web">http://www.microsoft.com/web</a> ), where it distribute one of leading platform for Web application development and deployment.</p>
<p>Well this message can be a direct/indirect attack on those who thing Microsoft is up again only making $$$ and not services. Well guys you are wrong, check this website out. You will find PHP and hence any software made on PHP works fine on Windows server and that to with easy. I am using PHP on Windows from IIS 5.5 and it always work fine for me, but with IIS 7 and MS WEB it is really getting much easier to install PHP and any application on it.</p>
<p>I like the concept and idea, love to see same thing from Apache when they start support for .NET framework ?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/make-web-not-war/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenXML : New office file format</title>
		<link>http://www.sumitgupta.net/openxml-new-office-file-format/</link>
		<comments>http://www.sumitgupta.net/openxml-new-office-file-format/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 10:28:33 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[VB.NET/VB]]></category>
		<category><![CDATA[file format]]></category>
		<category><![CDATA[Office 2007]]></category>
		<category><![CDATA[Office Open XML]]></category>
		<category><![CDATA[Open XML]]></category>
		<category><![CDATA[OpenXML]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=264</guid>
		<description><![CDATA[When I first heard that Microsoft change the file extension of MS Office Products and add &#8220;x&#8221; in them, I got surprised as that was not very common practise for me. But today when I word on that new file format, I really would say, it was a good move. Those who don&#8217;t know, Microsoft [...]]]></description>
			<content:encoded><![CDATA[<p>When I first heard that Microsoft change the file extension of MS Office Products and add &#8220;x&#8221; in them, I got surprised as that was not very common practise for me. But today when I word on that new file format, I really would say, it was a good move. Those who don&#8217;t know, Microsoft with Office 2007, has change the core of file format used by Office product, and with other office software getting popularity, they actually work on an Open File format/document format. This new file fomat is known as &#8220;office open XML&#8221; or OpenXML.</p>
<p>this file format is based on one idea, Create a XML of Data and formatting in file, zip it and save it. Simple and easy. This file format is not limted to MS Office, but OpenOffice.org understand it very well.</p>
<p>In my project I need to create an Excel file such that my user can generate a summary report in Excel fileformat on button click. All I need to do is add 10 more lines (Except data retrivel logic) in my software, include few library and I am done.</p>
<p>Thanks to <a href="http://simpleooxml.codeplex.com/">http://simpleooxml.codeplex.com/</a> which make my work easy, this is wrapper highlevel class based on Microsoft OpenXML Format SDK. which include some .NET assembly. This wrapper make it easy for you write Excel of Word document in few lines. A sample for ASP.NET is included from author, though I use it for Windows Application and it works like charm.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/openxml-new-office-file-format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pagination Query for SQL Server</title>
		<link>http://www.sumitgupta.net/pagination-query-for-sql-server/</link>
		<comments>http://www.sumitgupta.net/pagination-query-for-sql-server/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 13:30:39 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Pagination]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=246</guid>
		<description><![CDATA[In recent past, we got few problem when we need to do Pagination with SQL Server. I specially got frustrated when I saw that MySQL server has &#8220;limit&#8221; word that does pagination work in MySQL in best known manner for me, BUT microsoft didn&#8217;t consider that option yet. But today I found a method for [...]]]></description>
			<content:encoded><![CDATA[<p>In recent past, we got few problem when we need to do Pagination with SQL Server. I specially got frustrated when I saw that MySQL server has &#8220;limit&#8221; word that does pagination work in MySQL in best known manner for me, BUT microsoft didn&#8217;t consider that option yet. But today I found a method for SQL server that does the pagination in similar way as MySQL limit works. I am not very sure if it runs on SQL Server 2000 or earlier but it runs on SQL Server 2005. The magic word here is &#8220;ROW_NUMBER()&#8221; function that provides a Serial No. kind of Numbering to each record. So to do paging all you need to do is, make Query calling ROW_NUMBER() and you are done.</p>
<p>Here is sample of such query</p>
<blockquote><p>SELECT * FROM<br />
    (SELECT ROW_NUMBER()<br />
        OVER (ORDER BY EmployeeName) AS Row,<br />
        EmployeeId, EmployeeName, Salary<br />
    FROM Employees) AS EMP<br />
WHERE Row BETWEEN 2 AND 4</p></blockquote>
<p>I took this sample and knowledge from a great resources for .NET developer. Website URL is <a href="http://www.openwinforms.com/row_number_to_sql_select.html">http://www.openwinforms.com/row_number_to_sql_select.html</a></p>
<p>Hope you like the solution. Any alternative is welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/pagination-query-for-sql-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ZedGraph Unlocked</title>
		<link>http://www.sumitgupta.net/zedgraph-unlocked/</link>
		<comments>http://www.sumitgupta.net/zedgraph-unlocked/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 06:25:39 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[VB.NET/VB]]></category>
		<category><![CDATA[Control]]></category>
		<category><![CDATA[Windows Form]]></category>
		<category><![CDATA[zedControl]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=230</guid>
		<description><![CDATA[I was working on reporting application where I just need to create graphs and paste them on PDF file. For this I choose ZedGraph Control. It is perfect library I found. Although no new development is done on it lately. But they have nothing to code in it anyways.  They have good wiki and active [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on reporting application where I just need to create graphs and paste them on PDF file. For this I choose ZedGraph Control. It is perfect library I found. Although no new development is done on it lately. But they have nothing to code in it anyways.  They have good wiki and active forum to discuss. Anyways, previously when I use this library for same situtation i was not very sure how I use it only to create Graph file on disk. What I did was I use a Hidden Control on my Window Form application with its visibilty set to false. then I draw Graph on it and save the graph from that hidden form. Since it is a control I doesn&#8217;t know if there is any better way of doing it is available or not.</p>
<p>But today I thought to experiment a bit. I simply create a Class file in my application, import ZedLibrary in that class file. Create an object of ZedGraph Control within my class, Set all values that are set in my old application&#8217;s initilizecomponent function, and create disk graph as I do previously. And it works!!! i know this sound &#8220;obvious&#8221; thing to whom that know a control cannot be used without making its instance on form. But for those who are not very mature like me, they might not know this. Also, some controls are graphic bound (due to bad coding only). But seriously ZedControl is perfect in that manner.  </p>
<p>I learn a new thing today in .NET framework, that really tells why it is true object oriented and what we see on screen is only CODE at the end of day, so there is nothing to worries about the display if you can control it through property and methods.  </p>
<p>Now let me finish my project first <img src='http://www.sumitgupta.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/zedgraph-unlocked/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ZedGraph</title>
		<link>http://www.sumitgupta.net/zedgraph/</link>
		<comments>http://www.sumitgupta.net/zedgraph/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 05:09:06 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Bookmarked]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[VB.NET/VB]]></category>
		<category><![CDATA[BarGraph]]></category>
		<category><![CDATA[Chart]]></category>
		<category><![CDATA[Graph Library]]></category>
		<category><![CDATA[Pie Graph]]></category>
		<category><![CDATA[ZedGraph]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=224</guid>
		<description><![CDATA[Recently I finish a .NET 3.5 based desktop application, where I need to make graphs. For this I search few open source, ready to use library and with help of SourceForge.net, I am able to find one such good library called ZEDGraph. However, it seems this project is no longer active, but it has a [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I finish a .NET 3.5 based desktop application, where I need to make graphs. For this I search few open source, ready to use library and with help of <a title="source forge open source projects" href="http://www.SourceForge.net" target="_blank">SourceForge.net</a>, I am able to find one such good library called ZEDGraph. However, it seems this project is no longer active, but it has a good reason that they might not have any new thing to add as it seems already full of features.</p>
<p>You can go to <a title="Zedgraph wiki" href="http://www.zedgraph.org/wiki/index.php?title=Main_Page" target="_blank">ZedGraph Wiki</a>, or can ask question on its sourceforge forum which still is somewhat active and people are posting there.</p>
<p>This is really a good project and I will stick with it as I modify its source as well for one of very own custom requirement and hence I know its source architecture to us it in future as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/zedgraph/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GridView bug that fire RowCommand twice</title>
		<link>http://www.sumitgupta.net/gridview-bug-that-fire-rowcommand-twice/</link>
		<comments>http://www.sumitgupta.net/gridview-bug-that-fire-rowcommand-twice/#comments</comments>
		<pubDate>Sat, 23 Aug 2008 13:41:40 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[Bug Tracking]]></category>
		<category><![CDATA[Gridview]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=218</guid>
		<description><![CDATA[I was trying my hands on .NET 3.5, and discover that Gridview was firing Rowcommand twice for my ImageButton that is draw using ButtonField Column. Later I found that this is  a bug/unexpected behaviour from out of the box Gridview. I found some solution on internet that can be seens in detail here: http://forums.asp.net/p/1002747/1324414.aspx#1324414 It [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying my hands on .NET 3.5, and discover that Gridview was firing Rowcommand twice for my ImageButton that is draw using ButtonField Column. Later I found that this is  a bug/unexpected behaviour from out of the box Gridview. I found some solution on internet that can be seens in detail here:</p>
<p><a href="http://forums.asp.net/p/1002747/1324414.aspx#1324414">http://forums.asp.net/p/1002747/1324414.aspx#1324414</a></p>
<p>It mainly suggest to use TemplateField column with imagebutton, as Imagebutton is not quite compatible with ButtonField. Rest you can read above for details on it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/gridview-bug-that-fire-rowcommand-twice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running ASP.NET securely</title>
		<link>http://www.sumitgupta.net/running-aspnet-securely/</link>
		<comments>http://www.sumitgupta.net/running-aspnet-securely/#comments</comments>
		<pubDate>Mon, 01 Oct 2007 02:50:19 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Bookmarked]]></category>
		<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=55</guid>
		<description><![CDATA[This blog article tells the story and how to secure the ASP.NET in shared hosting environment or for matter those want to restricted ASP.NET for some good reason http://blogs.msdn.com/jamesche/archive/2007/09/30/running-asp-net-in-a-shared-hosting-environment.aspx  Hope it helps]]></description>
			<content:encoded><![CDATA[<p>This blog article tells the story and how to secure the ASP.NET in shared hosting environment or for matter those want to restricted ASP.NET for some good reason</p>
<p><a href="http://blogs.msdn.com/jamesche/archive/2007/09/30/running-asp-net-in-a-shared-hosting-environment.aspx" target="_blank">http://blogs.msdn.com/jamesche/archive/2007/09/30/running-asp-net-in-a-shared-hosting-environment.aspx</a></p>
<p>  Hope it helps</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/running-aspnet-securely/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Progress bar for long running ASP.NET scripts</title>
		<link>http://www.sumitgupta.net/progress-bar-for-long-running-aspnet-scripts/</link>
		<comments>http://www.sumitgupta.net/progress-bar-for-long-running-aspnet-scripts/#comments</comments>
		<pubDate>Thu, 23 Aug 2007 11:26:31 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[C#.NET]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[VB.NET/VB]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=50</guid>
		<description><![CDATA[Though I have posted in my old blog, but just to keep track of this..  http://www.aspfree.com/c/a/VB.NET/Executing-LongRunning-Tasks-with-the-Progress-Bar-in-ASPNET/ This article suggest a method on how to show progress bar in your web application.]]></description>
			<content:encoded><![CDATA[<p>Though I have posted in my old blog, but just to keep track of this..</p>
<p>  <a href="http://www.aspfree.com/c/a/VB.NET/Executing-LongRunning-Tasks-with-the-Progress-Bar-in-ASPNET/">http://www.aspfree.com/c/a/VB.NET/Executing-LongRunning-Tasks-with-the-Progress-Bar-in-ASPNET/</a></p>
<p>This article suggest a method on how to show progress bar in your web application.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/progress-bar-for-long-running-aspnet-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

