<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Jayantbramhankar&#039;s Blog</title>
	<atom:link href="http://jayantnet.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jayantnet.wordpress.com</link>
	<description>Have some DotNet...</description>
	<lastBuildDate>Fri, 22 Jul 2011 05:03:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='jayantnet.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Jayantbramhankar&#039;s Blog</title>
		<link>http://jayantnet.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jayantnet.wordpress.com/osd.xml" title="Jayantbramhankar&#039;s Blog" />
	<atom:link rel='hub' href='http://jayantnet.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Open webpage (Aspx, jsp or php ) in popup window using IFRAME</title>
		<link>http://jayantnet.wordpress.com/2010/12/16/open-webpage-aspx-jsp-or-php-in-popup-window-using-iframe/</link>
		<comments>http://jayantnet.wordpress.com/2010/12/16/open-webpage-aspx-jsp-or-php-in-popup-window-using-iframe/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 19:13:52 +0000</pubDate>
		<dc:creator>jayant</dc:creator>
				<category><![CDATA[Java Script]]></category>

		<guid isPermaLink="false">http://jayantnet.wordpress.com/?p=120</guid>
		<description><![CDATA[Most of the web application like facebook, blogger, orkut  widely use popup frame for users to handle with the applications like instant message, instant login, search window, message alert etc.. To popup on page we will use DIV tag, and for putting webpage on it we will need to usedIFRAME with some javascript About IFRAME : [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jayantnet.wordpress.com&amp;blog=9612926&amp;post=120&amp;subd=jayantnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>Most of the web application like facebook, blogger, orkut  widely use popup frame for users to handle with the applications like instant message, instant login, search window, message alert etc..</div>
<div>To popup on page we will use DIV tag, and for putting webpage on it we will need to usedIFRAME with some javascript</div>
<div><strong>About </strong><strong>IFRAME </strong><strong>:</strong></div>
<div><strong><br />
</strong></div>
<div>IFRAME is an HTML 4.0 addition to the frames toolbox. It is an inline frame places anotherHTML document in a frame. Unlike an object element, an inline frame can be the &#8220;target&#8221; frame for links defined by other elements</div>
<div>Unlike frames created using  FRAMESET  and  FRAME, IFRAME creates a frame that sits in the middle of a regular non-framed web page. IFRAME works like IMG, only instead of putting a picture on the page, it puts another web page.</div>
<div>Example:</div>
<div>Suppose you have simple page with a link button as fallows</div>
<div><strong>Page1.html</strong></div>
<div><strong><br />
</strong></div>
<div style="background-color:#fafafa;border:1pt solid #cccccc;line-height:1.3em;margin:0 0 .75em;padding:8pt 15pt;">
<div class="MsoNormal" style="background-color:#fafafa;line-height:normal;border-style:none;margin:0;padding:0;">
<div class="MsoNormal" style="line-height:1.3em;margin:0 0 .75em;">
<p>&lt;html&gt;</p>
<p>&lt;head&gt;</p>
<p>&lt;title&gt;My link page&lt;/title&gt;</p>
<p>&lt;/head&gt;</p>
<p>&lt;body&gt;</p>
<p>&lt;a href=&#8221;#&#8221;&gt;link button&lt;/a&gt;</p>
<p>&lt;/body&gt;</p>
<p>&lt;/html&gt;</p>
</div>
</div>
</div>
<p><strong> Now we want to open a popup  window with the webpage(logic.aspx or any) we have designed with our business logic.</strong></p>
<div style="font-weight:bold;">Add javascript to page1.html</div>
<div style="background-color:#fafafa;border:1pt solid #cccccc;line-height:1.3em;margin:0 0 .75em;padding:8pt 15pt;">
<div class="MsoNormal" style="background-color:#fafafa;line-height:normal;border-style:none;margin:0;padding:0;">
<div class="MsoNormal" style="line-height:1.3em;margin:0 0 .75em;">
<p>&lt;script language=&#8221;javascript&#8221;&gt;</p>
<p>function openPopup() {</p>
<p>window.scrollTo(0, 0);</p>
<p>var width = document.documentElement.clientWidth + document.documentElement.scrollLeft;</p>
<p>var height = document.documentElement.clientHeight + document.documentElement.scrollTop;</p>
<p>var layer = document.createElement(&#8216;div&#8217;);</p>
<p>layer.style.zIndex = 2;</p>
<p>layer.id = &#8216;layer&#8217;;</p>
<p>layer.style.position = &#8216;absolute&#8217;;</p>
<p>layer.style.top = &#8217;0px&#8217;;</p>
<p>layer.style.left = &#8217;0px&#8217;;</p>
<p>layer.style.height = document.documentElement.scrollHeight + &#8216;px&#8217;;</p>
<p>layer.style.width = width + &#8216;px&#8217;;</p>
<p>layer.style.backgroundColor = &#8216;black&#8217;;</p>
<p>layer.style.opacity = &#8217;0.75&#8242;;</p>
<p>layer.style.filter += (&#8220;progid:DXImageTransform.Microsoft.Alpha(opacity=75)&#8221;);</p>
<p>document.body.style.position = &#8216;static&#8217;;</p>
<p>document.body.appendChild(layer);</p>
<p>var size = { &#8216;height&#8217;: 220, &#8216;width&#8217;: 750 };</p>
<p>var iframe = document.createElement(&#8216;iframe&#8217;);</p>
<p>iframe.name = &#8216;Logic Form&#8217;;</p>
<p>iframe.id = &#8216;popup&#8217;; //optional</p>
<p>iframe.src = &#8216;logic.aspx’;</p>
<p>iframe.style.height = size.height + &#8216;px&#8217;;</p>
<p>iframe.style.width = size.width + &#8216;px&#8217;;</p>
<p>iframe.style.position = &#8216;fixed&#8217;;</p>
<p>iframe.style.zIndex = 3;</p>
<p>iframe.style.backgroundColor = &#8216;white&#8217;;</p>
<p>iframe.frameborder = &#8217;0&#8242;;</p>
<p>iframe.style.top = ((height + document.documentElement.scrollTop) / 2) &#8211; (size.height / 2) + &#8216;px&#8217;;</p>
<p>iframe.style.left = (width / 2) &#8211; (size.width / 2) + &#8216;px&#8217;;</p>
<p>document.body.appendChild(iframe);</p>
<p>}</p>
<p>&lt;/script&gt;</p>
</div>
</div>
</div>
<div style="font-weight:bold;">Now edit the page1.html and add onclick event with openPopup() function to link button.</div>
<div style="background-color:#fafafa;border:1pt solid #cccccc;line-height:1.3em;margin:0 0 .75em;padding:8pt 15pt;">
<div class="MsoNormal" style="background-color:#fafafa;line-height:normal;border-style:none;margin:0;padding:0;">
<div class="MsoNormal" style="line-height:1.3em;margin:0 0 .75em;">
<p><span style="line-height:1.3em;">&lt;a onclick=&#8221; openPopup();</span><strong>return</strong><span style="line-height:1.3em;"> false;&#8221;  href=&#8221;#&#8221;&gt;</span><br />
<span style="line-height:1.3em;">link button</span><br />
<span style="line-height:1.3em;">&lt;/a&gt;</span></p>
</div>
</div>
</div>
<div class="MsoNormal" style="line-height:normal;"><span style="color:blue;font-family:&quot;">That’s it.</span></div>
<div class="MsoNormal" style="line-height:normal;">
<p><span style="color:blue;font-family:&quot;">Happy </span><span style="color:#e36c0a;font-family:&quot;">dot</span><span style="color:blue;font-family:&quot;">net</span><span style="color:#00b050;font-family:&quot;">ing..</span></p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jayantnet.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jayantnet.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jayantnet.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jayantnet.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jayantnet.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jayantnet.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jayantnet.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jayantnet.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jayantnet.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jayantnet.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jayantnet.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jayantnet.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jayantnet.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jayantnet.wordpress.com/120/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jayantnet.wordpress.com&amp;blog=9612926&amp;post=120&amp;subd=jayantnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jayantnet.wordpress.com/2010/12/16/open-webpage-aspx-jsp-or-php-in-popup-window-using-iframe/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eba59851b33d3da59489f3c1d7c228cd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jayant</media:title>
		</media:content>
	</item>
		<item>
		<title>WindowBuilder becomes open source</title>
		<link>http://jayantnet.wordpress.com/2010/12/16/windowbuilder-becomes-open-source/</link>
		<comments>http://jayantnet.wordpress.com/2010/12/16/windowbuilder-becomes-open-source/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 18:53:59 +0000</pubDate>
		<dc:creator>jayant</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jayantnet.wordpress.com/?p=116</guid>
		<description><![CDATA[Google announced Window Builder as open source project.WindowBuilder is simplicity used to draw the user interface the way you want it to look, complete with all of the elegant and powerful UI elements built into your favorite GUI platform. WindowBuilder Pro has more than 10,000 registered users, and more than 30,000 people have downloaded the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jayantnet.wordpress.com&amp;blog=9612926&amp;post=116&amp;subd=jayantnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="wp-caption aligncenter" style="width: 508px"><img title="Window Builder" src="http://blogs.bytecode.com.au/glen/2006/images/2006/WindowBuilder.gif" alt="Window Builder" width="498" height="396" /><p class="wp-caption-text">Window Builder</p></div>
<p>Google announced Window Builder as open source project.WindowBuilder is simplicity used to draw the user interface the way you want it to look, complete with all of the elegant and powerful UI elements built into your favorite GUI platform.</p>
<p>WindowBuilder Pro has more than 10,000 registered users, and more than 30,000 people have downloaded the product.</p>
<p><a href="http://googlecode.blogspot.com/2010/12/windowbuilder-becomes-new-open-source.html"></a></p>
<p><a href="http://googlecode.blogspot.com/2010/12/windowbuilder-becomes-new-open-source.html">Read more</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jayantnet.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jayantnet.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jayantnet.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jayantnet.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jayantnet.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jayantnet.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jayantnet.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jayantnet.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jayantnet.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jayantnet.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jayantnet.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jayantnet.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jayantnet.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jayantnet.wordpress.com/116/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jayantnet.wordpress.com&amp;blog=9612926&amp;post=116&amp;subd=jayantnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jayantnet.wordpress.com/2010/12/16/windowbuilder-becomes-open-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eba59851b33d3da59489f3c1d7c228cd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jayant</media:title>
		</media:content>

		<media:content url="http://blogs.bytecode.com.au/glen/2006/images/2006/WindowBuilder.gif" medium="image">
			<media:title type="html">Window Builder</media:title>
		</media:content>
	</item>
		<item>
		<title>Grid view row expand/collapase using Jquery , Ajax</title>
		<link>http://jayantnet.wordpress.com/2010/08/20/grid-view-row-expandcollapase-using-jquery-ajax/</link>
		<comments>http://jayantnet.wordpress.com/2010/08/20/grid-view-row-expandcollapase-using-jquery-ajax/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 10:32:34 +0000</pubDate>
		<dc:creator>jayant</dc:creator>
				<category><![CDATA[Asp.net]]></category>

		<guid isPermaLink="false">http://jayantnet.wordpress.com/?p=96</guid>
		<description><![CDATA[Introduction : Now day’s , important issue with web applications is how quick a wed page is rendered  and how it is animated or  visualized So for quick reply from server Ajax is the solutions and for some visualizations with server side response we mostly use jquery or javascript. I this article, for expanding , [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jayantnet.wordpress.com&amp;blog=9612926&amp;post=96&amp;subd=jayantnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction :</strong></p>
<p>Now day’s , important issue with web applications is how quick a wed page is rendered  and how it is animated or  visualized</p>
<p>So for quick reply from server Ajax is the solutions and for some visualizations with server side response we mostly use jquery or javascript.<br />
I this article, for expanding , collapsing and  adding details to gridview row we are going to use AJAX to make call to server and we will visualized it using jquery.</p>
<p><strong>Aim :</strong></p>
<ol>
<li>Getting details of product  by extracting details at the next to current row and before second one.</li>
<li>Visualizing  the expanding of rows.</li>
<li>No server side postback.</li>
<li>Using GridView Control to bind data and simple data binding to table using scriptlet.</li>
</ol>
<p><strong>Using the Jquery Code :</strong></p>
<p>Expanding Row :</p>
<p>For expanding any row, we need to create an new row  with the serverside details  and then we will add it to the next of current row.</p>
<p style="text-align:center;"><img class="aligncenter" title="Expanding Rows" src="http://jayantnet.files.wordpress.com/2010/08/rowexpand.png?w=397&#038;h=269" alt="" width="397" height="269" /></p>
<div style="background-attachment:initial;background-color:#fafafa;background-image:initial;background-position:initial initial;background-repeat:initial initial;line-height:1.3em;border:1pt solid #cccccc;margin:0 0 .75em;padding:8pt 15pt;">
<div class="MsoNormal" style="background-attachment:initial;background-color:#fafafa;background-image:initial;background-position:initial initial;background-repeat:initial initial;line-height:normal;border:initial none initial;margin:0;padding:0;">
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;">
<pre>var trindex=0;                        //trindex hold row index created by jquery
$("tr").click(function() {
if ($(this).find("td:first").length &gt; 0) {      //check whether it is header or content row
//row index icreament to assign new row id everytime
trindex++;
//create a row with td colspan 3 to show product description
var row= '&gt;&lt;td class="currRow" colspan="3" &gt;&lt;div id="did"&gt;&lt;img id="imagepath" src="" style="height: 81px; width: 104px" /&gt;  Description :&lt;span id="des"&gt;sd&lt;/span&gt;&lt;p&gt;Cost :&lt;span id="cost"&gt;sd&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;';                 

//adding animation to row
var newRow = $("&lt;tr id=tr"+ trindex + row).animate({
height: "140px",
opacity: 0.25,
}, 500);

//adding row to existing table
$(this).after(newRow);</pre>
</div>
</div>
</div>
</div>
<p><strong>Collapsing  Row :</strong></p>
<p>At the same moment we expand any row, we collapse previous created row, so we need to remember the previous created rowIndex or it’s id.</p>
<p style="text-align:center;"><img class="aligncenter" title="Collpasing Row" src="http://jayantnet.files.wordpress.com/2010/08/gridcollapsed.png?w=395&#038;h=372" alt="" width="395" height="372" /></p>
<div>
<div style="background-attachment:initial;background-color:#fafafa;background-image:initial;background-position:initial initial;background-repeat:initial initial;line-height:1.3em;border:1pt solid #cccccc;margin:0 0 .75em;padding:8pt 15pt;">
<div class="MsoNormal" style="background-attachment:initial;background-color:#fafafa;background-image:initial;background-position:initial initial;background-repeat:initial initial;line-height:normal;border:initial none initial;margin:0;padding:0;">
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;">
<pre>$("#"+rowName).find('td').removeClass('currRow').addClass('hideRow');
$("#"+rowName).animate({
    height: "0px",
    opacity: 0.25,
    }, 1000, function() {
$("#"+rowNa
me).remove();</pre>
</div>
</div>
</div>
</div>
<p>Ajax Call to the server :<br />
For getting the full details about our shortly highlighted product, we need to make a asynchronous call to server using AJAX.<br />
We are passing some key values to server(product Id) to extract the resultset.</p>
<div>
<div style="background-attachment:initial;background-color:#fafafa;background-image:initial;background-position:initial initial;background-repeat:initial initial;line-height:1.3em;border:1pt solid #cccccc;margin:0 0 .75em;padding:8pt 15pt;">
<div class="MsoNormal" style="background-attachment:initial;background-color:#fafafa;background-image:initial;background-position:initial initial;background-repeat:initial initial;line-height:normal;border:initial none initial;margin:0;padding:0;">
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;">
<pre>$.ajax({
       type: "POST",
       url: "WebService.asmx/HelloToYou",   //webserviceName/methodName
       data: "{'name': '" + $(this).find("td span").text() + "'}",  //passing values to webservice(productid)
       contentType: "application/json; charset=utf-8",
       dataType: "json",
       success: function(msg) {
       //extrating response data to newly created row
       $("#tr"+trindex ).find("td #did p #cost").text(msg.d.id );
       $("#tr"+trindex ).find("td #did  #des").text(msg.d.order);
       $("#tr"+trindex ).find("td #did #imagepath").attr('src', msg.d.order); //$("#myImage").attr("src", "path/to/newImage.jpg");
       },
       error: FailedMessage     //showing error message if failure
       });</pre>
</div>
</div>
</div>
</div>
<p><strong>Using The WebService.cs<br />
</strong>Programmable application logic accessible via standard Web protocols.<br />
We are using webservice to extract data from database using jquery Ajax call.<br />
CollectData class to hold extracted details from db.</p>
<div>
<div style="background-attachment:initial;background-color:#fafafa;background-image:initial;background-position:initial initial;background-repeat:initial initial;line-height:1.3em;border:1pt solid #cccccc;margin:0 0 .75em;padding:8pt 15pt;">
<div class="MsoNormal" style="background-attachment:initial;background-color:#fafafa;background-image:initial;background-position:initial initial;background-repeat:initial initial;line-height:normal;border:initial none initial;margin:0;padding:0;">
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;">
<pre>public class CollectData
{
public string cost { get; set; }
public string imagePath { get; set; }
public string description { get; set; }
}
Simple queries to the database via WebMethod
[WebMethod()]
public CollectData GetDetails(string name)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
SqlCommand cmd = new SqlCommand("Select cost, imagePath, description from Products where ProductId='" + name + "'",con);
SqlDataReader data;
CollectData c = new CollectData();
try
{
con.Open();
data=cmd.ExecuteReader();
if (data.Read())
{
c.cost= data[0].ToString();
c.imagePath = data[1].ToString();
c.description = data[2].ToString();
return c;
}
else
{
c.cost = "N/A";
c.imagePath = "N/A";
c.description = "N/A";
return c;
}
}
catch (Exception ex)
{
c.cost = "N/A";
c.imagePath = "N/A";
c.description = "N/A";
return c;
}
}</pre>
</div>
</div>
</div>
</div>
<p><strong>Conclusion :</strong></p>
<p>We have mixed up Jquery, Ajax, server Control(Gridview ) to get quick and visualized output.</p>
<p>Result can be little bit change as per the browsers.</p>
<p><a href="http://www.codeproject.com/KB/aspnet/rowexpandcollapse.aspx">Download RowExpandCollpase &#8211; 353.35 KB</a></p>
</div>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jayantnet.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jayantnet.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jayantnet.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jayantnet.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jayantnet.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jayantnet.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jayantnet.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jayantnet.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jayantnet.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jayantnet.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jayantnet.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jayantnet.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jayantnet.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jayantnet.wordpress.com/96/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jayantnet.wordpress.com&amp;blog=9612926&amp;post=96&amp;subd=jayantnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jayantnet.wordpress.com/2010/08/20/grid-view-row-expandcollapase-using-jquery-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eba59851b33d3da59489f3c1d7c228cd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jayant</media:title>
		</media:content>

		<media:content url="http://jayantnet.files.wordpress.com/2010/08/rowexpand.png?w=300" medium="image">
			<media:title type="html">Expanding Rows</media:title>
		</media:content>

		<media:content url="http://jayantnet.files.wordpress.com/2010/08/gridcollapsed.png?w=300" medium="image">
			<media:title type="html">Collpasing Row</media:title>
		</media:content>
	</item>
		<item>
		<title>Create Gradient Header using CSS</title>
		<link>http://jayantnet.wordpress.com/2010/07/19/create-gradient-header-using-css/</link>
		<comments>http://jayantnet.wordpress.com/2010/07/19/create-gradient-header-using-css/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 11:24:01 +0000</pubDate>
		<dc:creator>jayant</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jayantnet.wordpress.com/?p=88</guid>
		<description><![CDATA[Many designers resist using header tags (H1, H2, etc.) on their Web pages because the spacing around the tags can break a tight page layout. Heading tags (H1 through to H6) are given more weight by search engines than regular body copy. So they should be used wisely to reinforce the page’s overall keyword theme……By [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jayantnet.wordpress.com&amp;blog=9612926&amp;post=88&amp;subd=jayantnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://jayantnet.files.wordpress.com/2010/07/header-300x202.png"><img class="alignleft size-full wp-image-93" title="header-300x202" src="http://jayantnet.files.wordpress.com/2010/07/header-300x202.png" alt="" width="300" height="202" /></a></p>
<p>Many designers resist using header tags (H1, H2, etc.) on their Web pages because the spacing around the tags can break a tight page layout.</p>
<p>Heading tags (H1 through to H6) are given more weight by search engines than regular body copy. So they should be used wisely to reinforce the page’s overall keyword theme……By SEO</p>
<p>I have used header tags and applied some css effects, it easy to write with 10-12 line of css and html Output will look like image shown.</p>
<p><a href="http://shivasoft.in/blog/wp-content/uploads/2010/07/cssheader.html">Live Demo of CSS Header</a></p>
<p>First we need to add a div tag to our html page to put header on it.</p>
<p>Css for div:</p>
<div>
<div style="background-attachment:initial;background-color:#fafafa;background-image:initial;background-position:initial initial;background-repeat:initial initial;line-height:1.3em;border:1pt solid #cccccc;margin:0 0 .75em;padding:8pt 15pt;">
<div class="MsoNormal" style="background-attachment:initial;background-color:#fafafa;background-image:initial;background-position:initial initial;background-repeat:initial initial;line-height:normal;border:initial none initial;margin:0;padding:0;">
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;">
<p><span style="font-family:'Courier New';color:#0000ff;"> </span></p>
<pre>#container {
	background: #6699FF;
	margin: auto;
	width: 500px;
	height: 700px;
	padding-top: 30px;
	font-family: helvetica, arial, sans-serif;
	}</pre>
</div>
</div>
</div>
</div>
<div class="MsoNormal" style="line-height:10.5pt;margin:0 0 12pt;"><span style="font-family:Arial, sans-serif;"><span style="font-family:Arial, Verdana;line-height:20px;color:#222222;font-size:14px;">Css for Header Tag..</span></span></div>
<div>
<div style="background-attachment:initial;background-color:#fafafa;background-image:initial;background-position:initial initial;background-repeat:initial initial;line-height:1.3em;border:1pt solid #cccccc;margin:0 0 .75em;padding:8pt 15pt;">
<div class="MsoNormal" style="background-attachment:initial;background-color:#fafafa;background-image:initial;background-position:initial initial;background-repeat:initial initial;line-height:normal;border:initial none initial;margin:0;padding:0;">
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;">
<pre>
<div id="_mcePaste">h1 {</div>
<div id="_mcePaste">background: red;             /*Background color to header*/</div>
<div id="_mcePaste">background: -moz-linear-gradient(top, red, FFFFFF);</div>
<div id="_mcePaste">/*from to colors, I have used simple name it can be replaced by color codes*/</div>
<div id="_mcePaste">background: -webkit-gradient(linear, left top, left bottom, from(red), to(white));</div>
<div id="_mcePaste">padding: 10px 20px;</div>
<div id="_mcePaste">margin-left: -20px;</div>
<div id="_mcePaste">margin-top: 0;</div>
<div id="_mcePaste">position: relative;</div>
<div id="_mcePaste">width: 70%;</div>
<div id="_mcePaste">/*from droping box shadow at the bottom of header*/</div>
<div id="_mcePaste">-moz-box-shadow: 1px 1px 3px #292929;</div>
<div id="_mcePaste">-webkit-box-shadow: 1px 1px 3px #292929;</div>
<div id="_mcePaste">box-shadow: 1px 1px 3px #292929;</div>
<div id="_mcePaste">color: #454545;</div>
<div id="_mcePaste">text-shadow: 0 1px 0 white;</div>
<div id="_mcePaste">}</div>
</pre>
</div>
</div>
</div>
</div>
</div>
</div>
<p><span style="font-family:Arial, Verdana;line-height:20px;color:#222222;font-size:14px;">Arrow class for dropping shadow.</span></p>
<div>
<div style="background-attachment:initial;background-color:#fafafa;background-image:initial;background-position:initial initial;background-repeat:initial initial;line-height:1.3em;border:1pt solid #cccccc;margin:0 0 .75em;padding:8pt 15pt;">
<div class="MsoNormal" style="background-attachment:initial;background-color:#fafafa;background-image:initial;background-position:initial initial;background-repeat:initial initial;line-height:normal;border:initial none initial;margin:0;padding:0;">
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;">
<pre>
<div id="_mcePaste">.arrow {
	 width: 0; height: 0;
	 line-height: 0;
	 border-left: 20px solid transparent;
	 border-top: 10px solid #c8c8c8;
	 top: 104%;
	 left: 0;
	 position: absolute;
}</div>
</pre>
</div>
</div>
</div>
</div>
</div>
<p><span style="font-family:Arial, Verdana;line-height:20px;color:#222222;font-size:14px;">Now just create a html Page and put a header and you have done assuming that you have written css in separate file named jstyle.css.<br />
Example:</span></p>
<div>
<div style="background-attachment:initial;background-color:#fafafa;background-image:initial;background-position:initial initial;background-repeat:initial initial;line-height:1.3em;border:1pt solid #cccccc;margin:0 0 .75em;padding:8pt 15pt;">
<div class="MsoNormal" style="background-attachment:initial;background-color:#fafafa;background-image:initial;background-position:initial initial;background-repeat:initial initial;line-height:normal;border:initial none initial;margin:0;padding:0;">
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;">
<pre>
<div id="_mcePaste">&lt;html &gt;
&lt;head&gt;
    &lt;link rel="Stylesheet" type="text/css" href="jstyle.css" /&gt;
	&lt;title&gt;CSS Header&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
	 &lt;div id="container"&gt;
		&lt;h1&gt; H1 - Heading &lt;span class="arrow"&gt;&lt;/span&gt; &lt;/h1&gt;
&lt;/body&gt;
&lt;/html&gt;</div>
</pre>
</div>
</div>
</div>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jayantnet.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jayantnet.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jayantnet.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jayantnet.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jayantnet.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jayantnet.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jayantnet.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jayantnet.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jayantnet.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jayantnet.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jayantnet.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jayantnet.wordpress.com/88/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jayantnet.wordpress.com/88/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jayantnet.wordpress.com/88/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jayantnet.wordpress.com&amp;blog=9612926&amp;post=88&amp;subd=jayantnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jayantnet.wordpress.com/2010/07/19/create-gradient-header-using-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eba59851b33d3da59489f3c1d7c228cd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jayant</media:title>
		</media:content>

		<media:content url="http://jayantnet.files.wordpress.com/2010/07/header-300x202.png" medium="image">
			<media:title type="html">header-300x202</media:title>
		</media:content>
	</item>
		<item>
		<title>Popup div tag using javascript.</title>
		<link>http://jayantnet.wordpress.com/2010/07/19/popup-div-tag-using-javascript/</link>
		<comments>http://jayantnet.wordpress.com/2010/07/19/popup-div-tag-using-javascript/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 11:04:58 +0000</pubDate>
		<dc:creator>jayant</dc:creator>
				<category><![CDATA[Java Script]]></category>

		<guid isPermaLink="false">http://jayantnet.wordpress.com/?p=84</guid>
		<description><![CDATA[Popup window or div is commonly used  for accepting user inputs or to popup ads, and it&#8217;s very easy to code. I have written code for popup as fallows. Click here to Popup Box Javasscript code &#60;script type=&#8221;text/javascript&#8221;&#62; function showBox() { var width = document.documentElement.clientWidth + document.documentElement.scrollLeft; var layer = document.createElement(&#8216;div&#8217;); layer.style.zIndex = 2; layer.id [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jayantnet.wordpress.com&amp;blog=9612926&amp;post=84&amp;subd=jayantnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Popup window or div is commonly used  for accepting user inputs or to popup ads, and it&#8217;s very easy to code.<br />
I have written code for popup as fallows.</p>
<div>
<p><a href="void(showBox())">Click here to Popup Box</a></p>
<p><span style="font-size:x-large;"><span style="color:purple;">Javasscript code</span></span><br />
<span style="font-size:x-large;"><span style="color:purple;"><span style="color:#333333;font-family:Verdana, Arial, sans-serif;font-size:13px;line-height:16px;"> </span></span></span> <span style="font-size:x-large;"><span style="color:purple;"> </span></span> <span style="font-size:x-large;"><span style="color:purple;"><br />
</span></span></p>
<div style="background-attachment:initial;background-color:#fafafa;background-image:initial;background-position:initial initial;background-repeat:initial initial;line-height:1.3em;border:1pt solid #cccccc;margin:0 0 .75em;padding:8pt 15pt;">
<div class="MsoNormal" style="background-attachment:initial;background-color:#fafafa;background-image:initial;background-position:initial initial;background-repeat:initial initial;line-height:normal;border:initial none initial;margin:0;padding:0;"><span style="color:purple;font-family:'Times New Roman';font-size:medium;"></p>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="color:blue;font-family:'Courier New';font-size:10pt;">&lt;</span><span style="color:#a31515;font-family:'Courier New';font-size:10pt;">script</span><span style="font-family:'Courier New';font-size:10pt;"> <span style="color:red;">type</span><span style="color:blue;">=&#8221;text/javascript&#8221;&gt;</span></span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="color:blue;font-family:'Courier New';font-size:10pt;">function</span><span style="font-family:'Courier New';font-size:10pt;"> showBox()</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;">{</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> <span style="color:blue;">var</span> width = document.documentElement.clientWidth + document.documentElement.scrollLeft;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;"></div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> <span style="color:blue;">var</span> layer = document.createElement(<span style="color:#a31515;">&#8216;div&#8217;</span>);</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> layer.style.zIndex = 2;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> layer.id = <span style="color:#a31515;">&#8216;layer&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> layer.style.position = <span style="color:#a31515;">&#8216;absolute&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> layer.style.top = <span style="color:#a31515;">&#8217;0px&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> layer.style.left = <span style="color:#a31515;">&#8217;0px&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> layer.style.height = document.documentElement.scrollHeight + <span style="color:#a31515;">&#8216;px&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> layer.style.width = width + <span style="color:#a31515;">&#8216;px&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> layer.style.backgroundColor = <span style="color:#a31515;">&#8216;black&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> layer.style.opacity = <span style="color:#a31515;">&#8216;.6&#8242;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> layer.style.filter += (<span style="color:#a31515;">&#8220;progid:DXImageTransform.Microsoft.Alpha(opacity=60)&#8221;</span>);</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> document.body.appendChild(layer);</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;"></div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> <span style="color:blue;">var</span> div = document.createElement(<span style="color:#a31515;">&#8216;div&#8217;</span>);</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div.style.zIndex = 3;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div.id = <span style="color:#a31515;">&#8216;box&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div.style.position = (navigator.userAgent.indexOf(<span style="color:#a31515;">&#8216;MSIE 6&#8242;</span>) &gt; -1) ? <span style="color:#a31515;">&#8216;absolute&#8217;</span> : <span style="color:#a31515;">&#8216;fixed&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div.style.top = <span style="color:#a31515;">&#8217;200px&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div.style.left = (width / 2) &#8211; (400 / 2) + <span style="color:#a31515;">&#8216;px&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div.style.height = <span style="color:#a31515;">&#8217;70px&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div.style.width = <span style="color:#a31515;">&#8217;400px&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div.style.backgroundColor = <span style="color:#a31515;">&#8216;white&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div.style.border = <span style="color:#a31515;">&#8217;2px solid silver&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div.style.padding = <span style="color:#a31515;">&#8217;20px&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> document.body.appendChild(div);</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;"></div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="color:blue;font-family:'Courier New';font-size:10pt;">var</span><span style="font-family:'Courier New';font-size:10pt;"> div1 = document.createElement(<span style="color:#a31515;">&#8216;div&#8217;</span>);</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div1.style.zIndex = 3;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div1.id = <span style="color:#a31515;">&#8216;close&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div1.style.position = (navigator.userAgent.indexOf(<span style="color:#a31515;">&#8216;MSIE 6&#8242;</span>) &gt; -1) ? <span style="color:#a31515;">&#8216;Relative&#8217;</span> : <span style="color:#a31515;">&#8216;fixed&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div1.style.top = <span style="color:#a31515;">&#8217;170px&#8217;</span> ;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div1.style.right = (width / 2) &#8211; 270+ <span style="color:#a31515;">&#8216;px&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div.appendChild(div1);</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;"></div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> <span style="color:blue;">var</span> im1 = document.createElement(<span style="color:#a31515;">&#8216;img&#8217;</span>);</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> im1.src=<span style="color:#a31515;">&#8220;close.png&#8221;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> im1.onclick = <span style="color:blue;">function</span>()</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> {</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> document.body.removeChild(document.getElementById(<span style="color:#a31515;">&#8216;layer&#8217;</span>));</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> document.body.removeChild(document.getElementById(<span style="color:#a31515;">&#8216;box&#8217;</span>));</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> };</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div1.appendChild(im1);</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> </span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> <span style="color:blue;">var</span> t1 = document.createElement(<span style="color:#a31515;">&#8216;input&#8217;</span>);</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> t1.type = <span style="color:#a31515;">&#8216;text&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> t1.id=<span style="color:#a31515;">&#8220;txt1&#8243;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div.appendChild(t1);</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;"></div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> <span style="color:blue;">var</span> br = document.createElement(<span style="color:#a31515;">&#8216;br&#8217;</span>);</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div.appendChild(br);</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;"></div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> <span style="color:blue;">var</span> t = document.createElement(<span style="color:#a31515;">&#8216;input&#8217;</span>);</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> t.type = <span style="color:#a31515;">&#8216;text&#8217;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> t.id=<span style="color:#a31515;">&#8220;txt&#8221;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div.appendChild(t);</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;"></div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> <span style="color:blue;">var</span> hr = document.createElement(<span style="color:#a31515;">&#8216;hr&#8217;</span>);</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div.appendChild(hr);</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> </span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> <span style="color:blue;">var</span> im = document.createElement(<span style="color:#a31515;">&#8216;img&#8217;</span>);</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> im.src=<span style="color:#a31515;">&#8220;submit.png&#8221;</span>;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> im.onclick = <span style="color:blue;">function</span>()</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> {</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> document.getElementById(<span style="color:#a31515;">&#8216;msg&#8217;</span>).innerHTML= document.getElementById(<span style="color:#a31515;">&#8216;txt1&#8242;</span>).value + <span style="color:#a31515;">&#8221; &#8220;</span> +document.getElementById(<span style="color:#a31515;">&#8216;txt&#8217;</span>).value;</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> document.body.removeChild(document.getElementById(<span style="color:#a31515;">&#8216;layer&#8217;</span>));</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> document.body.removeChild(document.getElementById(<span style="color:#a31515;">&#8216;box&#8217;</span>));</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> };</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> div.appendChild(im);</span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;">}</span></div>
</div>
<div class="MsoNormal">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;line-height:14px;"> <span style="color:blue;"> </span><span style="color:#a31515;">script</span><span style="color:blue;">&gt;</span></span></div>
</div>
<p></span></div>
</div>
<div class="MsoNormal" style="line-height:10.5pt;margin:0 0 12pt;"><span style="color:#800080;"><span style="line-height:19px;"><span style="font-family:Arial, sans-serif;color:#000000;"><span style="line-height:14px;"><br />
</span></span></span></span></div>
<div class="MsoNormal"><span style="font-family:'Courier New';line-height:115%;"><strong><span style="font-size:x-large;">Html page</span></strong></span><br />
<span style="font-family:'Courier New';line-height:115%;"><strong><span style="font-size:x-large;"><br />
<span style="font-family:'Times New Roman';color:#800080;"><span style="font-weight:normal;line-height:normal;font-size:small;"><span style="font-family:'Courier New';color:#000000;"><span style="line-height:14px;font-size:large;"><strong><br />
</strong></span></span></span></span></span></strong></span><span style="font-family:'Courier New';line-height:115%;"><strong><span style="font-size:x-large;"></p>
<div style="background-attachment:initial;background-color:#fafafa;background-image:initial;background-position:initial initial;background-repeat:initial initial;line-height:1.3em;border:1pt solid #cccccc;margin:0 0 .75em;padding:8pt 15pt;">
<div class="MsoNormal" style="background-attachment:initial;background-color:#fafafa;background-image:initial;background-position:initial initial;background-repeat:initial initial;line-height:normal;border:initial none initial;margin:0;padding:0;"><span style="color:blue;font-family:'Courier New';line-height:14px;"><strong><span style="color:purple;font-family:'Times New Roman';font-size:medium;font-weight:normal;line-height:normal;"></p>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="color:blue;font-family:'Courier New';font-size:10pt;">&lt;</span><span style="color:#a31515;font-family:'Courier New';font-size:10pt;">body</span><span style="font-family:'Courier New';font-size:10pt;"> <span style="color:red;">style</span><span style="color:blue;">=&#8221;</span><span style="color:red;">height</span>:<span style="color:blue;">2000px&#8221;&gt;</span></span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> <span style="color:blue;">&lt;</span><span style="color:#a31515;">form</span> <span style="color:red;">id</span><span style="color:blue;">=&#8221;form1&#8243;</span> <span style="color:red;">runat</span><span style="color:blue;">=&#8221;server&#8221;&gt;</span></span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> <span style="color:blue;">&lt;</span><span style="color:#a31515;">div</span> <span style="color:blue;">&gt;</span></span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> </span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="color:blue;font-family:'Courier New';font-size:10pt;">&lt;</span><span style="color:#a31515;font-family:'Courier New';font-size:10pt;">a</span><span style="font-family:'Courier New';font-size:10pt;"> <span style="color:red;">href</span><span style="color:blue;">=&#8221;javascript:void(showBox())&#8221;&gt;</span>Popup box&lt;/<span style="color:blue;"> </span><span style="color:#a31515;">a</span><span style="color:blue;">&gt;</span></span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> &lt;/ <span style="color:blue;"> </span><span style="color:#a31515;">div</span><span style="color:blue;">&gt;</span></span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> <span style="color:blue;">&lt;</span><span style="color:#a31515;">div</span> <span style="color:red;">id</span><span style="color:blue;">=&#8221;msg&#8221;</span> <span style="color:red;">align</span><span style="color:blue;">=&#8221;center&#8221;</span> <span style="color:red;">style</span><span style="color:blue;">=&#8221;</span><span style="color:red;">background-color</span>: <span style="color:blue;">#C0C0C0</span>; <span style="color:red;">font-family</span>: <span style="color:blue;">&#8216;Courier New&#8217;,</span> <span style="color:blue;">Courier,</span> <span style="color:blue;">monospace</span>; <span style="color:red;">color</span>: <span style="color:blue;">#000099</span>; <span style="color:red;">font-size</span>: <span style="color:blue;">x-large</span>; <span style="color:red;">font-weight</span>: <span style="color:blue;">bold&#8221;&gt;&lt;/</span><span style="color:#a31515;">div</span><span style="color:blue;">&gt;</span></span></div>
</div>
<div class="MsoNormal" style="line-height:normal;margin-bottom:0;">
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"> &lt;/ <span style="color:blue;"> </span><span style="color:#a31515;">form</span><span style="color:blue;">&gt;</span></span></div>
<div style="margin:0;"><span style="font-family:'Courier New';font-size:10pt;"><span style="color:blue;"><span style="color:#800080;font-family:'Times New Roman';font-size:small;"><span style="color:#a31515;font-family:'Courier New';font-size:10pt;line-height:14px;">&lt;/body</span><span style="color:blue;font-family:'Courier New';font-size:10pt;line-height:14px;">&gt;</span></span></span></span></div>
</div>
<p></span></strong></p>
<p></span></div>
</div>
<p></span></strong></p>
<p></span></div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jayantnet.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jayantnet.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jayantnet.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jayantnet.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jayantnet.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jayantnet.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jayantnet.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jayantnet.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jayantnet.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jayantnet.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jayantnet.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jayantnet.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jayantnet.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jayantnet.wordpress.com/84/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jayantnet.wordpress.com&amp;blog=9612926&amp;post=84&amp;subd=jayantnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jayantnet.wordpress.com/2010/07/19/popup-div-tag-using-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eba59851b33d3da59489f3c1d7c228cd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jayant</media:title>
		</media:content>
	</item>
		<item>
		<title>Rounded corner and gradient colored box using css only.</title>
		<link>http://jayantnet.wordpress.com/2010/07/19/rounded-corner-and-gradient-colored-box-using-css-only/</link>
		<comments>http://jayantnet.wordpress.com/2010/07/19/rounded-corner-and-gradient-colored-box-using-css-only/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 10:57:41 +0000</pubDate>
		<dc:creator>jayant</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jayantnet.wordpress.com/?p=81</guid>
		<description><![CDATA[Yes, now you need not to design rounded corner boxes in Photoshop or fireworks, this can be done using little bit of css only. 1.  Rounded box using div tag and css. Css style: body { width: 500px; margin: 60px auto 0; background: #0099FF; } #mainBox { /* Just a box */ width: 500px; height: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jayantnet.wordpress.com&amp;blog=9612926&amp;post=81&amp;subd=jayantnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Yes, now you need not to design rounded corner boxes in Photoshop or fireworks, this can be done using little bit of css only.</p>
<p><a href="www.csharpings.blogspot.com"><img class="alignnone" title="rounded corner div" src="http://2.bp.blogspot.com/_WAdkpujCgKs/TBo8A-t2zhI/AAAAAAAAAHg/zfBxy0qN-jI/s1600/roundeddiv.png" alt="Rounded corner div tag" width="560" height="510" /></a></p>
<p>1.  Rounded box using div tag and css.</p>
<div>Css style:</div>
<p>body {<br />
width: 500px;<br />
margin: 60px auto 0;<br />
background: #0099FF;<br />
}<br />
#mainBox {<br />
/* Just a box */<br />
width: 500px;<br />
height: 500px;</p>
<p>/* specify radius of rounded corner and its border size */<br />
-moz-border-radius: 25px;<br />
-webkit-border-radius: 25px;<br />
border-radius: 15px;<br />
border: 2px solid white;</p>
<p>/* specify the multiple border colors for box */<br />
-moz-border-top-colors: #292929 white;<br />
-moz-border-right-colors: #292929 white;<br />
-moz-border-bottom-colors: #292929 white;<br />
-moz-border-left-colors: #292929 white;</p>
<p>/* Compensate for Webkit. Not as nice, but works. */<br />
-webkit-box-shadow: 0 -1px 2px #292929;</p>
<p>/* Background subtle gradient, with fallback to solid color */<br />
background: #e3e3e3;<br />
background: -moz-linear-gradient(top, #782725, #FFFFFF);<br />
background: -webkit-gradient(linear, left top, left bottom, from(#782725), to(#FFFFFF));<br />
}</p>
<p><strong>Add just a div tag with id mainBox in your body tag and you have done..</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jayantnet.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jayantnet.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jayantnet.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jayantnet.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jayantnet.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jayantnet.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jayantnet.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jayantnet.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jayantnet.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jayantnet.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jayantnet.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jayantnet.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jayantnet.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jayantnet.wordpress.com/81/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jayantnet.wordpress.com&amp;blog=9612926&amp;post=81&amp;subd=jayantnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jayantnet.wordpress.com/2010/07/19/rounded-corner-and-gradient-colored-box-using-css-only/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eba59851b33d3da59489f3c1d7c228cd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jayant</media:title>
		</media:content>

		<media:content url="http://2.bp.blogspot.com/_WAdkpujCgKs/TBo8A-t2zhI/AAAAAAAAAHg/zfBxy0qN-jI/s1600/roundeddiv.png" medium="image">
			<media:title type="html">rounded corner div</media:title>
		</media:content>
	</item>
		<item>
		<title>Pdf in Asp.net using iTextSharp(Gridview to Pdf)</title>
		<link>http://jayantnet.wordpress.com/2010/03/18/pdf-in-asp-net-using-itextsharpgridview-to-pdf/</link>
		<comments>http://jayantnet.wordpress.com/2010/03/18/pdf-in-asp-net-using-itextsharpgridview-to-pdf/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 20:31:54 +0000</pubDate>
		<dc:creator>jayant</dc:creator>
				<category><![CDATA[Asp.net]]></category>

		<guid isPermaLink="false">http://jayantnet.wordpress.com/?p=70</guid>
		<description><![CDATA[Most of the computer users(Clients) are likely to have used PDF Documents. This tutorial is based on creating pdfs in asp.net(C#) 1.0 Introduction: Most of the computer users(Clients) are likely to have used PDF Documents. This tutorial is based on creating pdfs in asp.net(C#) 2.0 Using the Code PdfWriter.GetInstance(doc, new FileStream(&#8220;c:/pdf1.pdf&#8221;,FileMode.Create)); 3.0 Steps to fallow [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jayantnet.wordpress.com&amp;blog=9612926&amp;post=70&amp;subd=jayantnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Most of the computer users(Clients) are likely  to have used PDF Documents. This tutorial is based on creating  pdfs in asp.net(C#)</p>
<div id="attachment_72" class="wp-caption aligncenter" style="width: 410px"><a href="http://jayantnet.files.wordpress.com/2010/03/itextsharppdf.jpg"><img class="size-full wp-image-72" title="itextsharppdf" src="http://jayantnet.files.wordpress.com/2010/03/itextsharppdf.jpg" alt="jayantpdf1" width="400" height="138" /></a><p class="wp-caption-text">simple Pdf</p></div>
<div id="attachment_73" class="wp-caption aligncenter" style="width: 410px"><a href="http://jayantnet.files.wordpress.com/2010/03/itextsharppdf2.jpg"><img class="size-full wp-image-73" title="itextsharppdf2" src="http://jayantnet.files.wordpress.com/2010/03/itextsharppdf2.jpg" alt="jayantpdf2" width="400" height="120" /></a><p class="wp-caption-text">gridviewpdf</p></div>
<p><strong>1.0 Introduction:</strong></p>
<p>Most of the computer users(Clients) are likely to have used PDF Documents. This tutorial is based on creating pdfs in asp.net(C#)</p>
<p><strong>2.0 Using the Code</strong></p>
<p><strong>PdfWriter</strong><strong>.GetInstance(doc, new </strong><strong>FileStream</strong><strong>(</strong><strong>&#8220;c:/pdf1.pdf&#8221;</strong><strong>,</strong><strong>FileMode</strong><strong>.Create));</strong></p>
<p><strong>3.0 Steps to fallow</strong></p>
<p><strong> 3.1 Step 1:</strong></p>
<p>Create an instance of the  iTextSharp.text.Document by writing code</p>
<p>iTextSharp.text.Document doc = new iTextSharp.text.Document();</p>
<p><strong> </strong><strong>3.2 Step 2:</strong></p>
<p>Create a writer that listen the document you have created and write it to your Stream.</p>
<p>PdfWriter.GetInstance(doc, new FileStream(&#8220;c:/pdf1.pdf&#8221;, FileMode.Create));</p>
<p><strong> 3.3 Step 3:</strong></p>
<p>Open the Document so that you can write your data to it.</p>
<p>doc.Open();</p>
<p>//you can add</p>
<p>Authors, header, subject to your pdf by methods</p>
<p>//Not recommended</p>
<p>doc.AddAuthor(&#8220;Bill&#8221;);</p>
<p>doc.AddSubject(&#8220;Billings&#8221;);</p>
<p>doc.AddHeader(&#8220;BY jay&#8221;, &#8220;BigInt&#8221;);</p>
<p><strong> </strong><strong>3.4 Step 4:</strong><br />
Add Content to the document.</p>
<p>doc.Add(new Paragraph(&#8220;Hello this is my first pdf&#8221;);</p>
<p><strong>3.5 Step 5:</strong><br />
Close the document.</p>
<p>doc.Close();</p>
<p><strong> </strong><strong>3.6  Now result is stored at the location you specified..check it.</strong></p>
<p><strong>4.0 Classes and methods provided by iTextSharp</strong></p>
<p><strong>4.1 iTextSharp.text.</strong><strong>Document</strong><strong>.</strong></p>
<p>public Document();</p>
<p>public Document(Rectangle Size);</p>
<p>public Document(Rectangle Size,int Left,int Right,int Top, int Bottom);</p>
<p>Size object sets the Pagesize of Pdf Document</p>
<p>You can create your Rectangle object with certain Borders, Backgroundcolor,</p>
<p>Rectangle Size = new Rectangle(144,720);</p>
<p>Size.BackgroundColor = new Color(123, 12, 210);</p>
<p>Document document = new Document(Size);</p>
<p><strong>4.2 PdfWriter</strong></p>
<p>Once the document object is created, we need to create PdfWriter object</p>
<p>PdfWriter.GetInstance(doc, new FileStream(&#8220;c:/pdf1.pdf&#8221;, FileMode.Create));</p>
<p><strong>4.3. Before writing actual data, you might wish to add some metadata like author, title, subject. Document  has few methods to add medata are as fallows.</strong></p>
<p><strong> </strong></p>
<p>doc.AddAuthor(&#8220;Bill&#8221;);</p>
<p>doc.AddSubject(&#8220;Billings&#8221;);</p>
<p>doc.AddHeader(&#8220;BY jay&#8221;, &#8220;BigInt&#8221;);</p>
<p>doc.AddCreationDate();</p>
<p>doc.AddCreator(&#8220;name&#8221;);</p>
<p>doc.AddProducer();</p>
<p>doc.AddKeywords(&#8220;Keywords&#8221;);</p>
<p><strong>4.4. Adding Watermark to report.</strong></p>
<p><strong> </strong></p>
<p>Watermark watermark = new Watermark(Image.getInstance(&#8220;image.jpg&#8221;),</p>
<p>400, 600);</p>
<p><strong>4.5. Cell.</strong></p>
<p>Cell can be add by creating a object of Cell class and add to document using add() method of document object</p>
<p><strong> </strong></p>
<p>Cell cell = new Cell(new Phrase(&#8220;BigInt Technologies.. &#8220;, FontFactory.GetFont(FontFactory.HELVETICA_BOLD,</p>
<p>24)));</p>
<p>cell.HorizontalAlignment = Element.ALIGN_CENTER;</p>
<p>cell.VerticalAlignment = Element.ALIGN_MIDDLE;</p>
<p>cell.Colspan = 3;</p>
<p>cell.Border = 1;</p>
<p>cell.BackgroundColor =</p>
<p>iTextSharp.text.Color.LIGHT_GRAY;  //System.Drawing.Color.Silver;</p>
<p>not work</p>
<p>tableLayout.AddCell(cell);</p>
<p>Another merhod to add cell is</p>
<p>Document.AddCell(&#8220;Cell Value&#8221;);</p>
<p><strong>5.0 Examples</strong></p>
<p><strong>5.1 Example  which shows a simple pdf with Rectangle and cell values as shown in Figure 1.0</strong></p>
<p>public void ExportSimplePdf()</p>
<p>{</p>
<p>iTextSharp.text.Document doc = new iTextSharp.text.Document();</p>
<p>PdfWriter.GetInstance(doc, new FileStream(&#8220;c:/pdf1.pdf&#8221;, FileMode.Create));</p>
<p>doc.AddAuthor(&#8220;Bill&#8221;);</p>
<p>doc.AddSubject(&#8220;Billings&#8221;);</p>
<p>doc.AddHeader(&#8220;BY jay&#8221;, &#8221;BigInt&#8221;);</p>
<p>doc.Open();</p>
<p>iTextSharp.text.Table tableLayout = new iTextSharp.text.Table(3);</p>
<p>float[] headers = { 10, 70, 40 };</p>
<p>tableLayout.Widths = headers;</p>
<p>tableLayout.WidthPercentage = 100;</p>
<p>Cell cell = new Cell(new Phrase(&#8220;BigInt Technologies.. &#8220;, FontFactory.GetFont(FontFactory.HELVETICA_BOLD, 24)));</p>
<p>cell.HorizontalAlignment = Element.ALIGN_CENTER;</p>
<p>cell.VerticalAlignment = Element.ALIGN_MIDDLE;</p>
<p>cell.Colspan = 3;</p>
<p>cell.Border = 1;</p>
<p>cell.BackgroundColor = iTextSharp.text.Color.LIGHT_GRAY;  //System.Drawing.Color.Silver; not work</p>
<p>tableLayout.AddCell(cell);</p>
<p>tableLayout.DefaultColspan = 3;</p>
<p>StringBuilder strInfo = new StringBuilder();</p>
<p>strInfo.Append(&#8221; ID Name        : Jayant Bramhankar&#8221;);</p>
<p>strInfo.Append(Environment.NewLine);</p>
<p>strInfo.Append(&#8221; Phone           : 9923748199&#8243;);</p>
<p>strInfo.Append(Environment.NewLine);</p>
<p>strInfo.Append(&#8221; Adress          : Nagpure&#8221;);</p>
<p>strInfo.Append(Environment.NewLine);</p>
<p>strInfo.Append(&#8221; Date of Birth  : 14/4/1986           Date: &#8220;);</p>
<p>strInfo.Append(DateTime.Now.ToShortDateString());</p>
<p>strInfo.Append(Environment.NewLine);</p>
<p>strInfo.Append(&#8221; &#8220;);</p>
<p>tableLayout.AddCell(strInfo.ToString());</p>
<p>tableLayout.DefaultColspan = 1;</p>
<p>tableLayout.AddCell(&#8220;Sr.No&#8221;);</p>
<p>Cell cInc = new Cell(new Phrase(&#8220;Incentive Types&#8221;, FontFactory.GetFont(FontFactory.HELVETICA, 12)));</p>
<p>cInc.HorizontalAlignment = Element.ALIGN_CENTER;</p>
<p>cInc.VerticalAlignment = Element.ALIGN_MIDDLE;</p>
<p>tableLayout.AddCell(cInc);</p>
<p>// another method to add cell is</p>
<p>// tableLayout.AddCell(&#8220;Incentive Types&#8221;);</p>
<p>tableLayout.AddCell(&#8220;Amount&#8221;);</p>
<p>tableLayout.AddCell(&#8220;2&#8243;);</p>
<p>tableLayout.AddCell(&#8220;Silver Zone Incentive&#8221;);</p>
<p>tableLayout.AddCell(&#8220;2000&#8243;);</p>
<p>tableLayout.AddCell(&#8220;3&#8243;);</p>
<p>tableLayout.AddCell(&#8220;Golden Zone Incentive&#8221;);</p>
<p>tableLayout.AddCell(&#8220;3000&#8243;);</p>
<p>tableLayout.AddCell(&#8220;4&#8243;);</p>
<p>tableLayout.AddCell(&#8220;Diamond Incentive&#8221;);</p>
<p>tableLayout.AddCell(&#8220;4000&#8243;);</p>
<p>// doc.Add(new Paragraph(&#8220;Hello World&#8221;));</p>
<p>doc.Add(tableLayout);</p>
<p>doc.Close();</p>
<p>}</p>
<p><strong> 5.2 Example  which shows exporting data to grid and  grid to Pdf</strong></p>
<p><strong> </strong></p>
<p>protected void Test2_Click(object sender, EventArgs e)</p>
<p>{</p>
<p>// data to gridview from database</p>
<p>SqlConnection connection = new SqlConnection(@&#8221;Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Administrator\Desktop\pdf blog\mlm\App_Data\TestPdf.mdf;Integrated Security=True;User Instance=True&#8221;);</p>
<p>try</p>
<p>{</p>
<p>connection.Open();</p>
<p>SqlCommand cmd = new SqlCommand(&#8220;Select * from  Employee&#8221;, connection);</p>
<p>SqlDataAdapter da = new SqlDataAdapter(cmd);</p>
<p>DataSet data = new DataSet();</p>
<p>da.Fill(data);</p>
<p>gridDataToExport.DataSource = data.Tables[0];</p>
<p>gridDataToExport.DataBind();</p>
<p>Button2.Visible = true;</p>
<p>}</p>
<p>catch (SqlException ex) { Response.WriteFile(ex.Message); }</p>
<p>}</p>
<p>protected void Button2_Click(object sender, EventArgs e)</p>
<p>{</p>
<p>iTextSharp.text.Document doc = new iTextSharp.text.Document();</p>
<p>PdfWriter.GetInstance(doc, new FileStream(&#8220;c:/pdf2.pdf&#8221;, FileMode.Create));</p>
<p>doc.AddAuthor(&#8220;Bill&#8221;);</p>
<p>doc.AddSubject(&#8220;Billings&#8221;);</p>
<p>doc.AddHeader(&#8220;BY jay&#8221;, &#8221;BigInt&#8221;);</p>
<p>doc.Open();</p>
<p>doc.Add(ExportGridToPdf());</p>
<p>doc.Close();</p>
<p>}</p>
<p>public PdfPTable ExportGridToPdf()</p>
<p>{</p>
<p>iTextSharp.text.pdf.PdfPTable tableLayout = new iTextSharp.text.pdf.PdfPTable(4);</p>
<p>float[] headers = { 10, 50, 40, 40 };</p>
<p>tableLayout.SetWidths(headers);</p>
<p>tableLayout.WidthPercentage = 100;</p>
<p>//Create header</p>
<p>PdfPCell cellSr = new PdfPCell(new Phrase(&#8220;Sr. No &#8220;, new Font(Font.HELVETICA, 12, 1, Color.BLUE)));</p>
<p>PdfPCell cellName = new PdfPCell(new Phrase(&#8220;Name &#8220;, new Font(Font.HELVETICA, 12, 1, Color.BLUE)));</p>
<p>PdfPCell cellQua = new PdfPCell(new Phrase(&#8220;Qualifiaction &#8220;, new Font(Font.HELVETICA, 12, 1, Color.BLUE)));</p>
<p>PdfPCell cellOcc = new PdfPCell(new Phrase(&#8220;Occupation &#8220;, new Font(Font.HELVETICA, 12, 1, Color.BLUE)));</p>
<p>//add headers to report</p>
<p>tableLayout.AddCell(cellSr);</p>
<p>tableLayout.AddCell(cellName);</p>
<p>tableLayout.AddCell(cellQua);</p>
<p>tableLayout.AddCell(cellOcc);</p>
<p>tableLayout.DefaultCell.BorderWidth = 1;</p>
<p>try{</p>
<p>int index=1;</p>
<p>foreach(GridViewRow row in gridDataToExport.Rows)</p>
<p>{</p>
<p>if (index % 2 == 0)</p>
<p>{</p>
<p>tableLayout.DefaultCell.BackgroundColor = iTextSharp.text.Color.LIGHT_GRAY;</p>
<p>}</p>
<p>else{tableLayout.DefaultCell.BackgroundColor = iTextSharp.text.Color.WHITE;}</p>
<p>tableLayout.AddCell(row.Cells[0].Text);</p>
<p>tableLayout.AddCell(row.Cells[1].Text);</p>
<p>tableLayout.AddCell(row.Cells[2].Text);</p>
<p>tableLayout.AddCell(row.Cells[3].Text);</p>
<p>index++;</p>
<p>}</p>
<p>return tableLayout;</p>
<p>}</p>
<p>catch (SqlException ex)</p>
<p>{</p>
<p>Response.Write(ex.Message);</p>
<p>return tableLayout;</p>
<p>}</p>
<p>}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jayantnet.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jayantnet.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jayantnet.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jayantnet.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jayantnet.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jayantnet.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jayantnet.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jayantnet.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jayantnet.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jayantnet.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jayantnet.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jayantnet.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jayantnet.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jayantnet.wordpress.com/70/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jayantnet.wordpress.com&amp;blog=9612926&amp;post=70&amp;subd=jayantnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jayantnet.wordpress.com/2010/03/18/pdf-in-asp-net-using-itextsharpgridview-to-pdf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eba59851b33d3da59489f3c1d7c228cd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jayant</media:title>
		</media:content>

		<media:content url="http://jayantnet.files.wordpress.com/2010/03/itextsharppdf.jpg" medium="image">
			<media:title type="html">itextsharppdf</media:title>
		</media:content>

		<media:content url="http://jayantnet.files.wordpress.com/2010/03/itextsharppdf2.jpg" medium="image">
			<media:title type="html">itextsharppdf2</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple Delegate in C#</title>
		<link>http://jayantnet.wordpress.com/2010/03/18/simple-delegate-in-c/</link>
		<comments>http://jayantnet.wordpress.com/2010/03/18/simple-delegate-in-c/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 20:21:35 +0000</pubDate>
		<dc:creator>jayant</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jayantnet.wordpress.com/?p=66</guid>
		<description><![CDATA[Delegates roughly similar to function pointers in C++. A delegate declaration defines a reference type that can be used to encapsulate a method with a specific signature and can be used later. How to use The type safety of delegates requires the function you pass as a delegate to have the same signature as the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jayantnet.wordpress.com&amp;blog=9612926&amp;post=66&amp;subd=jayantnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Delegates  roughly similar to function pointers in C++.<br />
A delegate declaration defines a reference type that can be used to  encapsulate a method with a specific signature and can be used later.</p>
<p>How to use</p>
<p>The type safety of delegates requires the function you pass as a  delegate to have the same signature as the delegate declaration.</p>
<p>See the fallowing program for more information on using delegates.</p>
<blockquote><p>namespace delegates</p>
<p>{</p>
<p>//Create a new category</p>
<p>public delegate int MyDelegate(int x, int y);</p>
<p>public class MyDelegateProgram</p>
<p>{</p>
<p>public static int FunAdd(int x, int y)</p>
<p>{</p>
<p>return x + y;</p>
<p>}</p>
<p>public static int FunMultiply(int x, int y)</p>
<p>{</p>
<p>return x * y;</p>
<p>}</p>
<p>}</p>
<p>class Program</p>
<p>{</p>
<p>static void Main(string[] args)</p>
<p>{</p>
<p>//instance and initialization</p>
<p>MyDelegate DelAdd = new MyDelegate(MyDelegateProgram.FunAdd);</p>
<p>MyDelegate DelMul = new MyDelegate(MyDelegateProgram.FunMultiply);</p>
<p>//invoking function using delegates</p>
<p>Console.WriteLine(&#8220;Addition : &#8221; + DelAdd(4, 5));</p>
<p>Console.WriteLine(&#8220;Multiplication : &#8221; + DelMul(4, 5));</p>
<p>//array of Delegates&#8212;&#8212;&#8212;&#8211;</p>
<p>Console.WriteLine(&#8220;Using Array of Delegate&#8221;);</p>
<p>MyDelegate[] arrDelegates;</p>
<p>arrDelegates = new MyDelegate[2]; //size of delegate array</p>
<p>arrDelegates[0] = new MyDelegate(MyDelegateProgram.FunAdd);</p>
<p>arrDelegates[1] = new MyDelegate(MyDelegateProgram.FunMultiply);</p>
<p>foreach (MyDelegate item in arrDelegates)</p>
<p>{</p>
<p>Console.WriteLine(item(4, 5));</p>
<p>}</p>
<p>Console.ReadKey();</p>
<p>}</p>
<p>}</p>
<p>}</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jayantnet.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jayantnet.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jayantnet.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jayantnet.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jayantnet.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jayantnet.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jayantnet.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jayantnet.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jayantnet.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jayantnet.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jayantnet.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jayantnet.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jayantnet.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jayantnet.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jayantnet.wordpress.com&amp;blog=9612926&amp;post=66&amp;subd=jayantnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jayantnet.wordpress.com/2010/03/18/simple-delegate-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eba59851b33d3da59489f3c1d7c228cd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jayant</media:title>
		</media:content>
	</item>
		<item>
		<title>Row level Javascript with Gridview in Asp.Net (Client side calculations in Gridview)</title>
		<link>http://jayantnet.wordpress.com/2010/01/23/row-level-javascript-with-gridview-in-asp-net-client-side-calculations-in-gridview/</link>
		<comments>http://jayantnet.wordpress.com/2010/01/23/row-level-javascript-with-gridview-in-asp-net-client-side-calculations-in-gridview/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 14:20:19 +0000</pubDate>
		<dc:creator>jayant</dc:creator>
				<category><![CDATA[Java Script]]></category>

		<guid isPermaLink="false">http://jayantnet.wordpress.com/?p=56</guid>
		<description><![CDATA[Most of the time client wants fast calculation in gridview (no postback) e.g calculating cost of items or products for specified quantity. So we can solve this by using javascript, so  all the calculations will be done at client side only and then we can get all values from gridview for other purpose. Below code [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jayantnet.wordpress.com&amp;blog=9612926&amp;post=56&amp;subd=jayantnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="attachment_59" class="wp-caption aligncenter" style="width: 610px"><a href="http://jayantnet.files.wordpress.com/2010/01/gridvewjavascript1.jpg"><img class="size-full wp-image-59" title="gridvewjavascript" src="http://jayantnet.files.wordpress.com/2010/01/gridvewjavascript1.jpg" alt="gridvewjavascriptbyjayant" width="600" height="91" /></a><p class="wp-caption-text">Gridview with javascript</p></div>
<p>Most of the time client wants fast calculation in gridview (no postback) e.g calculating cost of items or products for specified quantity.<br />
So we can solve this by using javascript, so  all the calculations will be done at client side only and then we can get all values from gridview for other purpose.</p>
<p>Below code goes in aspx page.</p>
<pre>&lt;asp:GridView ID="GridView1" runat="server" AllowPaging="True"

AllowSorting="True" AutoGenerateColumns="False"  Width="100%" BackColor="White" BorderColor="#3366CC" BorderStyle="None"

BorderWidth="1px" CellPadding="4" Font-Size="Smaller" &gt;

&lt;FooterStyle BackColor="#99CCCC" ForeColor="#003399" /&gt;

&lt;RowStyle BackColor="White" ForeColor="#003399"  /&gt;

&lt;Columns&gt;

&lt;asp:TemplateField &gt;

&lt;ItemStyle Font-Names="Tahoma" Font-Size="14pt" HorizontalAlign="Left" Width="70" /&gt;

&lt;HeaderStyle Font-Names="Tahoma" Font-Size="14pt" HorizontalAlign="Left" /&gt;

&lt;HeaderTemplate &gt;

Product

&lt;/HeaderTemplate&gt;

&lt;ItemTemplate &gt;

&lt;asp:Label runat="server" ID="txtname" Text='&lt;%# DataBinder.Eval(Container.DataItem,"name") %&gt;' Width="50px"&gt;&lt;/asp:Label&gt;

&lt;/ItemTemplate&gt;

&lt;/asp:TemplateField&gt;

&lt;asp:TemplateField&gt;

&lt;ItemStyle Font-Names="Tahoma" Font-Size="14pt" HorizontalAlign="Left" Width="170" /&gt;

&lt;HeaderStyle Font-Names="Tahoma" Font-Size="14pt" HorizontalAlign="Left" /&gt;

&lt;HeaderTemplate &gt;

Cost

&lt;/HeaderTemplate&gt;

&lt;ItemTemplate&gt;

&lt;asp:TextBox runat ="server" id="ttCost" ReadOnly="true" visible="true" Text='&lt;%# DataBinder.Eval(Container.DataItem,"Cost") %&gt;' /&gt;

&lt;/ItemTemplate&gt;

&lt;/asp:TemplateField&gt;

&lt;asp:TemplateField&gt;

&lt;ItemStyle HorizontalAlign="Left" Width="30" BorderWidth="0" /&gt;

&lt;HeaderStyle Font-Names="Tahoma" Font-Size="14pt" HorizontalAlign="Left" /&gt;

&lt;HeaderTemplate &gt;

No. of Pins

&lt;/HeaderTemplate&gt;

&lt;ItemTemplate&gt;

&lt;input type="text" runat ="server" id="ttPin" visible="true" value='0' onblur="validateField(this)" /&gt;

&lt;/ItemTemplate&gt;

&lt;/asp:TemplateField&gt;

&lt;asp:TemplateField&gt;

&lt;ItemStyle HorizontalAlign="Left" Width="30" BorderWidth="0" /&gt;

&lt;HeaderStyle Font-Names="Tahoma" Font-Size="14pt" HorizontalAlign="Left" /&gt;

&lt;HeaderTemplate &gt;

Total Amount

&lt;/HeaderTemplate&gt;

&lt;ItemTemplate&gt;

&lt;input type ="text" runat ="server" id="total" ReadOnly="true" visible="true" value='0' /&gt;

&lt;/ItemTemplate&gt;

&lt;/asp:TemplateField&gt;

&lt;asp:TemplateField &gt;

&lt;ItemStyle Font-Names="Tahoma" Font-Size="0pt" HorizontalAlign="Left" Width="0" /&gt;

&lt;HeaderStyle Font-Names="Tahoma" Font-Size="0pt" HorizontalAlign="Left" /&gt;

&lt;HeaderTemplate &gt;

Product

&lt;/HeaderTemplate&gt;

&lt;ItemTemplate &gt;

&lt;asp:Label runat="server" ID="pid" Text='&lt;%# DataBinder.Eval(Container.DataItem,"ProductId") %&gt;' Width="0px"&gt;&lt;/asp:Label&gt;

&lt;/ItemTemplate&gt;

&lt;/asp:TemplateField&gt;

&lt;/Columns&gt;

&lt;PagerStyle ForeColor="#003399" HorizontalAlign="Left" BackColor="#99CCCC" /&gt;

&lt;SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" /&gt;

&lt;HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" /&gt;

&lt;/asp:GridView&gt;</pre>
<p>Bind data to gridview from Database</p>
<pre>public void ComboLoad()

{

DataAccess da = new DataAccess();

DataSet ds = new DataSet();

ds=da.GetDataTable("Select Name, Cost, ProductId from NProducts");

GridView1.DataSource = ds;

GridView1.DataBind();

}</pre>
<p>Javascript Code</p>
<pre>This javascript code will perform clientside actions.

function validateField ( fieldname )

{

if ( ( fieldname.value ) &amp;&amp;

( ! fieldname.value.match ( " " ) ) )

{

var str=fieldname.id;

document.getElementById(fieldname.id.replace("ttPin", "total")).value=fieldname.value * document.getElementById(fieldname.id.replace("ttPin", "ttCost")).value ;

}

}</pre>
<p>Now you can read all values from grid view to perform database operations by using following code</p>
<pre>for (int i = 0; i &lt; GridView1.Rows.Count; i++) //loop to coun rows

{

HtmlInputText tt1 = HtmlInputText)GridView1.Rows[i].FindControl("ttPin"); //getting rowwise texbox value

HtmlInputText tt2 = (HtmlInputText)GridView1.Rows[i].FindControl("total");

Label tt3 = (Label)GridView1.Rows[i].FindControl("pid"); //reading product name from label used in gridview.

string pid = tt3.Text;

string tpin = tt1.Value;

string tot = tt2.Value;

da.ExecuteNonQuery("Insert into DB values('"+Rid+"', '"+pid+"', '"+tpin+"', '"+tot+"')");
}</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jayantnet.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jayantnet.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jayantnet.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jayantnet.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jayantnet.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jayantnet.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jayantnet.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jayantnet.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jayantnet.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jayantnet.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jayantnet.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jayantnet.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jayantnet.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jayantnet.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jayantnet.wordpress.com&amp;blog=9612926&amp;post=56&amp;subd=jayantnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jayantnet.wordpress.com/2010/01/23/row-level-javascript-with-gridview-in-asp-net-client-side-calculations-in-gridview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eba59851b33d3da59489f3c1d7c228cd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jayant</media:title>
		</media:content>

		<media:content url="http://jayantnet.files.wordpress.com/2010/01/gridvewjavascript1.jpg" medium="image">
			<media:title type="html">gridvewjavascript</media:title>
		</media:content>
	</item>
		<item>
		<title>Restrict TextBox from accepting numeric digits..</title>
		<link>http://jayantnet.wordpress.com/2009/12/31/restrict-textbox-from-accepting-numeric-digits/</link>
		<comments>http://jayantnet.wordpress.com/2009/12/31/restrict-textbox-from-accepting-numeric-digits/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 18:54:41 +0000</pubDate>
		<dc:creator>jayant</dc:creator>
				<category><![CDATA[WinForms]]></category>

		<guid isPermaLink="false">http://jayantnet.wordpress.com/?p=39</guid>
		<description><![CDATA[Hi friends, I’m adding here a tutorial code snippet based on Validating Textbox for accepting numeric keys only.. Step1. Write a class for user defined textbox as shown below or drag from VSIDE and add event handler to textbox Step2. Nothing rather than enjoying.. class NumbersOnly:TextBox { public NumbersOnly() { this.KeyPress += new KeyPressEventHandler(text_numberhandle); } [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jayantnet.wordpress.com&amp;blog=9612926&amp;post=39&amp;subd=jayantnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi friends, I’m adding here a tutorial code snippet based on Validating Textbox for accepting numeric keys only..</p>
<p>Step1. Write a class for user defined textbox as shown below or drag from VSIDE and add event handler to textbox</p>
<p>Step2. Nothing rather than enjoying..</p>
<pre><span style="color:#0000ff;">class </span><span style="color:#00ccff;">NumbersOnly</span>:<span style="color:#00ccff;">TextBox</span>
{
<span style="color:#0000ff;">      public </span>NumbersOnly()
      {
<span style="color:#0000ff;">          this</span>.KeyPress += new <span style="color:#00ccff;">KeyPressEventHandler</span>(text_numberhandle);
      }
<span style="color:#0000ff;">      private </span><span style="color:#0000ff;">void </span>text_numberhandle(<span style="color:#0000ff;">object </span>sender, <span style="color:#00ccff;">KeyPressEventArgs </span>e)
      {
<span style="color:#0000ff;">            if </span>(!<span style="color:#0000ff;">char</span>.IsDigit(e.KeyChar) &amp;&amp; !<span style="color:#0000ff;">char</span>.IsControl(e.KeyChar))
            { e.Handled = true; }
      }
}</pre>
<p>Second Method..<br />
You can add textbox handler to  Designer.cs file and call it from Form source file as mentioned below</p>
<pre><span style="color:#008000;">// textBox1</span>
<span style="color:#008000;">//</span>

<span style="color:#0000ff;">this</span>.textBox1.Location = <span style="color:#0000ff;">new </span>System.Drawing.<span style="color:#00ffff;">Point</span>(92, 62);
<span style="color:#0000ff;">this</span>.textBox1.Name = "<span style="color:#800000;">textBox1</span>";
<span style="color:#0000ff;">this</span>.textBox1.Size = <span style="color:#0000ff;">new </span>System.Drawing.<span style="color:#00ffff;">Size</span>(100, 20);
<span style="color:#0000ff;">this</span>.textBox1.TabIndex = 0;
<span style="color:#0000ff;">this</span>.textBox1.KeyPress += <span style="color:#0000ff;">new</span> System.Windows.Forms.<span style="color:#00ffff;">KeyPressEventHandler</span>(
                           text_numberhandle);</pre>
<p>and then call it from your Form1 code.</p>
<pre><span style="color:#008000;">//Form1.cs</span>
<span style="color:#0000ff;">private </span><span style="color:#0000ff;">void </span>text_numberhandle(<span style="color:#0000ff;">object </span>sender, <span style="color:#00ffff;">KeyPressEventArgs </span>e)
{
<span style="color:#0000ff;">      if </span>(!<span style="color:#0000ff;">char</span>.IsDigit(e.KeyChar) &amp;&amp; !<span style="color:#0000ff;">char</span>.IsControl(e.KeyChar))
      {
            e.Handled = <span style="color:#0000ff;">true</span>;
      }
}</pre>
<p><span style="color:#ff6600;">Happy .Neting</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jayantnet.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jayantnet.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jayantnet.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jayantnet.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jayantnet.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jayantnet.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jayantnet.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jayantnet.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jayantnet.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jayantnet.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jayantnet.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jayantnet.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jayantnet.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jayantnet.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jayantnet.wordpress.com&amp;blog=9612926&amp;post=39&amp;subd=jayantnet&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jayantnet.wordpress.com/2009/12/31/restrict-textbox-from-accepting-numeric-digits/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/eba59851b33d3da59489f3c1d7c228cd?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jayant</media:title>
		</media:content>
	</item>
	</channel>
</rss>
