<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4303646917971632449</id><updated>2024-08-28T18:22:44.221-07:00</updated><category term="Synamic css chnage"/><category term="css change in html"/><title type='text'>Blog for coders</title><subtitle type='html'>Welcome friends.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Soumen Ghosh</name><uri>http://www.blogger.com/profile/09900045366086828094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>77</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-2793835306621961593</id><published>2013-03-17T08:28:00.002-07:00</published><updated>2013-03-17T08:28:37.989-07:00</updated><title type='text'>PIVOT IN SQL SERVER EXAMPLE</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
DECLARE @startDate DATETIME;&lt;br /&gt;
SET @startDate = &#39;20130301&#39;;&lt;br /&gt;
DECLARE @Keywords VARCHAR(8000)&lt;br /&gt;
DECLARE @Kwyword VARCHAR(255)&lt;br /&gt;
&lt;br /&gt;
DECLARE cKeyword CURSOR FOR&lt;br /&gt;
&lt;br /&gt;
WITH N(n) AS&lt;br /&gt;
(SELECT 0 UNION ALL SELECT n+1 FROM N WHERE n &amp;lt; 30)&lt;br /&gt;
SELECT&lt;br /&gt;
CONVERT(VARCHAR(10), DATEADD(dd,n,@startDate), 120)&lt;br /&gt;
&lt;br /&gt;
FROM&lt;br /&gt;
N as t&lt;br /&gt;
WHERE&lt;br /&gt;
MONTH(DATEADD(dd,n,@startDate)) = MONTH(@startDate);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OPEN cKeyword&lt;br /&gt;
FETCH NEXT FROM cKeyword INTO @Kwyword&lt;br /&gt;
WHILE @@FETCH_STATUS = 0&lt;br /&gt;
BEGIN&lt;br /&gt;
SET @Keywords = ISNULL( +@Keywords + &#39;,&#39;, &#39;&#39;) +&#39;[&#39;+ @Kwyword +&#39;]&#39;&lt;br /&gt;
FETCH NEXT FROM cKeyword INTO @Kwyword&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
CLOSE cKeyword&lt;br /&gt;
DEALLOCATE cKeyword&lt;br /&gt;
&lt;br /&gt;
SELECT @Keywords AS Keywords&lt;br /&gt;
&lt;br /&gt;
execute(&#39;select M.employee_v_email,* from (select M03_employee_i_employeeid,max(ESSL_AttendanceDate) as ESSL_AttendanceDate&lt;br /&gt;
,&#39;&#39;In -&#39;&#39;+CONVERT(VARCHAR(8), attendance_dt_intime, 108) &amp;nbsp;+ &#39;&#39; Out-&#39;&#39;+ CONVERT(VARCHAR(8), attendance_dt_outtime, 108) attendance_dt_intime&lt;br /&gt;
&amp;nbsp;from TRANS.T03_tblAttendance group by M03_employee_i_employeeid,attendance_dt_intime,&lt;br /&gt;
&amp;nbsp;attendance_dt_outtime) tab&lt;br /&gt;
pivot (max(attendance_dt_intime) for ESSL_AttendanceDate in (&#39;+@Keywords+&#39;)) as pv&lt;br /&gt;
inner join MTR.M03_tblemployee as M on pv.M03_employee_i_employeeid = M.employee_i_employeeid&lt;br /&gt;
order by pv.M03_employee_i_employeeid&#39;)&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/2793835306621961593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2013/03/pivot-in-sql-server-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/2793835306621961593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/2793835306621961593'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2013/03/pivot-in-sql-server-example.html' title='PIVOT IN SQL SERVER EXAMPLE'/><author><name>kuntal</name><uri>http://www.blogger.com/profile/12316518319243526859</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2dobHNHzbjP-jIproGhFb_yDj2-P0dy8l12O9fKGsiuVmPXquktABZBXCaV6-F7SvPJnpZNtueWBqYS6zYSiHgB0o9A_-0-Ho0KZcJktQFyrEldcA1kCqgJufKDqaqw/s220/nike-swoosh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-4556435502182317871</id><published>2013-01-03T21:44:00.000-08:00</published><updated>2013-01-03T21:44:35.025-08:00</updated><title type='text'>GET DIRECTION IN GOOLE MAP </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
saddr=source address &lt;br /&gt;
daddr=destination address&lt;br /&gt;
http://maps.google.com/maps?saddr=dumdum,IN&amp;amp;daddr=Ballygunge,%20Kolkata,%20IN&amp;amp;hl=en&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/4556435502182317871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2013/01/get-direction-in-goole-map.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/4556435502182317871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/4556435502182317871'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2013/01/get-direction-in-goole-map.html' title='GET DIRECTION IN GOOLE MAP '/><author><name>kuntal</name><uri>http://www.blogger.com/profile/12316518319243526859</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2dobHNHzbjP-jIproGhFb_yDj2-P0dy8l12O9fKGsiuVmPXquktABZBXCaV6-F7SvPJnpZNtueWBqYS6zYSiHgB0o9A_-0-Ho0KZcJktQFyrEldcA1kCqgJufKDqaqw/s220/nike-swoosh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-1987285222070915156</id><published>2012-11-27T21:45:00.000-08:00</published><updated>2012-11-27T21:55:11.576-08:00</updated><title type='text'>Upload and Crop Images with jQuery, JCrop and ASP.NET</title><content type='html'>Owner of this article is &lt;b&gt;http://www.mikesdotnetting.com&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;cf&quot;&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;span class=&quot;yellow&quot;&gt;&amp;lt;%&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;@&lt;/span&gt; Page &lt;span class=&quot;cb5&quot;&gt;Language&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;C#&quot;&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;AutoEventWireup&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;true&quot;&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;CodeFile&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;UploadAndCrop.aspx.cs&quot;&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;Inherits&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;UploadAndCrop&quot;&lt;/span&gt; &lt;span class=&quot;yellow&quot;&gt;%&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;span class=&quot;cb1&quot;&gt;&amp;lt;!&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;DOCTYPE&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;html PUBLIC&lt;/span&gt; &lt;span class=&quot;cb1&quot;&gt;&quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;&lt;/span&gt; &lt;span class=&quot;cb1&quot;&gt;&quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;html&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;xmlns&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;head&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;span class=&quot;cb1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;head&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;form&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;form1&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;asp&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;Panel&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;pnlUpload&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;server&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;asp&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;FileUpload&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;Upload&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;server&quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;br&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt; /&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;asp&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;btnUpload&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;server&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;OnClick&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;btnUpload_Click&quot; Text=&quot;Upload&quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;asp&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;Label&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;lblError&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;server&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;Visible&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;false&quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;asp&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;Panel&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;asp&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;Panel&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;pnlCrop&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;server&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;Visible&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;false&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;asp&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;Image&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;imgCrop&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;server&quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;br&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt; /&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;asp&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;HiddenField&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;X&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;server&quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;asp&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;HiddenField&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;Y&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;server&quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cb1&quot;&gt; &amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;asp&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;HiddenField&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;W&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;server&quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;asp&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;HiddenField&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;H&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;server&quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;asp&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;btnCrop&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;server&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;Text&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;Crop&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;OnClick&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;btnCrop_Click&quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;asp&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;Panel&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;asp&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;Panel&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;pnlCropped&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;server&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;Visible&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;false&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;asp&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;Image&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;imgCropped&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;server&quot; /&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;asp&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;Panel&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;form&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;cb1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&amp;lt;/&lt;span class=&quot;cb3&quot;&gt;html&lt;/span&gt;&amp;gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
Some Javascript is required. If you were starting this kind of 
application from scratch, it would need an awful lot of javascript. 
However, jQuery&#39;s real power is illustrated by just how little 
javascript this page actually needs. To make use of both jQuery and 
JCrop, they need to be linked to in the head section of the page, along 
with the css file that comes as part of the JCrop download. The link to 
jQuery makes use of the copy available from the &lt;a href=&quot;http://code.google.com/intl/sv-SE/apis/ajaxlibs/documentation/index.html&quot;&gt;Google Ajax API Library&lt;/a&gt; for better caching and faster downloading:&lt;br /&gt;
&lt;div class=&quot;cf&quot;&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;link&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;css/jquery.Jcrop.css&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;rel&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;stylesheet&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;text/css&quot; /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;script&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;text/javascript&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js&quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;script&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;script&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;text/javascript&quot; &lt;/span&gt;&lt;span class=&quot;cb5&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;script/jquery.Jcrop.pack.js&quot;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;script&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
All that&#39;s now needed to activate JCrop is a handful of lines of 
Javascript, which go within &amp;lt;script&amp;gt; that&#39;s in the head of the 
document below the previous lines:&lt;br /&gt;
&lt;div class=&quot;cf&quot;&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;span class=&quot;cb1&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;script&lt;/span&gt; &lt;span class=&quot;cb5&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;=&quot;text/javascript&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; jQuery(document).ready(&lt;span class=&quot;cb1&quot;&gt;function&lt;/span&gt;() {&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; jQuery(&lt;span class=&quot;cb3&quot;&gt;&#39;#imgCrop&#39;&lt;/span&gt;).Jcrop({&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; onSelect: storeCoords&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; });&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; });&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;function&lt;/span&gt; storeCoords(c) {&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; jQuery(&lt;span class=&quot;cb3&quot;&gt;&#39;#X&#39;&lt;/span&gt;).val(c.x);&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; jQuery(&lt;span class=&quot;cb3&quot;&gt;&#39;#Y&#39;&lt;/span&gt;).val(c.y);&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; jQuery(&lt;span class=&quot;cb3&quot;&gt;&#39;#W&#39;&lt;/span&gt;).val(c.w);&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; jQuery(&lt;span class=&quot;cb3&quot;&gt;&#39;#H&#39;&lt;/span&gt;).val(c.h);&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; };&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;span class=&quot;cb1&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cb3&quot;&gt;script&lt;/span&gt;&lt;span class=&quot;cb1&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
It really is that simple. Jcrop has been applied to the image that 
has the id of imgCrop (the one in pnlCrop), and an event handler has 
been added to the select event of the cropper. This will happen when the
 user has completed selecting the area of the image they want to keep. 
The handler makes use of the storeCoords function, which sets the values
 of the HiddenFields, passing them the x and y coordinates of the top 
left of the selection relative to the image, and the width and height of
 the selection. That&#39;s all ASP.NET needs to know in order to process the
 image on the server. Now on to the server-side code.&lt;br /&gt;
There are 4 namespaces that need to be referenced in additional to the default ones that a new Web Form brings in:&lt;br /&gt;
&lt;div class=&quot;cf&quot;&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;span class=&quot;cb1&quot;&gt;using&lt;/span&gt; System.IO;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;span class=&quot;cb1&quot;&gt;using&lt;/span&gt; SD = System.Drawing;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;span class=&quot;cb1&quot;&gt;using&lt;/span&gt; System.Drawing.Imaging;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;span class=&quot;cb1&quot;&gt;using&lt;/span&gt; System.Drawing.Drawing2D;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
Since we will be working with instances of System.Drawing.Image as 
well as System.Web.UI.WebControls, which also has an Image class, I have
 aliased System.Drawing.Image, which will permit me to use a shorthand 
to reference the System.Drawing.Image classes. The first four lines of 
the code-behind simply set a variable to point to the file system path 
of the directory in which uploaded images will be stored, and show an 
empty Page_Load method:&lt;br /&gt;
&lt;div class=&quot;cf&quot;&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;span class=&quot;cb2&quot;&gt;String&lt;/span&gt; path = &lt;span class=&quot;cb2&quot;&gt;HttpContext&lt;/span&gt;.Current.Request.PhysicalApplicationPath + &lt;span class=&quot;cb3&quot;&gt;&quot;images\\&quot;&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;span class=&quot;cb1&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;cb1&quot;&gt;void&lt;/span&gt; Page_Load(&lt;span class=&quot;cb1&quot;&gt;object&lt;/span&gt; sender, &lt;span class=&quot;cb2&quot;&gt;EventArgs&lt;/span&gt; e)&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
{}&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
The next section covers the event handler for the Upload button click:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;cf&quot;&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;span class=&quot;cb1&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;cb1&quot;&gt;void&lt;/span&gt; btnUpload_Click(&lt;span class=&quot;cb1&quot;&gt;object&lt;/span&gt; sender, &lt;span class=&quot;cb2&quot;&gt;EventArgs&lt;/span&gt; e)&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
{&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb2&quot;&gt;Boolean&lt;/span&gt; FileOK = &lt;span class=&quot;cb1&quot;&gt;false&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb2&quot;&gt;Boolean&lt;/span&gt; FileSaved = &lt;span class=&quot;cb1&quot;&gt;false&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;if&lt;/span&gt; (Upload.HasFile)&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; Session[&lt;span class=&quot;cb3&quot;&gt;&quot;WorkingImage&quot;&lt;/span&gt;] = Upload.FileName;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb2&quot;&gt;String&lt;/span&gt; FileExtension = &lt;span class=&quot;cb2&quot;&gt;Path&lt;/span&gt;.GetExtension(Session[&lt;span class=&quot;cb3&quot;&gt;&quot;WorkingImage&quot;&lt;/span&gt;].ToString()).ToLower();&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb2&quot;&gt;String&lt;/span&gt;[] allowedExtensions = { &lt;span class=&quot;cb3&quot;&gt;&quot;.png&quot;&lt;/span&gt;, &lt;span class=&quot;cb3&quot;&gt;&quot;.jpeg&quot;&lt;/span&gt;, &lt;span class=&quot;cb3&quot;&gt;&quot;.jpg&quot;&lt;/span&gt;, &lt;span class=&quot;cb3&quot;&gt;&quot;.gif&quot;&lt;/span&gt; };&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;cb1&quot;&gt;int&lt;/span&gt; i = 0; i &amp;lt; allowedExtensions.Length; i++)&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;if&lt;/span&gt; (FileExtension == allowedExtensions[i])&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FileOK = &lt;span class=&quot;cb1&quot;&gt;true&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;if&lt;/span&gt; (FileOK)&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;try&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Upload.PostedFile.SaveAs(path + Session[&lt;span class=&quot;cb3&quot;&gt;&quot;WorkingImage&quot;&lt;/span&gt;]);&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; FileSaved = &lt;span class=&quot;cb1&quot;&gt;true&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;catch&lt;/span&gt; (&lt;span class=&quot;cb2&quot;&gt;Exception&lt;/span&gt; ex)&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; lblError.Text = &lt;span class=&quot;cb3&quot;&gt;&quot;File could not be uploaded.&quot;&lt;/span&gt; + ex.Message.ToString();&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; lblError.Visible = &lt;span class=&quot;cb1&quot;&gt;true&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; FileSaved = &lt;span class=&quot;cb1&quot;&gt;false&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;else&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; lblError.Text = &lt;span class=&quot;cb3&quot;&gt;&quot;Cannot accept files of this type.&quot;&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; lblError.Visible = &lt;span class=&quot;cb1&quot;&gt;true&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;if&lt;/span&gt; (FileSaved)&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; pnlUpload.Visible = &lt;span class=&quot;cb1&quot;&gt;false&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; pnlCrop.Visible = &lt;span class=&quot;cb1&quot;&gt;true&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; imgCrop.ImageUrl = &lt;span class=&quot;cb3&quot;&gt;&quot;images/&quot;&lt;/span&gt; + Session[&lt;span class=&quot;cb3&quot;&gt;&quot;WorkingImage&quot;&lt;/span&gt;].ToString();&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
This code should be pretty familiar to anyone who has worked with the
 FileUpload control before. It simply checks to see if a file has been 
submitted, and ensures that it is of the right type. Then it saves the 
file to disk and the name of the file to a Session variable. Once the 
image has been saved, it is set as the ImageUrl of the Image control 
which has been targeted by JCrop and makes the containing Panel visible.&lt;br /&gt;
&lt;br /&gt;
The next section covers the event handler for the Crop button:&lt;br /&gt;
&lt;div class=&quot;cf&quot;&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;span class=&quot;cb1&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;cb1&quot;&gt;void&lt;/span&gt; btnCrop_Click(&lt;span class=&quot;cb1&quot;&gt;object&lt;/span&gt; sender, &lt;span class=&quot;cb2&quot;&gt;EventArgs&lt;/span&gt; e)&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
{&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;string&lt;/span&gt; ImageName = Session[&lt;span class=&quot;cb3&quot;&gt;&quot;WorkingImage&quot;&lt;/span&gt;].ToString();&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;int&lt;/span&gt; w = &lt;span class=&quot;cb2&quot;&gt;Convert&lt;/span&gt;.ToInt32(W.Value);&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;int&lt;/span&gt; h = &lt;span class=&quot;cb2&quot;&gt;Convert&lt;/span&gt;.ToInt32(H.Value);&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;int&lt;/span&gt; x = &lt;span class=&quot;cb2&quot;&gt;Convert&lt;/span&gt;.ToInt32(X.Value);&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;int&lt;/span&gt; y = &lt;span class=&quot;cb2&quot;&gt;Convert&lt;/span&gt;.ToInt32(Y.Value);&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;byte&lt;/span&gt;[] CropImage = Crop(path + ImageName, w, h, x, y);&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;using&lt;/span&gt; (&lt;span class=&quot;cb2&quot;&gt;MemoryStream&lt;/span&gt; ms = &lt;span class=&quot;cb1&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cb2&quot;&gt;MemoryStream&lt;/span&gt;(CropImage, 0, CropImage.Length))&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; ms.Write(CropImage, 0, CropImage.Length);&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; using(SD.&lt;span class=&quot;cb2&quot;&gt;Image&lt;/span&gt; CroppedImage = SD.&lt;span class=&quot;cb2&quot;&gt;Image&lt;/span&gt;.FromStream(ms, &lt;span class=&quot;cb1&quot;&gt;true&lt;/span&gt;))&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;string&lt;/span&gt; SaveTo = path + &lt;span class=&quot;cb3&quot;&gt;&quot;crop&quot;&lt;/span&gt; + ImageName;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; CroppedImage.Save(SaveTo, &lt;span class=&quot;black&quot;&gt;CroppedImage.RawFormat&lt;/span&gt;);&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; pnlCrop.Visible = &lt;span class=&quot;cb1&quot;&gt;false&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; pnlCropped.Visible = &lt;span class=&quot;cb1&quot;&gt;true&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; imgCropped.ImageUrl = &lt;span class=&quot;cb3&quot;&gt;&quot;images/crop&quot;&lt;/span&gt; + ImageName;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
This section references the image name from the Session variable, and
 then declares a number of integers that get their values from the 
HiddenFields that JCrop wrote to when the user selected the area they 
wanted to keep. &lt;br /&gt;
&lt;br /&gt;
It then calls a method called Crop() to perform the actual cropping 
of the image (more of which soon). Crop() returns a byte array, which is
 written to a MemoryStream so that it can be used and converted back to 
an Image. This is then prefixed with the word &quot;crop&quot; in its name before 
being saved to disk and displayed to the user. &lt;br /&gt;
&lt;br /&gt;
The Crop() method is below:&lt;br /&gt;
&lt;div class=&quot;cf&quot;&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;span class=&quot;cb1&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cb1&quot;&gt;byte&lt;/span&gt;[] Crop(&lt;span class=&quot;cb1&quot;&gt;string&lt;/span&gt; Img, &lt;span class=&quot;cb1&quot;&gt;int&lt;/span&gt; Width, &lt;span class=&quot;cb1&quot;&gt;int&lt;/span&gt; Height, &lt;span class=&quot;cb1&quot;&gt;int&lt;/span&gt; X, &lt;span class=&quot;cb1&quot;&gt;int&lt;/span&gt; Y)&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
{&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;try&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;using&lt;/span&gt; (SD.&lt;span class=&quot;cb2&quot;&gt;Image&lt;/span&gt; OriginalImage = SD.&lt;span class=&quot;cb2&quot;&gt;Image&lt;/span&gt;.FromFile(Img))&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;using&lt;/span&gt; (SD.&lt;span class=&quot;cb2&quot;&gt;Bitmap&lt;/span&gt; bmp = &lt;span class=&quot;cb1&quot;&gt;new&lt;/span&gt; SD.&lt;span class=&quot;cb2&quot;&gt;Bitmap&lt;/span&gt;(Width, Height))&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bmp.SetResolution(OriginalImage.HorizontalResolution, OriginalImage.VerticalResolution);&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;using&lt;/span&gt; (SD.&lt;span class=&quot;cb2&quot;&gt;Graphics&lt;/span&gt; Graphic = SD.&lt;span class=&quot;cb2&quot;&gt;Graphics&lt;/span&gt;.FromImage(bmp))&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Graphic.SmoothingMode = &lt;span class=&quot;cb2&quot;&gt;SmoothingMode&lt;/span&gt;.AntiAlias;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Graphic.InterpolationMode = &lt;span class=&quot;cb2&quot;&gt;InterpolationMode&lt;/span&gt;.HighQualityBicubic;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Graphic.PixelOffsetMode = &lt;span class=&quot;cb2&quot;&gt;PixelOffsetMode&lt;/span&gt;.HighQuality;&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Graphic.DrawImage(OriginalImage, &lt;span class=&quot;cb1&quot;&gt;new&lt;/span&gt; SD.&lt;span class=&quot;cb2&quot;&gt;Rectangle&lt;/span&gt;(0, 0, Width, Height), X, Y, Width, Height, SD.&lt;span class=&quot;cb2&quot;&gt;GraphicsUnit&lt;/span&gt;.Pixel);&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb2&quot;&gt;MemoryStream&lt;/span&gt; ms = &lt;span class=&quot;cb1&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cb2&quot;&gt;MemoryStream&lt;/span&gt;();&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bmp.Save(ms, OriginalImage.RawFormat);&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;return&lt;/span&gt; ms.GetBuffer();&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;catch&lt;/span&gt; (&lt;span class=&quot;cb2&quot;&gt;Exception&lt;/span&gt; Ex)&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; {&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;cb1&quot;&gt;throw&lt;/span&gt; (Ex);&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&amp;nbsp; }&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;cl&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
This might at first glance look a little daunting to beginners, but 
most of the code just sets properties that affect the quality and 
appearance of the resulting image. What it does is to simply use the 
original image as a base from which a new image is drawn, and then save 
it to a MemoryStream object, which is returned as a byte array to be 
consumed by the calling code above. You should take note of the using 
blocks that are employed in this method. They ensure that Image, Bitmap 
and Graphics objects are all disposed of when the method is done. 
There&#39;s nothing worse than finding that your busy web app has slowed to a
 crawl through unreleased resources.&lt;br /&gt;
Oh, and thanks go to my cat, Alfie, for kindly agreeing to model for this exercise.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Note-Original Source From :-http://www.mikesdotnetting.com/Article/95/Upload-and-Crop-Images-with-jQuery-JCrop-and-ASP.NET&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/1987285222070915156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/11/upload-and-crop-images-with-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/1987285222070915156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/1987285222070915156'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/11/upload-and-crop-images-with-jquery.html' title='Upload and Crop Images with jQuery, JCrop and ASP.NET'/><author><name>kuntal</name><uri>http://www.blogger.com/profile/12316518319243526859</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2dobHNHzbjP-jIproGhFb_yDj2-P0dy8l12O9fKGsiuVmPXquktABZBXCaV6-F7SvPJnpZNtueWBqYS6zYSiHgB0o9A_-0-Ho0KZcJktQFyrEldcA1kCqgJufKDqaqw/s220/nike-swoosh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-3190623690393623896</id><published>2012-10-04T13:49:00.001-07:00</published><updated>2012-10-04T23:59:23.364-07:00</updated><title type='text'>Re -write url in asp.net</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-large;&quot;&gt;Re -write url in asp.net&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;First Create two hyperlinks in default.aspx page and paste the following&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;-------------------------------------------------------------------------------------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;asp:HyperLink &amp;nbsp;Text=&quot;ASP.net&quot; runat=&quot;server&quot; ID=&quot;link1&quot; NavigateUrl=&quot; &quot;&amp;gt; &amp;lt;/asp:HyperLink&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;asp:HyperLink &amp;nbsp;Text=&quot;PHP&quot; runat=&quot;server&quot; ID=&quot;HyperLink1&quot; NavigateUrl=&quot; &quot;&amp;gt; &amp;lt;/asp:HyperLink&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;Then create a global.asax file and paste the same under &amp;lt;script&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;-------------------------------------------------------------------------------------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;void Application_Start(object sender, EventArgs e)&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RegisterRoutes(System.Web.Routing.RouteTable.Routes);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; public static void RegisterRoutes(System.Web.Routing.RouteCollection routeCollection)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; routeCollection.MapPageRoute(&quot;RouteForCustomer&quot;, &quot;soumen/{training}&quot;, &quot;~/soumen.aspx&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;Now since because you are passing like a value &quot;training&quot; you just need to make the url of same kind , so that the global.asax page can track it.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;Now paste the below code under default.aspx file&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;-------------------------------------------------------------------------------------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;link1.NavigateUrl = &amp;nbsp;Page.GetRouteUrl(&quot;RouteForCustomer&quot;, new { training = &quot;ASP.net&quot;});&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;HyperLink1.NavigateUrl = Page.GetRouteUrl(&quot;RouteForCustomer&quot;, new { training = &quot;PHP&quot; });&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;Now add a page soumen.aspx here i have added one. and paste the underlying lines&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;--------------------------------------------------------------------------------------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;string category = Page.RouteData.Values[&quot;training&quot;] as string;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;lbl.Text = category;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;thats it.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/3190623690393623896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/10/re-write-url-in-asp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/3190623690393623896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/3190623690393623896'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/10/re-write-url-in-asp.html' title='Re -write url in asp.net'/><author><name>Soumen Ghosh</name><uri>http://www.blogger.com/profile/09900045366086828094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-4736182845854737353</id><published>2012-09-19T05:23:00.003-07:00</published><updated>2012-09-19T05:32:58.625-07:00</updated><title type='text'>C# DateTime Format</title><content type='html'>&lt;p&gt;Many &lt;b&gt;DateTime&lt;/b&gt; formats are available. C# programs use the ToString method on the DateTime type. ToString receives many useful formats. These formats have confusing syntax forms. Correct formatting of dates and times is essential to many programs.&lt;/p&gt;&lt;h2&gt;Format string&lt;/h2&gt;&lt;p&gt;To start, we see an example of how you can use a specific formatting string with DateTime and ToString to obtain a special DateTime string. This is useful when interacting with other systems, or when you require a precise format.&lt;/p&gt;&lt;pre&gt;&lt;b&gt;Program that uses DateTime format [C#]&lt;/b&gt;  using System;  class Program&lt;br /&gt;{static void Main()   &lt;br /&gt;{  DateTime time = DateTime.Now;&lt;i&gt;// Use current time&lt;/i&gt;&lt;br /&gt;string format = &quot;MMM ddd d HH:mm yyyy&quot;;    &lt;i&gt;// Use this format&lt;/i&gt;&lt;br /&gt;Console.WriteLine(time.ToString(format));  &lt;i&gt;// Write to console&lt;/i&gt;     } }&lt;br /&gt;&lt;b&gt;Output&lt;/b&gt;  Feb Fri 27 11:41 2009  &lt;b&gt;Format string pattern&lt;/b&gt;  MMM   &lt;br /&gt;three-letter month ddd     display three-letter day of the WEEK d    &lt;br /&gt;display day of the MONTH HH      display two-digit hours on 24-hour scale mm   &lt;br /&gt;display two-digit minutes yyyy    display four-digit year&lt;/pre&gt;&lt;p id=&quot;y&quot;&gt;&lt;b id=&quot;e&quot;&gt;Note:&lt;/b&gt; The letters in the format string above specify the output you want to display. The final comment shows what the MMM, ddd, d, HH, mm, and yyyy will do.&lt;/p&gt;&lt;h2&gt;Modify format&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;Continuing on, we see how you can modify the DateTime format string in the above example to get different output with ToString. We change some of the fields so the resulting value is shorter.&lt;/p&gt;&lt;pre&gt;&lt;b&gt;Program that uses different format [C#]&lt;/b&gt;&lt;br /&gt;using System;&lt;br /&gt;class Program {static void Main()  &lt;br /&gt;{  DateTime time = DateTime.Now; &lt;i&gt;// Use current time&lt;/i&gt;  string format = &quot;M d h:mm yy&quot;;&lt;br /&gt;          &lt;i&gt;// Use this format&lt;/i&gt;  Console.WriteLine(time.ToString(format)); &lt;i&gt;// Write to console&lt;/i&gt;     } } &lt;br /&gt;&lt;b&gt;Output&lt;/b&gt;  2 27 11:48 09  &lt;b&gt;Format string pattern&lt;/b&gt;  M       display one-digit month number        &lt;br /&gt;[changed] d       display one-digit day of the MONTH      [changed] h     &lt;br /&gt;display one-digit hour on 12-hour scale [changed] mm    &lt;br /&gt;display two-digit minutes yy      display two-digit year       &lt;br /&gt;         [changed]&lt;/pre&gt;&lt;p&gt;&lt;b&gt;Format string usages.&lt;/b&gt; You will also need to specify a format string when using DateTime.ParseExact and DateTime.ParseExact. This is because those methods require a custom pattern to parse.&lt;/p&gt;&lt;h2&gt;&lt;br /&gt;&lt;/h2&gt;&lt;br /&gt;&lt;p&gt;Next you can use a single character with ToString or DateTime.ParseExact to specify a preset format available in the framework. These are standard formats and useful in many programs. They can eliminate typos in the custom format strings.&lt;/p&gt;&lt;pre&gt;&lt;b&gt;Program that tests formats [C#]&lt;/b&gt;&lt;br /&gt;using System;&lt;br /&gt;class Program {  &lt;br /&gt;static void Main()  &lt;br /&gt;{  DateTime now = DateTime.Now;&lt;br /&gt;Console.WriteLine(now.ToString(&quot;d&quot;));&lt;br /&gt;Console.WriteLine(now.ToString(&quot;D&quot;));&lt;br /&gt;Console.WriteLine(now.ToString(&quot;f&quot;));&lt;br /&gt;Console.WriteLine(now.ToString(&quot;F&quot;));&lt;br /&gt;Console.WriteLine(now.ToString(&quot;g&quot;));&lt;br /&gt;Console.WriteLine(now.ToString(&quot;G&quot;));&lt;br /&gt;Console.WriteLine(now.ToString(&quot;m&quot;));&lt;br /&gt;Console.WriteLine(now.ToString(&quot;M&quot;));&lt;br /&gt;Console.WriteLine(now.ToString(&quot;o&quot;));&lt;br /&gt;Console.WriteLine(now.ToString(&quot;O&quot;));&lt;br /&gt;Console.WriteLine(now.ToString(&quot;s&quot;));&lt;br /&gt;Console.WriteLine(now.ToString(&quot;t&quot;));&lt;br /&gt;Console.WriteLine(now.ToString(&quot;T&quot;));&lt;br /&gt;Console.WriteLine(now.ToString(&quot;u&quot;));&lt;br /&gt;Console.WriteLine(now.ToString(&quot;U&quot;));&lt;br /&gt;Console.WriteLine(now.ToString(&quot;y&quot;));&lt;br /&gt;Console.WriteLine(now.ToString(&quot;Y&quot;));} }  &lt;b&gt;&lt;br /&gt;Output&lt;/b&gt;  d    2/27/2009 D &lt;br /&gt;Friday, February 27, 2009 f &lt;br /&gt;Friday, February 27, 2009 12:11 PM F &lt;br /&gt;Friday, February 27, 2009 12:12:22 PM g &lt;br /&gt;2/27/2009 12:12 PM G    2/27/2009 12:12:22 PM m&lt;br /&gt;February 27 M    February 27 o    2009-02-27T12:12:22.1020000-08:00 O&lt;br /&gt;2009-02-27T12:12:22.1020000-08:00 s    2009-02-27T12:12:22 t&lt;br /&gt;12:12 PM T    12:12:22 PM u    2009-02-27 12:12:22Z U&lt;br /&gt;Friday, February 27, 2009 8:12:22 PM y    February, 2009 Y    February, 2009&lt;/pre&gt;&lt;h2&gt;Date strings&lt;/h2&gt;&lt;p&gt;Here we see the ToLongDateString, ToLongTimeString, ToShortDateString, and ToShortTimeString methods on DateTime. These methods are equivalent to the lowercase and uppercase D and T methods shown in the example above.&lt;/p&gt;&lt;pre&gt;&lt;b&gt;Program that uses ToString methods [C#]&lt;/b&gt;&lt;br /&gt;using System;  class Progra{ static void Main() &lt;br /&gt;{  DateTime now = DateTime.Now;  Console.WriteLine(now.ToLongDateString());&lt;br /&gt;&lt;i&gt;// Equivalent to D&lt;/i&gt;  Console.WriteLine(now.ToLongTimeString());&lt;br /&gt;&lt;i&gt;// Equivalent to T&lt;/i&gt;  Console.WriteLine(now.ToShortDateString());&lt;br /&gt;&lt;i&gt;// Equivalent to d&lt;/i&gt;  Console.WriteLine(now.ToShortTimeString()); &lt;i&gt;&lt;br /&gt;// Equivalent to t&lt;/i&gt;  Console.WriteLine(now.ToString()); } }&lt;br /&gt;&lt;b&gt;Output&lt;/b&gt;  ToLongDateString &lt;br /&gt;Friday, February 27, 2009 ToLongTimeString  &lt;br /&gt;12:16:59 PM ToShortDateString    2/27/2009 ToShortTimeString&lt;br /&gt;12:16 PM ToString             2/27/2009 12:16:59 PM&lt;br /&gt;&lt;br /&gt;SOURCE-http://www.dotnetperls.com/datetime-format&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/4736182845854737353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/09/c-datetime-format.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/4736182845854737353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/4736182845854737353'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/09/c-datetime-format.html' title='C# DateTime Format'/><author><name>kuntal</name><uri>http://www.blogger.com/profile/12316518319243526859</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2dobHNHzbjP-jIproGhFb_yDj2-P0dy8l12O9fKGsiuVmPXquktABZBXCaV6-F7SvPJnpZNtueWBqYS6zYSiHgB0o9A_-0-Ho0KZcJktQFyrEldcA1kCqgJufKDqaqw/s220/nike-swoosh.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-2485041434013117065</id><published>2012-09-11T04:29:00.001-07:00</published><updated>2012-09-11T04:31:50.662-07:00</updated><title type='text'>Add fck editor in php</title><content type='html'>&lt;div&gt;include &quot;fckeditor/fckeditor.php&quot;; //Top of the page&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;where you need the edior&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;!--?php&lt;/div--&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;        &lt;/span&gt;$FCKeditor = new FCKeditor(&#39;FCKeditor1&#39;);&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;        &lt;/span&gt;$FCKeditor-&amp;gt;BasePath = &#39;fckeditor/&#39;;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;        &lt;/span&gt;$FCKeditor-&amp;gt;Value = $content;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;        &lt;/span&gt;$FCKeditor-&amp;gt;Height = &#39;400px&#39;;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;        &lt;/span&gt;$FCKeditor-&amp;gt;Create();&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;                        ?&amp;gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/2485041434013117065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/09/add-fck-editor-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/2485041434013117065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/2485041434013117065'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/09/add-fck-editor-in-php.html' title='Add fck editor in php'/><author><name>kuntal</name><uri>http://www.blogger.com/profile/12316518319243526859</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2dobHNHzbjP-jIproGhFb_yDj2-P0dy8l12O9fKGsiuVmPXquktABZBXCaV6-F7SvPJnpZNtueWBqYS6zYSiHgB0o9A_-0-Ho0KZcJktQFyrEldcA1kCqgJufKDqaqw/s220/nike-swoosh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-7097197873965860472</id><published>2012-09-10T09:31:00.002-07:00</published><updated>2012-09-10T09:31:28.473-07:00</updated><title type='text'></title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;To find the second highest salary from a table&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;select top 1 name,id from tbltest where name not in (select top 1 name from tbltest order by name desc) order by name desc&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Same if you want to select the nth highest salary from a table&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;select top 1 name,id from tbltest where name not in (select top n name from tbltest order by name desc) order by name desc&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/7097197873965860472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/09/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/7097197873965860472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/7097197873965860472'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/09/blog-post.html' title=''/><author><name>Soumen Ghosh</name><uri>http://www.blogger.com/profile/09900045366086828094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-3649714365001191736</id><published>2012-08-30T08:36:00.004-07:00</published><updated>2012-08-30T08:36:50.020-07:00</updated><title type='text'>Convert number into words in SQL server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: large;&quot;&gt;&lt;b&gt;Create a function named InWords&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;CREATE FUNCTION &amp;nbsp;[dbo].[InWords] (@intNumberValue bigint) &lt;br /&gt;RETURNS VARCHAR(2000)&lt;br /&gt;AS &lt;br /&gt;BEGIN&lt;br /&gt;&amp;nbsp; DECLARE @strNumberString VARCHAR(9)&lt;br /&gt;&amp;nbsp; DECLARE @strReturn VARCHAR(2000)&lt;br /&gt;&amp;nbsp; DECLARE @intUnits SMALLINT&lt;br /&gt;&amp;nbsp; -- Create table of number groups &lt;br /&gt;&amp;nbsp; DECLARE @tblNumberGroups TABLE (Units SMALLINT, Hundreds SMALLINT, Tens SMALLINT)&lt;br /&gt;&amp;nbsp; &amp;nbsp;-- Handle errors and &#39;quick wins&#39;&lt;br /&gt;&amp;nbsp; IF @intNumberValue IS NULL RETURN NULL&lt;br /&gt;&amp;nbsp; IF ISNUMERIC(@intNumberValue)=0 RETURN NULL&lt;br /&gt;&amp;nbsp; IF @intNumberValue = 0 RETURN &#39;ZERO&#39; &lt;br /&gt;&amp;nbsp; IF @intNumberValue &amp;lt; 0&lt;br /&gt;&amp;nbsp; BEGIN&lt;br /&gt;&amp;nbsp; &amp;nbsp; SET @strReturn=&#39;MINUS &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; SET @intNumberValue=ABS(@intNumberValue)&lt;br /&gt;&amp;nbsp; END&lt;br /&gt;&amp;nbsp; SET @intUnits =0&lt;br /&gt;&amp;nbsp; -- Populate table of number groups &lt;br /&gt;&amp;nbsp; WHILE (@intNumberValue % 1000) &amp;gt; 0 OR &amp;nbsp;(@intNumberValue/1000) &amp;gt;0&lt;br /&gt;&amp;nbsp; BEGIN&lt;br /&gt;&amp;nbsp; &amp;nbsp; INSERT INTO @tblNumberGroups (Units, Hundreds, Tens) VALUES (@intUnits, (@intNumberValue % 1000)/100, (@intNumberValue % 1000) % 100 )&lt;br /&gt;&amp;nbsp; &amp;nbsp; SELECT @intNumberValue = CAST (@intNumberValue / 1000 AS INTEGER)&lt;br /&gt;&amp;nbsp; &amp;nbsp; SET @intUnits = @intUnits + 1&lt;br /&gt;&amp;nbsp; END&lt;br /&gt;&amp;nbsp; -- Remove last unit added&lt;br /&gt;&amp;nbsp; SET @intUnits = @intUnits-1 &lt;br /&gt;&amp;nbsp; -- Concatenate text number by reading number groups in reverse order&lt;br /&gt;&amp;nbsp; SELECT @strReturn = ISNULL(@strReturn,&#39; &#39;) +&lt;br /&gt;&amp;nbsp; ISNULL(&lt;br /&gt;&amp;nbsp; ISNULL((CASE Hundreds&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 1 THEN &#39;ONE HUNDRED &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 2 THEN &#39;TWO HUNDRED &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 3 THEN &#39;THREE HUNDRED &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 4 THEN &#39;FOUR HUNDRED &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 5 THEN &#39;FIVE HUNDRED &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 6 THEN &#39;SIX HUNDRED &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 7 THEN &#39;SEVEN HUNDRED &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 8 THEN &#39;EIGHT HUNDRED &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 9 THEN &#39;NINE HUNDRED &#39;&lt;br /&gt;&amp;nbsp; END),&#39; &#39;) +&lt;br /&gt;&amp;nbsp; CASE WHEN (Hundreds &amp;gt;0 OR Units&amp;lt;@intUnits) AND Tens &amp;gt; 0 &amp;nbsp; THEN &#39; AND &#39; ELSE &#39; &#39; END +&lt;br /&gt;&amp;nbsp; ISNULL((CASE Tens / 10&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 2 THEN &#39;TWENTY &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 3 THEN &#39;THIRTY &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 4 THEN &#39;FORTY &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 5 THEN &#39;FIFTY &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 6 THEN &#39;SIXTY &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 7 THEN &#39;SEVENTY &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 8 THEN &#39;EIGHTY &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 9 THEN &#39;NINETY &#39;&lt;br /&gt;&amp;nbsp; END),&#39; &#39;) +&lt;br /&gt;&amp;nbsp; ISNULL((CASE Tens&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 10 THEN &#39;TEN &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 11 THEN &#39;ELEVEN &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 12 THEN &#39;TWELVE &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 13 THEN &#39;THIRTEEN &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 14 THEN &#39;FOURTEEN &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 15 THEN &#39;FIFTEEN &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 16 THEN &#39;SIXTEEN &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 17 THEN &#39;SEVENTEEN &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 18 THEN &#39;EIGHTEEN &#39;&lt;br /&gt;&amp;nbsp; &amp;nbsp; WHEN 19 THEN &#39;NINETEEN &#39;&lt;br /&gt;&amp;nbsp; END),&#39; &#39;) +&lt;br /&gt;&amp;nbsp; COALESCE(&lt;br /&gt;&amp;nbsp; &amp;nbsp; CASE WHEN Tens %10 =1 AND Tens / 10 &amp;nbsp;&amp;lt;&amp;gt; 1 THEN &#39;ONE &#39; END,&lt;br /&gt;&amp;nbsp; &amp;nbsp; CASE WHEN Tens %10 =2 AND Tens / 10 &amp;nbsp;&amp;lt;&amp;gt; 1 THEN &#39;TWO &#39; END,&lt;br /&gt;&amp;nbsp; CASE WHEN Tens %10 =3 AND Tens / 10 &amp;nbsp;&amp;lt;&amp;gt; 1 THEN &#39;THREE &#39; END,&lt;br /&gt;&amp;nbsp; CASE WHEN Tens %10 =4 AND Tens / 10 &amp;nbsp;&amp;lt;&amp;gt; 1 THEN &#39;FOUR &#39; END,&lt;br /&gt;&amp;nbsp; &amp;nbsp; CASE WHEN Tens %10 =5 AND Tens / 10 &amp;nbsp;&amp;lt;&amp;gt; 1 THEN &#39;FIVE &#39; END,&lt;br /&gt;&amp;nbsp; &amp;nbsp; CASE WHEN Tens %10 =6 AND Tens / 10 &amp;nbsp;&amp;lt;&amp;gt; 1 THEN &#39;SIX &#39; END,&lt;br /&gt;&amp;nbsp; &amp;nbsp; CASE WHEN Tens %10 =7 AND Tens / 10 &amp;nbsp;&amp;lt;&amp;gt; 1 THEN &#39;SEVEN &#39; END,&lt;br /&gt;&amp;nbsp; &amp;nbsp; CASE WHEN Tens %10 =8 AND Tens / 10 &amp;nbsp;&amp;lt;&amp;gt; 1 THEN &#39;EIGHT &#39; END,&lt;br /&gt;&amp;nbsp; &amp;nbsp; CASE WHEN Tens %10 =9 AND Tens / 10 &amp;nbsp;&amp;lt;&amp;gt; 1 THEN &#39;NINE &#39; END,&lt;br /&gt;&amp;nbsp; &#39; &#39;)+&lt;br /&gt;&amp;nbsp; COALESCE(&lt;br /&gt;&amp;nbsp; &amp;nbsp;CASE WHEN Units=1 AND (Hundreds&amp;gt;0 OR Tens&amp;gt;0) THEN &#39;THOUSAND &#39; END,&lt;br /&gt;&amp;nbsp; &amp;nbsp; CASE WHEN Units=2 AND (Hundreds&amp;gt;0 OR Tens&amp;gt;0) THEN &#39;MILLION &#39; END,&lt;br /&gt;&amp;nbsp; &amp;nbsp;CASE WHEN Units=3 AND (Hundreds&amp;gt;0 OR Tens&amp;gt;0) THEN &#39;BILLION &#39; END,&lt;br /&gt;&amp;nbsp; &amp;nbsp;CASE WHEN Units=4 AND (Hundreds&amp;gt;0 OR Tens&amp;gt;0) THEN &#39;TRILLION &#39; END,&lt;br /&gt;&amp;nbsp; &#39; &#39;)&lt;br /&gt;&amp;nbsp; &amp;nbsp;,&#39; &#39;)&lt;br /&gt;&amp;nbsp; FROM @tblNumberGroups&lt;br /&gt;&amp;nbsp; ORDER BY units DESC&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp; -- Get rid of all the spaces&lt;br /&gt;&amp;nbsp; WHILE CHARINDEX(&#39; &amp;nbsp;&#39;, @strReturn)&amp;gt;0&lt;br /&gt;&amp;nbsp; &amp;nbsp;BEGIN&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; SET @strReturn = REPLACE(@strReturn,&#39; &amp;nbsp;&#39;,&#39; &#39;)&lt;br /&gt;&amp;nbsp; &amp;nbsp;END&lt;br /&gt;&amp;nbsp; SET @strReturn = LTRIM(RTRIM(@strReturn))&lt;br /&gt;&amp;nbsp; RETURN @strReturn&lt;br /&gt;END&lt;br /&gt;GO&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Now execute the query to call the function with the given parameters and get the result&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;select &amp;nbsp;dbo.InWords(-234973555459)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;---------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;MINUS TWO HUNDRED AND THIRTY FOUR BILLION NINE HUNDRED AND SEVENTY THREE MILLION FIVE HUNDRED AND FIFTY FIVE THOUSAND FOUR HUNDRED AND FIFTY NINE&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;For more you can visit&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://stackoverflow.com/questions/4245330/sql-query-for-retrieving-numeric-value-and-printing-as-words&quot;&gt;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;http://stackoverflow.com/questions/4245330/sql-query-for-retrieving-numeric-value-and-printing-as-words&lt;/span&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/3649714365001191736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/08/convert-number-into-words-in-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/3649714365001191736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/3649714365001191736'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/08/convert-number-into-words-in-sql-server.html' title='Convert number into words in SQL server'/><author><name>Soumen Ghosh</name><uri>http://www.blogger.com/profile/09900045366086828094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-2119099503612304607</id><published>2012-08-29T23:25:00.000-07:00</published><updated>2012-08-29T23:26:43.661-07:00</updated><title type='text'>Convert Numeric value in words in PHP</title><content type='html'>function convert_number($number)&lt;br /&gt;{&lt;br /&gt;    if (($number &amp;lt; 0) || ($number &amp;gt; 999999999))&lt;br /&gt;    {&lt;br /&gt;    throw new Exception(&quot;Number is out of range&quot;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    $Gn = floor($number / 1000000);  /* Millions (giga) */&lt;br /&gt;    $number -= $Gn * 1000000;&lt;br /&gt;    $kn = floor($number / 1000);     /* Thousands (kilo) */&lt;br /&gt;    $number -= $kn * 1000;&lt;br /&gt;    $Hn = floor($number / 100);      /* Hundreds (hecto) */&lt;br /&gt;    $number -= $Hn * 100;&lt;br /&gt;    $Dn = floor($number / 10);       /* Tens (deca) */&lt;br /&gt;    $n = $number % 10;               /* Ones */&lt;br /&gt;&lt;br /&gt;    $res = &quot;&quot;;&lt;br /&gt;&lt;br /&gt;    if ($Gn)&lt;br /&gt;    {&lt;br /&gt;        $res .= convert_number($Gn) . &quot; Million&quot;;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    if ($kn)&lt;br /&gt;    {&lt;br /&gt;        $res .= (empty($res) ? &quot;&quot; : &quot; &quot;) .&lt;br /&gt;            convert_number($kn) . &quot; Thousand&quot;;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    if ($Hn)&lt;br /&gt;    {&lt;br /&gt;        $res .= (empty($res) ? &quot;&quot; : &quot; &quot;) .&lt;br /&gt;            convert_number($Hn) . &quot; Hundred&quot;;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    $ones = array(&quot;&quot;, &quot;One&quot;, &quot;Two&quot;, &quot;Three&quot;, &quot;Four&quot;, &quot;Five&quot;, &quot;Six&quot;,&lt;br /&gt;        &quot;Seven&quot;, &quot;Eight&quot;, &quot;Nine&quot;, &quot;Ten&quot;, &quot;Eleven&quot;, &quot;Twelve&quot;, &quot;Thirteen&quot;,&lt;br /&gt;        &quot;Fourteen&quot;, &quot;Fifteen&quot;, &quot;Sixteen&quot;, &quot;Seventeen&quot;, &quot;Eightteen&quot;,&lt;br /&gt;        &quot;Nineteen&quot;);&lt;br /&gt;    $tens = array(&quot;&quot;, &quot;&quot;, &quot;Twenty&quot;, &quot;Thirty&quot;, &quot;Fourty&quot;, &quot;Fifty&quot;, &quot;Sixty&quot;,&lt;br /&gt;        &quot;Seventy&quot;, &quot;Eigthy&quot;, &quot;Ninety&quot;);&lt;br /&gt;&lt;br /&gt;    if ($Dn || $n)&lt;br /&gt;    {&lt;br /&gt;        if (!empty($res))&lt;br /&gt;        {&lt;br /&gt;            $res .= &quot; and &quot;;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        if ($Dn &amp;lt; 2)&lt;br /&gt;        {&lt;br /&gt;            $res .= $ones[$Dn * 10 + $n];&lt;br /&gt;        }&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;            $res .= $tens[$Dn];&lt;br /&gt;&lt;br /&gt;            if ($n)&lt;br /&gt;            {&lt;br /&gt;                $res .= &quot;-&quot; . $ones[$n];&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    if (empty($res))&lt;br /&gt;    {&lt;br /&gt;        $res = &quot;zero&quot;;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    return $res;&lt;br /&gt;}&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/2119099503612304607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/08/convert-numeric-value-in-words-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/2119099503612304607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/2119099503612304607'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/08/convert-numeric-value-in-words-in-php.html' title='Convert Numeric value in words in PHP'/><author><name>kuntal</name><uri>http://www.blogger.com/profile/12316518319243526859</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2dobHNHzbjP-jIproGhFb_yDj2-P0dy8l12O9fKGsiuVmPXquktABZBXCaV6-F7SvPJnpZNtueWBqYS6zYSiHgB0o9A_-0-Ho0KZcJktQFyrEldcA1kCqgJufKDqaqw/s220/nike-swoosh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-108501007495139030</id><published>2012-08-29T08:52:00.000-07:00</published><updated>2012-08-29T08:53:10.473-07:00</updated><title type='text'>Get Query string values from Javascript</title><content type='html'> function QuseryStringValue(QID) {&lt;br /&gt;&lt;br /&gt;            // Fetch the query string.&lt;br /&gt;            var QStringOriginal = window.location.search.substring(1);&lt;br /&gt;&lt;br /&gt;            // Change the case as querystring id values normally case insensitive.&lt;br /&gt;            QString = QStringOriginal.toLowerCase();&lt;br /&gt;            var qsValue = &#39;&#39;;&lt;br /&gt;&lt;br /&gt;            // QueryString ID.&lt;br /&gt;            QID = QID.toLowerCase();&lt;br /&gt;            // Start &amp;amp; end point of the QueryString Value.&lt;br /&gt;            var qsStartPoint = QString.indexOf(QID);&lt;br /&gt;            if (qsStartPoint != -1) {&lt;br /&gt;&lt;br /&gt;                qsValue = QStringOriginal.substring(qsStartPoint + QID.length + 1);&lt;br /&gt;                // Search for &#39;&amp;amp;&#39; in the query string;&lt;br /&gt;                var qsEndPoint = qsValue.indexOf(&#39;&amp;amp;&#39;);&lt;br /&gt;                if (qsEndPoint != -1) {&lt;br /&gt;&lt;br /&gt;                    // retrive the QueryString value &amp;amp; Return it.&lt;br /&gt;                    qsValue = qsValue.substring(0, qsEndPoint);&lt;br /&gt;&lt;br /&gt;                }&lt;br /&gt;                else if (qsValue.indexOf(&#39;#&#39;) != -1) {&lt;br /&gt;&lt;br /&gt;                    // Search for &#39;#&#39; in the query string;&lt;br /&gt;                    qsEndPoint = qsValue.indexOf(&#39;&amp;amp;&#39;);&lt;br /&gt;                    // retrive the QueryString value &amp;amp; Return it.&lt;br /&gt;                    qsValue = qsValue.substring(0, qsEndPoint);&lt;br /&gt;&lt;br /&gt;                }&lt;br /&gt;                else {&lt;br /&gt;&lt;br /&gt;                    qsValue = qsValue.substring(0);&lt;br /&gt;&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            return qsValue;&lt;br /&gt;        }&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/108501007495139030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/08/get-query-string-values-from-javascript.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/108501007495139030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/108501007495139030'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/08/get-query-string-values-from-javascript.html' title='Get Query string values from Javascript'/><author><name>kuntal</name><uri>http://www.blogger.com/profile/12316518319243526859</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2dobHNHzbjP-jIproGhFb_yDj2-P0dy8l12O9fKGsiuVmPXquktABZBXCaV6-F7SvPJnpZNtueWBqYS6zYSiHgB0o9A_-0-Ho0KZcJktQFyrEldcA1kCqgJufKDqaqw/s220/nike-swoosh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-1907919219637444901</id><published>2012-08-18T12:25:00.001-07:00</published><updated>2012-08-18T12:25:39.271-07:00</updated><title type='text'></title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
If your are having a problem with &quot;DbContext&quot; class in Entity coding.&lt;br /&gt;
Please download the dll from&amp;nbsp;&lt;a href=&quot;http://packages.nuget.org/v1/package/download/entityframework/4.3.0&quot; style=&quot;background-color: white; border: none; color: #0066dd; cursor: pointer; font-family: inherit; font-size: 13px; font-style: inherit; line-height: 16px; list-style-type: none; margin: 0px; outline: 0px; padding: 0px; text-decoration: none;&quot;&gt;http://packages.nuget.org/v1/package/download/entityframework/4.3.0&lt;/a&gt;&lt;br /&gt;
and remane&amp;nbsp;&lt;span style=&quot;background-color: white; color: #333333; font-family: inherit; font-size: 13px; font-style: inherit; line-height: 16px;&quot;&gt;&amp;nbsp;&quot;EntityFramework.4.3.0.nupkg&quot; to &quot;EntityFramework.4.3.0.nupkg.rar&quot;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 16px;&quot;&gt;Add the dll reference into your project and go on .&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #333333; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 16px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;color: #333333; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 16px;&quot;&gt;thanks&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/1907919219637444901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/08/if-your-are-having-problem-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/1907919219637444901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/1907919219637444901'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/08/if-your-are-having-problem-with.html' title=''/><author><name>Soumen Ghosh</name><uri>http://www.blogger.com/profile/09900045366086828094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-7018976631013515789</id><published>2012-05-10T04:03:00.000-07:00</published><updated>2012-05-10T04:03:57.737-07:00</updated><title type='text'>add ToolStripMenuItem in ContextMenuStrip</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;Dim n As New NotifyIcon&lt;br /&gt;
&amp;nbsp; Dim icon1 As New Icon(&quot;1.ico&quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n.Icon = icon1&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n.Visible = True&lt;br /&gt;
&lt;br /&gt;
Private Sub DisplayContextMenus()&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim _ContextMenu As New ContextMenuStrip, cMenuMod As New ToolStripMenuItem, cMenuSubMod As New ToolStripMenuItem, MenuForm As New ToolStripMenuItem&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim dtModule As New DataTable&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim dtSubModule As New DataTable&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim dtForm As New DataTable&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;Addition of User Privilege Menus&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dtModule = _CDALMenu.Dotask(&quot;GET_MODULE_BY_USER_ID&quot;, 0, 0, modgrocery.iUserid, &quot;&quot;, 0)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For i As Integer = 0 To dtModule.Rows.Count - 1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cMenuMod = New ToolStripMenuItem&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; With cMenuMod&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Text = &quot;&amp;amp;&quot; &amp;amp; dtModule.Rows(i)(&quot;mod_name&quot;).ToString&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Name = dtModule.Rows(i)(&quot;mod_name&quot;).ToString&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End With&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;Addition of User Privilege SubMenus&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dtSubModule = _CDALMenu.Dotask(&quot;GET_SUBMODULE_BY_MODID_USER_ID&quot;, dtModule.Rows(i)(&quot;mod_id&quot;).ToString, 0, modgrocery.iUserid, &quot;&quot;, 0)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For j As Integer = 0 To dtSubModule.Rows.Count - 1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cMenuSubMod = New ToolStripMenuItem&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; With cMenuSubMod&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Text = &quot;&amp;amp;&quot; &amp;amp; dtSubModule(j)(&quot;smd_name&quot;).ToString&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Name = dtSubModule(j)(&quot;smd_name&quot;).ToString&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End With&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dtForm = _CDALMenu.Dotask(&quot;GET_FORM_BY_SUBMODID_USER_ID&quot;, 0, dtSubModule.Rows(j)(&quot;smd_id&quot;).ToString, modgrocery.iUserid, &quot;&quot;, 0)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For k As Integer = 0 To dtForm.Rows.Count - 1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MenuForm = New ToolStripMenuItem&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; With MenuForm&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Text = &quot;&amp;amp;&quot; &amp;amp; dtForm(k)(&quot;frm_name&quot;).ToString&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Name = dtForm(k)(&quot;frm_name&quot;).ToString&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End With&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39; cMenuSubMod.DropDownItems.Add(MenuForm.ToString, Nothing, New System.EventHandler(AddressOf SelectedChildMenu_OnClick))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39; cMenuSubMod.Items.Add(MenuForm)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cMenuSubMod.DropDownItems.Add(MenuForm.ToString, Nothing, New System.EventHandler(AddressOf SelectedChildMenu_OnClick))&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cMenuMod.DropDownItems.Add(cMenuSubMod)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;cMenuSubMod.MenuItems.Add(MenuForm)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;cMenuMod.i.Add(cMenuSubMod)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;_ContextMenu.MenuItems.Add(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _ContextMenu.Items.Add(cMenuSubMod)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39; _ContextMe&#39;nu.Items.Add(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n.ContextMenuStrip = _ContextMenu&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/7018976631013515789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/05/add-toolstripmenuitem-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/7018976631013515789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/7018976631013515789'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/05/add-toolstripmenuitem-in.html' title='add ToolStripMenuItem in ContextMenuStrip'/><author><name>kuntal</name><uri>http://www.blogger.com/profile/12316518319243526859</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2dobHNHzbjP-jIproGhFb_yDj2-P0dy8l12O9fKGsiuVmPXquktABZBXCaV6-F7SvPJnpZNtueWBqYS6zYSiHgB0o9A_-0-Ho0KZcJktQFyrEldcA1kCqgJufKDqaqw/s220/nike-swoosh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-2055922258405847479</id><published>2012-05-06T21:59:00.001-07:00</published><updated>2012-05-06T21:59:31.489-07:00</updated><title type='text'>Extract from zip file in PHP</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;lt;?php&lt;br /&gt;$zip = new ZipArchive;&lt;br /&gt;$res = $zip-&amp;gt;open(&#39;test.zip&#39;);&lt;br /&gt;if ($res === TRUE) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &#39;ok&#39;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $zip-&amp;gt;extractTo(&#39;ex&#39;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $zip-&amp;gt;close();&lt;br /&gt;} else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo &#39;failed, code:&#39; . $res;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/2055922258405847479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/05/extract-from-zip-file-in-php.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/2055922258405847479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/2055922258405847479'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/05/extract-from-zip-file-in-php.html' title='Extract from zip file in PHP'/><author><name>kuntal</name><uri>http://www.blogger.com/profile/12316518319243526859</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2dobHNHzbjP-jIproGhFb_yDj2-P0dy8l12O9fKGsiuVmPXquktABZBXCaV6-F7SvPJnpZNtueWBqYS6zYSiHgB0o9A_-0-Ho0KZcJktQFyrEldcA1kCqgJufKDqaqw/s220/nike-swoosh.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-454641080655431206</id><published>2012-04-15T06:58:00.003-07:00</published><updated>2012-08-29T23:29:54.357-07:00</updated><title type='text'>GET ALL CONTROL INSIDE FORM  AND SET CONTROLS PROPERTY</title><content type='html'>Public Shared Function GetControls(ByVal form As Control) As List(Of Control)&lt;br /&gt;       Dim controlList = New List(Of Control)()&lt;br /&gt;       For Each childControl As Control In form.Controls&lt;br /&gt;           &#39; Recurse child controls.&lt;br /&gt;           controlList.AddRange(GetControls(childControl))&lt;br /&gt;           controlList.Add(childControl)&lt;br /&gt;       Next&lt;br /&gt;       Return controlList&lt;br /&gt;   End Function&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Private Sub SetControls(ByVal _controls As List(Of Control), ByRef dtControrName As DataTable)&lt;br /&gt;       Dim cControl As Control&lt;br /&gt;&lt;br /&gt;       For Each cControl In _controls&lt;br /&gt;           If (TypeOf cControl Is Button) Then&lt;br /&gt;&lt;br /&gt;               For i As Integer = 0 To dtControrName.Rows.Count - 1&lt;br /&gt;&lt;br /&gt;                   If (cControl.Name = dtControrName.Rows(i)(0).ToString) Then&lt;br /&gt;                       cControl.Enabled = True&lt;br /&gt;                       Exit For&lt;br /&gt;                   Else&lt;br /&gt;                       cControl.Enabled = False&lt;br /&gt;                   End If&lt;br /&gt;               Next&lt;br /&gt;           End If&lt;br /&gt;&lt;br /&gt;       Next cControl&lt;br /&gt;   End Sub&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Dim controlList = New List(Of Control)()&lt;br /&gt;       controlList = GetControls(_form)//Parametar formname&lt;br /&gt;       SetControls(controlList, dtGET_FORM_PERMISSION)</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/454641080655431206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/04/get-all-contron-inside-form-and-set.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/454641080655431206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/454641080655431206'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/04/get-all-contron-inside-form-and-set.html' title='GET ALL CONTROL INSIDE FORM  AND SET CONTROLS PROPERTY'/><author><name>kuntal</name><uri>http://www.blogger.com/profile/12316518319243526859</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2dobHNHzbjP-jIproGhFb_yDj2-P0dy8l12O9fKGsiuVmPXquktABZBXCaV6-F7SvPJnpZNtueWBqYS6zYSiHgB0o9A_-0-Ho0KZcJktQFyrEldcA1kCqgJufKDqaqw/s220/nike-swoosh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-7311005505727116694</id><published>2012-04-13T06:27:00.002-07:00</published><updated>2012-04-13T06:31:24.900-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css change in html"/><category scheme="http://www.blogger.com/atom/ns#" term="Synamic css chnage"/><title type='text'>Dynamic css file change</title><content type='html'>1.  Create a html file &lt;br /&gt;&lt;br /&gt;and put the codes&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;html&gt;&lt;br /&gt;&lt;head&gt;&lt;br /&gt;&lt;meta charset=&quot;utf-8&quot; /&gt;&lt;br /&gt;&lt;title&gt;Dynamic css file changing&lt;/title&gt;&lt;br /&gt;&lt;link href=&quot;style1.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; id=&quot;stl1&quot; /&gt;&lt;br /&gt;&lt;link href=&quot;style2.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; id=&quot;stl2&quot; /&gt;&lt;br /&gt;&lt;link href=&quot;style3.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; id=&quot;stl3&quot; /&gt;&lt;br /&gt;&lt;script src=&quot;jquery_1.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;&lt;br /&gt;&lt;script type=&quot;text/javascript&quot;&gt;&lt;br /&gt;  window.onload = function()&lt;br /&gt; {&lt;br /&gt;  var stl =&#39;style1.css&#39;; &lt;br /&gt;    $(&#39;#stl1[rel=stylesheet]&#39;).attr(&#39;href&#39;, stl);&lt;br /&gt; $(&#39;#stl2[rel=stylesheet]&#39;).attr(&#39;href&#39;, stl);&lt;br /&gt; $(&#39;#stl3[rel=stylesheet]&#39;).attr(&#39;href&#39;, stl);&lt;br /&gt; }&lt;br /&gt;  &lt;br /&gt;$(document).ready(function() {&lt;br /&gt;  $(&#39;#idamin&#39;).click(function(){&lt;br /&gt;   var stl =&#39;style1.css&#39;; &lt;br /&gt;    $(&#39;#stl1[rel=stylesheet]&#39;).attr(&#39;href&#39;, stl);&lt;br /&gt;  $(&#39;#stl2[rel=stylesheet]&#39;).attr(&#39;href&#39;, stl);&lt;br /&gt;   $(&#39;#stl3[rel=stylesheet]&#39;).attr(&#39;href&#39;, stl);&lt;br /&gt;  });&lt;br /&gt;  &lt;br /&gt;  $(&#39;#ida&#39;).click(function(){&lt;br /&gt;   var stl = &#39;style2.css&#39;;    &lt;br /&gt;    $(&#39;#stl1[rel=stylesheet]&#39;).attr(&#39;href&#39;, stl);&lt;br /&gt;  $(&#39;#stl2[rel=stylesheet]&#39;).attr(&#39;href&#39;, stl);&lt;br /&gt;   $(&#39;#stl3[rel=stylesheet]&#39;).attr(&#39;href&#39;, stl);&lt;br /&gt;  });&lt;br /&gt;  &lt;br /&gt;   $(&#39;#idapos&#39;).click(function(){&lt;br /&gt;   var stl = &#39;style3.css&#39;;     &lt;br /&gt;  $(&#39;#stl1[rel=stylesheet]&#39;).attr(&#39;href&#39;, stl);&lt;br /&gt;   $(&#39;#stl2[rel=stylesheet]&#39;).attr(&#39;href&#39;, stl); &lt;br /&gt;   $(&#39;#stl3[rel=stylesheet]&#39;).attr(&#39;href&#39;, stl);&lt;br /&gt;  });&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;});&lt;br /&gt;--&gt;&lt;/script&gt;&lt;br /&gt;&lt;/head&gt;&lt;br /&gt;&lt;body&gt;&lt;br /&gt;&lt;a href=&quot;#&quot; id=&quot;idamin&quot;&gt; -A&lt;/a&gt;  &amp;nbsp;&amp;nbsp; &lt;a href=&quot;#&quot; id=&quot;ida&quot;&gt; A&lt;/a&gt; &amp;nbsp;&amp;nbsp;&lt;a href=&quot;#&quot; id=&quot;idapos&quot;&gt; A+&lt;/a&gt; &lt;br /&gt;Soumen Ghosh&lt;br /&gt;&lt;/body&gt;&lt;br /&gt;&lt;/html&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.  And create 3 css files with different font size and name them &lt;br /&gt;&lt;br /&gt;&quot;style1.css&quot; write body { text-align: center; font-size:9px; }&lt;br /&gt;&quot;style2.css&quot; write body { text-align: center; font-size:20px; }&lt;br /&gt;&quot;style3.css&quot; write body { text-align: center; font-size:36px; }</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/7311005505727116694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/04/dynamic-css-file-change.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/7311005505727116694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/7311005505727116694'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/04/dynamic-css-file-change.html' title='Dynamic css file change'/><author><name>Soumen Ghosh</name><uri>http://www.blogger.com/profile/09900045366086828094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-7706173973013162525</id><published>2012-04-13T03:44:00.000-07:00</published><updated>2012-04-13T03:45:04.340-07:00</updated><title type='text'>Textbox eocus  change on enter key press</title><content type='html'>Private Sub txtModiulname_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtModiulname.KeyDown&lt;br /&gt;        If e.KeyCode = Keys.Enter Then&lt;br /&gt;            Me.SelectNextControl(Me.ActiveControl, True, True, True, True)&lt;br /&gt;        End If&lt;br /&gt;    End Sub</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/7706173973013162525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/04/textbox-eocus-change-on-enter-key-press.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/7706173973013162525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/7706173973013162525'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/04/textbox-eocus-change-on-enter-key-press.html' title='Textbox eocus  change on enter key press'/><author><name>kuntal</name><uri>http://www.blogger.com/profile/12316518319243526859</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2dobHNHzbjP-jIproGhFb_yDj2-P0dy8l12O9fKGsiuVmPXquktABZBXCaV6-F7SvPJnpZNtueWBqYS6zYSiHgB0o9A_-0-Ho0KZcJktQFyrEldcA1kCqgJufKDqaqw/s220/nike-swoosh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-31636720040563182</id><published>2012-04-13T00:25:00.002-07:00</published><updated>2012-04-13T00:25:26.791-07:00</updated><title type='text'>Auto Clear Textbox Control</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;pre&gt;$(document).ready(function () {
  $(&#39;.autoclear&#39;).autoclear();
});

&amp;lt;form method=&quot;post&quot;&amp;gt;
  &amp;lt;label for=&quot;name&quot;&amp;gt;Name:&amp;lt;/label&amp;gt;&amp;lt;input type=&quot;text&quot; id=&quot;name&quot; name=&quot;name&quot; title=&quot;John Smith&quot; value=&quot;&amp;lt;?php echo $_POST[&#39;name&#39;]; ?&amp;gt;&quot; class=&quot;autoclear&quot;/&amp;gt;
  &amp;lt;label for=&quot;email&quot;&amp;gt;Email:&amp;lt;/label&amp;gt;&amp;lt;&lt;wbr&gt;&lt;/wbr&gt;input type=&quot;text&quot; id=&quot;email&quot; name=&quot;email&quot; title=&quot;&lt;a href=&quot;mailto:your@yourdomain.com&quot; target=&quot;_blank&quot;&gt;your@yourdomain.com&lt;/a&gt;&quot; value=&quot;&amp;lt;?php echo $_POST[&#39;email&#39;]; ?&amp;gt;&quot; class=&quot;autoclear&quot;/&amp;gt;
  &amp;lt;label for=&quot;about&quot;&amp;gt;About:&amp;lt;/label&amp;gt;&amp;lt;&lt;wbr&gt;&lt;/wbr&gt;textarea id=&quot;about&quot; name=&quot;about&quot; title=&quot;Tell us a little bit about yourself...&quot; class=&quot;autoclear&quot;&amp;gt;&amp;lt;?php echo $_POST[&#39;about&#39;]; ?&amp;gt;
  &amp;lt;input type=&quot;submit&quot; value=&quot;Submit&quot;/&amp;gt;&amp;lt;input type=&quot;reset&quot; value=&quot;Reset&quot;/&amp;gt;
&amp;lt;/form&amp;gt;&lt;span class=&quot;HOEnZb&quot;&gt;&lt;span style=&quot;color: #888888;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/31636720040563182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/04/auto-clear-textbox-control.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/31636720040563182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/31636720040563182'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/04/auto-clear-textbox-control.html' title='Auto Clear Textbox Control'/><author><name>Goutam</name><uri>http://www.blogger.com/profile/12138313839533677957</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-274709069215637857</id><published>2012-03-28T02:13:00.001-07:00</published><updated>2012-03-28T02:15:09.451-07:00</updated><title type='text'>Make image proportionately small from url link asp.net</title><content type='html'>&lt;blockquote&gt; int width = 0;&lt;br /&gt;        int height = 0;&lt;br /&gt;&lt;br /&gt;        //&lt;br /&gt;        var webClient = new System.Net.WebClient();&lt;br /&gt;        byte[] image = webClient.DownloadData(&quot;http://static.livedemo00.template-help.com/wt_38438/images/page4_img2b.jpg&quot;);&lt;br /&gt;        //&lt;br /&gt;&lt;br /&gt;        //byte[] image = FileUpload1.FileBytes;&lt;br /&gt;&lt;br /&gt;        Int32.TryParse(&quot;100&quot;, out width);&lt;br /&gt;        Int32.TryParse(&quot;100&quot;, out height);&lt;br /&gt;        ImageHandler imageHandler = new ImageHandler();&lt;br /&gt;        bool maintainAR = true;&lt;br /&gt;        //calling CreateThumbnail Method to create thumb images&lt;br /&gt;        //it returns Bitmap Image. &lt;br /&gt;        Bitmap bmp = imageHandler.CreateThumbnail(image, maintainAR, width, height);&lt;br /&gt;        if (bmp != null)&lt;br /&gt;        {&lt;br /&gt;            //creating a file name with guid.&lt;br /&gt;            string fileName = Guid.NewGuid().ToString() + &quot;.jpg&quot;;&lt;br /&gt;            //saving in current root folder.&lt;br /&gt;            bmp.Save(Server.MapPath(fileName));&lt;br /&gt;            //set image controls ImageUrl to saved Image, this is to view the thumbnail image&lt;br /&gt;            Image1.ImageUrl = fileName;&lt;br /&gt;        }&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;            //exception part&lt;br /&gt;            if (imageHandler.havException)&lt;br /&gt;            {&lt;br /&gt;                Response.Write(imageHandler.ExceptionMessage);&lt;br /&gt;            }&lt;br /&gt;        }&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/274709069215637857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/03/make-image-proportionately-small-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/274709069215637857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/274709069215637857'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/03/make-image-proportionately-small-from.html' title='Make image proportionately small from url link asp.net'/><author><name>Soumen Ghosh</name><uri>http://www.blogger.com/profile/09900045366086828094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-3975924920929237319</id><published>2012-03-27T23:45:00.002-07:00</published><updated>2012-03-27T23:53:32.877-07:00</updated><title type='text'>Image upload through FCK editor - Solution</title><content type='html'>Steps to make it working.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;1. Add &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;appSettings&gt;&lt;br /&gt;    &lt;add key=&quot;FCKeditor:UserFilesPath&quot; value=&quot;http://localhost:52957/web/fckeditor/editor/images/UserFilesUpload/&quot; /&gt;&lt;br /&gt;  &lt;/appSettings&gt;&lt;br /&gt;&lt;br /&gt;in web.config file.&lt;br /&gt; &lt;br /&gt;this path represents the path you want are uploading the image &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;2. change &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;var _FileBrowserLanguage = &#39;aspx&#39;; // asp | aspx | cfm | lasso | perl | php | py&lt;br /&gt;var _QuickUploadLanguage = &#39;aspx&#39;; // asp | aspx | cfm | lasso | perl | php | py&lt;br /&gt;&lt;br /&gt;in fckconfig.js file. for .net only.&lt;br /&gt;&lt;br /&gt;3. put the absolute path like &lt;br /&gt;&lt;br /&gt; UserFilesAbsolutePath = &quot;C:\\Users\\soumen\\Desktop\\web\\fckeditor\\editor\\images\\UserFilesUpload&quot;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;in connector.aspx under &quot;\fckeditor\editor\filemanager\connectors\aspx&quot;</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/3975924920929237319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/03/image-upload-through-fck-editor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/3975924920929237319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/3975924920929237319'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/03/image-upload-through-fck-editor.html' title='Image upload through FCK editor - Solution'/><author><name>Soumen Ghosh</name><uri>http://www.blogger.com/profile/09900045366086828094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-3753052201761663422</id><published>2012-03-19T23:27:00.001-07:00</published><updated>2012-03-19T23:27:44.093-07:00</updated><title type='text'>http://biggani.com</title><content type='html'>http://biggani.com</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/3753052201761663422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/03/httpbigganicom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/3753052201761663422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/3753052201761663422'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/03/httpbigganicom.html' title='http://biggani.com'/><author><name>kuntal</name><uri>http://www.blogger.com/profile/12316518319243526859</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2dobHNHzbjP-jIproGhFb_yDj2-P0dy8l12O9fKGsiuVmPXquktABZBXCaV6-F7SvPJnpZNtueWBqYS6zYSiHgB0o9A_-0-Ho0KZcJktQFyrEldcA1kCqgJufKDqaqw/s220/nike-swoosh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-520343333402930818</id><published>2012-03-19T23:15:00.000-07:00</published><updated>2012-03-19T23:16:25.827-07:00</updated><title type='text'>Encode decode in PHP</title><content type='html'>&lt;?php&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class Encryption {&lt;br /&gt; var $skey  = &quot;kuntal&quot;; // you can change it&lt;br /&gt; &lt;br /&gt;    public  function safe_b64encode($string) {&lt;br /&gt; &lt;br /&gt;        $data = base64_encode($string);&lt;br /&gt;        $data = str_replace(array(&#39;+&#39;,&#39;/&#39;,&#39;=&#39;),array(&#39;-&#39;,&#39;_&#39;,&#39;&#39;),$data);&lt;br /&gt;        return $data;&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt; public function safe_b64decode($string) {&lt;br /&gt;        $data = str_replace(array(&#39;-&#39;,&#39;_&#39;),array(&#39;+&#39;,&#39;/&#39;),$string);&lt;br /&gt;        $mod4 = strlen($data) % 4;&lt;br /&gt;        if ($mod4) {&lt;br /&gt;            $data .= substr(&#39;====&#39;, $mod4);&lt;br /&gt;        }&lt;br /&gt;        return base64_decode($data);&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;    public  function encode($value){ &lt;br /&gt; &lt;br /&gt;     if(!$value){return false;}&lt;br /&gt;        $text = $value;&lt;br /&gt;        $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);&lt;br /&gt;        $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);&lt;br /&gt;        $crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $this-&gt;skey, $text, MCRYPT_MODE_ECB, $iv);&lt;br /&gt;        return trim($this-&gt;safe_b64encode($crypttext)); &lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;    public function decode($value){&lt;br /&gt; &lt;br /&gt;        if(!$value){return false;}&lt;br /&gt;        $crypttext = $this-&gt;safe_b64decode($value); &lt;br /&gt;        $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);&lt;br /&gt;        $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);&lt;br /&gt;        $decrypttext = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this-&gt;skey, $crypttext, MCRYPT_MODE_ECB, $iv);&lt;br /&gt;        return trim($decrypttext);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;?&gt;</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/520343333402930818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/03/encode-decode-in-php.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/520343333402930818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/520343333402930818'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/03/encode-decode-in-php.html' title='Encode decode in PHP'/><author><name>kuntal</name><uri>http://www.blogger.com/profile/12316518319243526859</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2dobHNHzbjP-jIproGhFb_yDj2-P0dy8l12O9fKGsiuVmPXquktABZBXCaV6-F7SvPJnpZNtueWBqYS6zYSiHgB0o9A_-0-Ho0KZcJktQFyrEldcA1kCqgJufKDqaqw/s220/nike-swoosh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-7798842243851685815</id><published>2012-03-19T03:46:00.000-07:00</published><updated>2012-03-19T03:47:02.251-07:00</updated><title type='text'>seo free article sub mission directory</title><content type='html'>http://pravalikadesigns.com/articles-sites-list.html</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/7798842243851685815/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/03/seo-free-article-sub-mission-directory.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/7798842243851685815'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/7798842243851685815'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/03/seo-free-article-sub-mission-directory.html' title='seo free article sub mission directory'/><author><name>Soumen Ghosh</name><uri>http://www.blogger.com/profile/09900045366086828094</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-5683971910795459755</id><published>2012-02-14T01:15:00.000-08:00</published><updated>2012-02-14T01:16:28.146-08:00</updated><title type='text'>Only digit in text box in vb.net</title><content type='html'>Public Function TrapKey(ByVal KCode As String) As Boolean&lt;br /&gt;&lt;br /&gt;            If (KCode &gt;= 48 And KCode &lt;= 57) Or KCode = 8 Or KCode = 46 Then&lt;br /&gt;&lt;br /&gt;                &#39;The AsCII values for numbers are between 48 to 57 and ASCII value 8 is for BackSpace.&lt;br /&gt;&lt;br /&gt;                TrapKey = False&lt;br /&gt;&lt;br /&gt;            Else&lt;br /&gt;&lt;br /&gt;                TrapKey = True&lt;br /&gt;&lt;br /&gt;            End If&lt;br /&gt;&lt;br /&gt;        End Function</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/5683971910795459755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/02/only-digit-in-text-box-in-vbnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/5683971910795459755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/5683971910795459755'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/02/only-digit-in-text-box-in-vbnet.html' title='Only digit in text box in vb.net'/><author><name>kuntal</name><uri>http://www.blogger.com/profile/12316518319243526859</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2dobHNHzbjP-jIproGhFb_yDj2-P0dy8l12O9fKGsiuVmPXquktABZBXCaV6-F7SvPJnpZNtueWBqYS6zYSiHgB0o9A_-0-Ho0KZcJktQFyrEldcA1kCqgJufKDqaqw/s220/nike-swoosh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-7138233347135389536</id><published>2012-01-23T04:22:00.000-08:00</published><updated>2012-01-23T04:23:57.804-08:00</updated><title type='text'>Populate Tree view in vb.net from data base(parent child realation)</title><content type='html'>Private Sub Filltree()&lt;br /&gt;        Dim DSNWind As DataSet&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        Dim oRead As System.IO.StreamReader&lt;br /&gt;        Dim EntireFile As String&lt;br /&gt;        oRead = IO.File.OpenText(Application.StartupPath() + &quot;/connection.txt&quot;)&lt;br /&gt;        EntireFile = oRead.ReadToEnd()&lt;br /&gt;        &#39;end soumen&lt;br /&gt;        Dim connectionString As String = EntireFile&lt;br /&gt;        Dim conn As New SqlConnection(connectionString)&lt;br /&gt;        Dim dadagdetails As New SqlDataAdapter(&quot;select dd.dagdeatilsid,&#39;Land type--&#39;+l.landtype+&#39;,Satak--&#39;+cast(dd.quantity as varchar) as [Details]from tblDagdetails as dd inner join tbllandtype as l on dd.landtype=l.landtypeid where dd.dagid=&#39;&quot; + cmbDag.SelectedValue.ToString() + &quot;&#39;&quot;, conn)&lt;br /&gt;        Dim daowner As New SqlDataAdapter(&quot;select * from tblowner &quot;, conn)&lt;br /&gt;        Dim daownerrealation As New SqlDataAdapter(&quot;select *  from tblOwner&quot;, conn)&lt;br /&gt;        DSNWind = New DataSet&lt;br /&gt;&lt;br /&gt;        dadagdetails.Fill(DSNWind, &quot;dagdetails&quot;)&lt;br /&gt;        daowner.Fill(DSNWind, &quot;owner&quot;)&lt;br /&gt;        daownerrealation.Fill(DSNWind, &quot;ownerrealation&quot;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &#39;DSNWind = New DataSet()&lt;br /&gt;        &#39; DSNWind = db.GetDataSet(&quot;select dd.dagdeatilsid,&#39;Land type--&#39;+l.landtype+&#39;,Satak--&#39;+cast(dd.quantity as varchar) as [Details]from tblDagdetails as dd inner join tbllandtype as l on dd.landtype=l.landtypeid where dd.dagid=&#39;&quot; + cmbDag.SelectedValue.ToString() + &quot;&#39;&quot;, &quot;dagdetails&quot;)&lt;br /&gt;        &#39; DSNWind = db.GetDataSet(&quot;select * from tblowner &quot;, &quot;owner&quot;) &#39;where dagdetailsid=&lt;br /&gt;        &#39; DSNWind = db.GetDataSet(&quot;select * from tblOwner  &quot;, &quot;ownerrealation&quot;) &#39;where&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &#39;Create a data relation object to facilitate the relationship between the Customers and Orders data tables.&lt;br /&gt;        DSNWind.Relations.Add(&quot;tblDagdetails&quot;, DSNWind.Tables(&quot;dagdetails&quot;).Columns(&quot;dagdeatilsid&quot;), DSNWind.Tables(&quot;owner&quot;).Columns(&quot;dagdetailsid&quot;))&lt;br /&gt;        DSNWind.Relations.Add(&quot;tblOwner&quot;, DSNWind.Tables(&quot;owner&quot;).Columns(&quot;ownerid&quot;), DSNWind.Tables(&quot;ownerrealation&quot;).Columns(&quot;parentid&quot;), False)&lt;br /&gt;        &#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        TreeView1.Nodes.Clear()&lt;br /&gt;        Dim i, n As Integer&lt;br /&gt;        Dim parentrow As DataRow&lt;br /&gt;        Dim ParentTable As DataTable&lt;br /&gt;        ParentTable = DSNWind.Tables(&quot;dagdetails&quot;)&lt;br /&gt;&lt;br /&gt;        For Each parentrow In ParentTable.Rows&lt;br /&gt;            Dim parentnode As TreeNode&lt;br /&gt;            parentnode = New TreeNode(parentrow.Item(1))&lt;br /&gt;            TreeView1.Nodes.Add(parentnode)&lt;br /&gt;            &#39;&#39;&#39;&#39;populate child&#39;&#39;&#39;&#39;&#39;&lt;br /&gt;            &#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&lt;br /&gt;            Dim childrow As DataRow&lt;br /&gt;            Dim childnode As TreeNode&lt;br /&gt;            childnode = New TreeNode()&lt;br /&gt;            For Each childrow In parentrow.GetChildRows(&quot;tblDagdetails&quot;)&lt;br /&gt;                childnode = parentnode.Nodes.Add(childrow(3)) &#39; &amp; &quot; &quot; &amp; childrow(1) &amp; &quot; &quot; &amp; childrow(2))&lt;br /&gt;                childnode.Tag = childrow(&quot;dagdetailsid&quot;)&lt;br /&gt;                &#39;&#39;&#39;&#39;populate child2&#39;&#39;&#39;&#39;&lt;br /&gt;                &#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&lt;br /&gt;                Dim childrow2 As DataRow&lt;br /&gt;                Dim childnode2 As TreeNode&lt;br /&gt;                childnode2 = New TreeNode()&lt;br /&gt;                For Each childrow2 In childrow.GetChildRows(&quot;tblOwner&quot;)&lt;br /&gt;                    childnode2 = childnode.Nodes.Add(childrow2(3))&lt;br /&gt;&lt;br /&gt;                Next childrow2&lt;br /&gt;                &#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&lt;br /&gt;&lt;br /&gt;            Next childrow&lt;br /&gt;            &#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&#39;&lt;br /&gt;        Next parentrow&lt;br /&gt;&lt;br /&gt;    End Sub</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/7138233347135389536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2012/01/populate-tree-view-in-vbnet-from-data.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/7138233347135389536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/7138233347135389536'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2012/01/populate-tree-view-in-vbnet-from-data.html' title='Populate Tree view in vb.net from data base(parent child realation)'/><author><name>kuntal</name><uri>http://www.blogger.com/profile/12316518319243526859</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2dobHNHzbjP-jIproGhFb_yDj2-P0dy8l12O9fKGsiuVmPXquktABZBXCaV6-F7SvPJnpZNtueWBqYS6zYSiHgB0o9A_-0-Ho0KZcJktQFyrEldcA1kCqgJufKDqaqw/s220/nike-swoosh.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4303646917971632449.post-136996256206641405</id><published>2011-12-26T22:19:00.000-08:00</published><updated>2011-12-26T22:20:53.000-08:00</updated><title type='text'>call javascript function from grid link button</title><content type='html'>Link Button OnClientClick&lt;br /&gt;OnClientClick=&#39;&lt;%# Eval(&quot;unt_id&quot;, &quot;GetAllForEdit(\&quot;{0}\&quot;); return false;&quot;) %&gt;&#39; &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;JAVA Script function&lt;/span&gt;&lt;br /&gt; function GetAllForEdit(iid) {&lt;br /&gt;&lt;br /&gt;                document.getElementById(&quot;ContentPlaceHolder1_hdfUnitID&quot;).value = iid;&lt;br /&gt;                document.getElementById(&quot;ContentPlaceHolder1_btntemp&quot;).click();&lt;br /&gt;            }</content><link rel='replies' type='application/atom+xml' href='http://blogforcoders.blogspot.com/feeds/136996256206641405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blogforcoders.blogspot.com/2011/12/call-javascript-function-from-grid-link.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/136996256206641405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4303646917971632449/posts/default/136996256206641405'/><link rel='alternate' type='text/html' href='http://blogforcoders.blogspot.com/2011/12/call-javascript-function-from-grid-link.html' title='call javascript function from grid link button'/><author><name>kuntal</name><uri>http://www.blogger.com/profile/12316518319243526859</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2dobHNHzbjP-jIproGhFb_yDj2-P0dy8l12O9fKGsiuVmPXquktABZBXCaV6-F7SvPJnpZNtueWBqYS6zYSiHgB0o9A_-0-Ho0KZcJktQFyrEldcA1kCqgJufKDqaqw/s220/nike-swoosh.jpg'/></author><thr:total>0</thr:total></entry></feed>