<?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-7672659559436266052</id><updated>2024-08-28T19:12:28.504-07:00</updated><title type='text'>Software Engineer(.Net C# Developer)</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>69</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-2214487080632219423</id><published>2014-12-03T06:13:00.000-08:00</published><updated>2014-12-03T06:14:14.879-08:00</updated><title type='text'>Convert HTML to Plain Text</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp;public string HTMLToText(string HTMLCode)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Remove new lines since they are not visible in HTML&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HTMLCode = HTMLCode.Replace(&quot;\n&quot;, &quot; &quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Remove tab spaces&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HTMLCode = HTMLCode.Replace(&quot;\t&quot;, &quot; &quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Remove multiple white spaces from HTML&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HTMLCode = Regex.Replace(HTMLCode, &quot;\\s+&quot;, &quot; &quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Remove HEAD tag&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HTMLCode = Regex.Replace(HTMLCode, &quot;&lt;head .=&quot;&quot; head=&quot;&quot;&gt;&quot;, &quot;&quot; , RegexOptions.IgnoreCase | RegexOptions.Singleline);&lt;/head&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Remove any JavaScript&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HTMLCode = Regex.Replace(HTMLCode, &quot;&lt;script .=&quot;&quot; script=&quot;&quot;&gt;&quot;, &quot;&quot;, RegexOptions.IgnoreCase | RegexOptions.Singleline);&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Replace special characters like &amp;amp;, &lt;, &gt;, &quot; etc.&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; StringBuilder sbHTML = new StringBuilder(HTMLCode);&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Note: There are many more special characters, these are just&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // most common. You can add new characters in this arrays if needed&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string[] OldWords = {&quot;&amp;nbsp;&quot;, &quot;&amp;amp;&quot;, &quot;&amp;quot;&quot;, &quot;&amp;lt;&quot;, &quot;&amp;gt;&quot;, &quot;&amp;reg;&quot;, &quot;&amp;copy;&quot;, &quot;&amp;bull;&quot;, &quot;&amp;trade;&quot;};&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string[] NewWords = { &quot; &quot;, &quot;&amp;amp;&quot;, &quot;\&quot;&quot;, &quot;&lt;&quot;, &quot;&gt;&quot;, &quot;Â®&quot;, &quot;Â©&quot;, &quot;â€¢&quot;, &quot;â„¢&quot; };&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &lt; OldWords.Length; i++)&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sbHTML.Replace(OldWords[i], NewWords[i]);&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Check if there are line breaks (&lt;br&gt;) or paragraph (&lt;p&gt;
)&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sbHTML.Replace(&quot;&lt;br&gt;&quot;, &quot;\n&lt;br&gt;&quot;);&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sbHTML.Replace(&quot;&lt;br &quot;, &quot;\n&lt;br &quot;);&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sbHTML.Replace(&quot;&lt;p &quot;, &quot;\n&lt;p &quot;);&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Finally, remove all HTML tags and return plain text&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return System.Text.RegularExpressions.Regex.Replace(sbHTML.ToString(), &quot;&lt;[^&gt;]*&gt;&quot;, &quot;&quot;);&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;
&lt;!--data-blogger-escaped-&lt;script .=&amp;quot;&amp;quot; script=&amp;quot;&amp;quot;&gt;&amp;quot;, &amp;quot;&amp;quot;, RegexOptions.IgnoreCase | RegexOptions.Singleline);&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Replace special characters like &amp;amp;, &lt;, &gt;, &amp;quot; etc.&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; StringBuilder sbHTML = new StringBuilder(HTMLCode);&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Note: There are many more special characters, these are just&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // most common. You can add new characters in this arrays if needed&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string[] OldWords = {&amp;quot;&amp;nbsp;&amp;quot;, &amp;quot;&amp;amp;&amp;quot;, &amp;quot;&amp;quot;&amp;quot;, &amp;quot;&amp;lt;&amp;quot;, &amp;quot;&amp;gt;&amp;quot;, &amp;quot;&amp;reg;&amp;quot;, &amp;quot;&amp;copy;&amp;quot;, &amp;quot;&amp;bull;&amp;quot;, &amp;quot;&amp;trade;&amp;quot;};&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string[] NewWords = { &amp;quot; &amp;quot;, &amp;quot;&amp;amp;&amp;quot;, &amp;quot;\&amp;quot;&amp;quot;, &amp;quot;&lt;&amp;quot;, &amp;quot;&gt;&amp;quot;, &amp;quot;Â®&amp;quot;, &amp;quot;Â©&amp;quot;, &amp;quot;â€¢&amp;quot;, &amp;quot;â„¢&amp;quot; };&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &lt; OldWords.Length; i++)&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sbHTML.Replace(OldWords[i], NewWords[i]);&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Check if there are line breaks (&lt;br&gt;) or paragraph (&lt;p&gt;
)&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sbHTML.Replace(&amp;quot;&lt;br&gt;&amp;quot;, &amp;quot;\n&lt;br&gt;&amp;quot;);&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sbHTML.Replace(&amp;quot;&lt;br &amp;quot;, &amp;quot;\n&lt;br &amp;quot;);&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sbHTML.Replace(&amp;quot;&lt;p &amp;quot;, &amp;quot;\n&lt;p &amp;quot;);&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Finally, remove all HTML tags and return plain text&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return System.Text.RegularExpressions.Regex.Replace(sbHTML.ToString(), &amp;quot;&lt;[^&gt;]*&gt;&amp;quot;, &amp;quot;&amp;quot;);&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;/div&gt;
&lt;/script&gt;--&amp;gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/2214487080632219423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2014/12/convert-html-to-plain-text.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/2214487080632219423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/2214487080632219423'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2014/12/convert-html-to-plain-text.html' title='Convert HTML to Plain Text'/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-8712934212965469310</id><published>2014-03-03T02:20:00.002-08:00</published><updated>2014-03-03T02:20:29.039-08:00</updated><title type='text'>Test Your Love</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
Test Your Love How much it is pass or acquire marks.&lt;br /&gt;
&lt;br /&gt;
http://lovetest.singlessalad.com/?cid=4581&amp;amp;ax=1&amp;amp;clickid=0053618368096869236&amp;amp;ext_inv_code=103883&amp;amp;dfpid=102103883&amp;amp;oid=7813&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/8712934212965469310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2014/03/test-your-love.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/8712934212965469310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/8712934212965469310'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2014/03/test-your-love.html' title='Test Your Love'/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-2513405844610584911</id><published>2014-02-25T23:33:00.002-08:00</published><updated>2014-02-25T23:33:31.533-08:00</updated><title type='text'>Kill All Process in database sql while restoring </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
If there is any problem that database currently in use and you are not able to restore database than you can run this query for block all processes currently running.&lt;br /&gt;
&lt;br /&gt;
Use Master&lt;br /&gt;
Go&lt;br /&gt;
&lt;br /&gt;
Declare @dbname sysname&lt;br /&gt;
&lt;br /&gt;
Set @dbname = &#39;CDM_HVMS&#39;&lt;br /&gt;
&lt;br /&gt;
Declare @spid int&lt;br /&gt;
Select @spid = min(spid) from master.dbo.sysprocesses&lt;br /&gt;
where dbid = db_id(@dbname)&lt;br /&gt;
While @spid Is Not Null&lt;br /&gt;
Begin&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Execute (&#39;Kill &#39; + @spid)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Select @spid = min(spid) from master.dbo.sysprocesses&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; where dbid = db_id(@dbname) and spid &amp;gt; @spid&lt;br /&gt;
End&lt;br /&gt;
print &#39;done&#39;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/2513405844610584911/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2014/02/kill-all-process-in-database-sql-while.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/2513405844610584911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/2513405844610584911'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2014/02/kill-all-process-in-database-sql-while.html' title='Kill All Process in database sql while restoring '/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-5426545781263129013</id><published>2013-10-21T04:02:00.000-07:00</published><updated>2013-10-21T04:02:09.030-07:00</updated><title type='text'>Check Existing record by join two tables using Linq</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
//Use this code to check existing record from two tables using Linq .&lt;br /&gt;
&lt;br /&gt;
Chrome_VINEquipment existequipment = db.Chrome_VINEquipments.Where(x =&amp;gt; x.VINPatternID == VinPatternID &amp;amp;&amp;amp; db.WS_GenericEquipments.Any(c =&amp;gt; c.StyleId == car.StyleId)).FirstOrDefault();&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/5426545781263129013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2013/10/check-existing-record-by-join-two.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/5426545781263129013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/5426545781263129013'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2013/10/check-existing-record-by-join-two.html' title='Check Existing record by join two tables using Linq'/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-1756760614375183426</id><published>2013-07-08T22:03:00.002-07:00</published><updated>2013-07-08T22:03:37.609-07:00</updated><title type='text'>Find Item in DropDownlist </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
Find Item in dropdown if item find then selected or its ignored .with this code.....&lt;br /&gt;
ddlBody.SelectedIndex = ddlBody.Items.IndexOf(ddlBody.Items.FindByValue(Convert.ToString(lst[0].BodyId)));&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/1756760614375183426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2013/07/find-item-in-dropdownlist.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/1756760614375183426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/1756760614375183426'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2013/07/find-item-in-dropdownlist.html' title='Find Item in DropDownlist '/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-8376615106922272508</id><published>2013-06-25T04:23:00.001-07:00</published><updated>2013-06-25T04:23:02.762-07:00</updated><title type='text'>Update row by row any field without cursor </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
WITH myTable2 AS&lt;br /&gt;
&amp;nbsp; &amp;nbsp; (&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SELECT vinid, ROW_NUMBER() OVER (ORDER BY vinid) AS sequence&lt;br /&gt;
&amp;nbsp; &amp;nbsp; FROM VehicleDescription&lt;br /&gt;
&amp;nbsp; &amp;nbsp; )&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
UPDATE genericequipment&lt;br /&gt;
SET VinID = VehicleDescription.vinid&lt;br /&gt;
FROM VehicleDescription&lt;br /&gt;
JOIN genericequipment on VehicleDescription.VinPattern = genericequipment.vinPattern;&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://mastpiyush.blogspot.com/feeds/8376615106922272508/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2013/06/update-row-by-row-any-field-without.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/8376615106922272508'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/8376615106922272508'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2013/06/update-row-by-row-any-field-without.html' title='Update row by row any field without cursor '/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-2256125265335760103</id><published>2013-05-13T00:05:00.001-07:00</published><updated>2013-05-13T00:05:18.252-07:00</updated><title type='text'>Apply Facebook twitter g+ link on your website.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Please refer this link to integrate social links into your website.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.creativeverse.com/integrate-twitter-facebook-and-google-in-wordpress/&quot;&gt;http://www.creativeverse.com/integrate-twitter-facebook-and-google-in-wordpress/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Thanks and enjoy ur code....&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/2256125265335760103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2013/05/apply-facebook-twitter-g-link-on-your.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/2256125265335760103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/2256125265335760103'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2013/05/apply-facebook-twitter-g-link-on-your.html' title='Apply Facebook twitter g+ link on your website.'/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-6813983299667887103</id><published>2013-03-09T02:11:00.003-08:00</published><updated>2013-03-09T02:11:25.667-08:00</updated><title type='text'>Custom Paging in Datalist or repeater </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
This is a very simple custom paging technique for a developer where ha can do paging in datalist and repeater in only 5 minutes.enjoy code.....&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; public void BindPhoto()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GalleryModuleController objCommentModules = new GalleryModuleController();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List&lt;commentinfo&gt; cmi;&lt;/commentinfo&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cmi = objCommentModules.PhotoList(0);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (cmi.Count &amp;gt; 0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dlphotogallery.DataSource = cmi;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dlphotogallery.DataBind();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pds.DataSource = cmi;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pds.AllowPaging = true;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //to set the paging change the number 3 to your desired value&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pds.PageSize = 4;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pds.CurrentPageIndex = CurrentPage;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lnkbtnNext.Enabled = !pds.IsLastPage;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lnkbtnPrevious.Enabled = !pds.IsFirstPage;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dlphotogallery.DataSource = pds;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dlphotogallery.DataBind();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; doPaging();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; protected void lnkbtnPrevious_Click(object sender, EventArgs e)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CurrentPage -= 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BindPhoto();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; protected void lnkbtnNext_Click(object sender, EventArgs e)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CurrentPage += 1;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BindPhoto();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; protected void dlPaging_ItemCommand(object source, DataListCommandEventArgs e)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (e.CommandName.Equals(&quot;lnkbtnPaging&quot;))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CurrentPage = Convert.ToInt16(e.CommandArgument.ToString());&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BindPhoto();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; protected void dlPaging_ItemDataBound(object sender, DataListItemEventArgs e)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LinkButton lnkbtnPage = (LinkButton)e.Item.FindControl(&quot;lnkbtnPaging&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (lnkbtnPage.CommandArgument.ToString() == CurrentPage.ToString())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lnkbtnPage.Enabled = false;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lnkbtnPage.Font.Bold = true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public int CurrentPage&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; get&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (this.ViewState[&quot;CurrentPage&quot;] == null)&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; return 0;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&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; return Convert.ToInt16(this.ViewState[&quot;CurrentPage&quot;].ToString());&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; set&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.ViewState[&quot;CurrentPage&quot;] = value;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private void doPaging()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataTable dt = new DataTable();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt.Columns.Add(&quot;PageIndex&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt.Columns.Add(&quot;PageText&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; pds.PageCount; i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataRow dr = dt.NewRow();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dr[0] = i;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dr[1] = i + 1;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dt.Rows.Add(dr);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dlPaging.DataSource = dt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dlPaging.DataBind();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/6813983299667887103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2013/03/custom-paging-in-datalist-or-repeater.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/6813983299667887103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/6813983299667887103'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2013/03/custom-paging-in-datalist-or-repeater.html' title='Custom Paging in Datalist or repeater '/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-1038028637697889856</id><published>2013-03-09T02:04:00.002-08:00</published><updated>2013-05-13T06:38:54.664-07:00</updated><title type='text'>Open PopUp using jquery css and jqeury code. </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
This is the open popup code using jquery with appplying css .this is a very simple and attractive pop up window just applied on div.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;$(document).ready(function () {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&#39;open&#39;).click(function () {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; alert(&#39;hi&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; load();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&#39;.close&#39;).click(function () {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; unload();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;
&amp;nbsp; &amp;nbsp; });&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;function unload() { &amp;nbsp; &amp;nbsp;// TO Unload the Popupbox&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&#39;.popup&#39;).fadeOut(&quot;slow&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;#container&quot;).css({ // this is just for style &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;opacity&quot;: &quot;1&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; function load() { &amp;nbsp; &amp;nbsp;// To Load the Popupbox&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&#39;.popup&#39;).fadeIn(&quot;slow&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;#container&quot;).css({ // this is just for style&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;opacity&quot;: &quot;0.3&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
style type=&quot;text/css&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; .popup {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; display: none; /* Hide the DIV */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; position: absolute;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _position: absolute; /* hack for internet explorer 6 */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; height: 325px;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; width: 325px;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; background: #FFFFFF;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; left: 80px;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; top: 100px;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; z-index: 100; /* Layering ( on-top of others), if you have lots of layers: I just maximized, you can change it yourself */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; margin-left: 15px;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* additional features, can be omitted */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; border:2px solid #ff0000;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; padding:15px;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; font-size: 15px;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -moz-box-shadow: 0 0 5px #ff0000;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -webkit-box-shadow: 0 0 5px #ff0000;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; box-shadow: 0 0 5px #ff0000;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; #container {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; width: 100%;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; height: 100%;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; a {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cursor: pointer;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; text-decoration: none;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /* This is for the positioning of the Close Link */&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #popupBoxClose {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; font-size: 20px;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; line-height: 15px;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; right: 5px;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; top: 5px;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; position: absolute;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; color: #6fa5e2;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; font-weight: 500;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp;/style&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/1038028637697889856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2013/03/open-popup-using-jquery-css-and-jqeury.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/1038028637697889856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/1038028637697889856'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2013/03/open-popup-using-jquery-css-and-jqeury.html' title='Open PopUp using jquery css and jqeury code. '/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-3587812042255236136</id><published>2013-02-26T01:10:00.002-08:00</published><updated>2013-02-26T01:10:17.652-08:00</updated><title type='text'>Send mail comman code </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
public static void Send(string[] To, String Subject, String Body,bool IsBodyHtml)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var smtp = new SmtpClient&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Host = Host,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EnableSsl = true,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DeliveryMethod = SmtpDeliveryMethod.Network,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UseDefaultCredentials = false,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Credentials = new NetworkCredential(SMTPUser, Password),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var message = new MailMessage()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Subject = Subject,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Body = Body&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (var vv in (from s in To select (new MailAddress(s))))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; message.To.Add(vv);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; message.From = new MailAddress(From);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; message.IsBodyHtml = IsBodyHtml;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; smtp.Send(message);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/3587812042255236136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2013/02/send-mail-comman-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/3587812042255236136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/3587812042255236136'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2013/02/send-mail-comman-code.html' title='Send mail comman code '/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-2388041021367758526</id><published>2013-02-13T23:19:00.005-08:00</published><updated>2013-02-13T23:19:54.301-08:00</updated><title type='text'>Remove item from array list of multiple column.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
This problem occured when i was doing project in dotnetnuke 5.6.3 so in arraylist there have multiple columns and I and remove row which contains particular value of type.this is the code for solve this problem.&lt;br /&gt;
&lt;br /&gt;
DotNetNuke.Entities.Users.UserController oUserController = new DotNetNuke.Entities.Users.UserController();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ArrayList listroles = oUserController.GetUsers(this.PortalId, true, true);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int j = 0;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; listroles.Count; i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DotNetNuke.Entities.Users.UserInfo info = (DotNetNuke.Entities.Users.UserInfo)listroles[i];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (info.Username == UserInfo.Username)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; listroles.Remove(info);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/2388041021367758526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2013/02/remove-item-from-array-list-of-multiple.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/2388041021367758526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/2388041021367758526'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2013/02/remove-item-from-array-list-of-multiple.html' title='Remove item from array list of multiple column.'/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-6565048474820398571</id><published>2013-01-22T02:16:00.002-08:00</published><updated>2013-01-22T02:16:51.511-08:00</updated><title type='text'>Split function 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;br /&gt;
I have created a function for spliting the string of any type with the required delimeter which you want to specify hope so this function will solve your splitting problem in sql server.&lt;br /&gt;
&lt;br /&gt;
CREATE FUNCTION dbo.fnSplit(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; @sInputList VARCHAR(8000) -- List of delimited items&lt;br /&gt;
&amp;nbsp; , @sDelimiter VARCHAR(8000) = &#39;,&#39; -- delimiter that separates items&lt;br /&gt;
) RETURNS @List TABLE (item VARCHAR(8000))&lt;br /&gt;
&lt;br /&gt;
BEGIN&lt;br /&gt;
DECLARE @sItem VARCHAR(8000)&lt;br /&gt;
WHILE CHARINDEX(@sDelimiter,@sInputList,0) &amp;lt;&amp;gt; 0&lt;br /&gt;
&amp;nbsp;BEGIN&lt;br /&gt;
&amp;nbsp;SELECT&lt;br /&gt;
&amp;nbsp; @sItem=RTRIM(LTRIM(SUBSTRING(@sInputList,1,CHARINDEX(@sDelimiter,@sInputList,0)-1))),&lt;br /&gt;
&amp;nbsp; @sInputList=RTRIM(LTRIM(SUBSTRING(@sInputList,CHARINDEX(@sDelimiter,@sInputList,0)+LEN(@sDelimiter),LEN(@sInputList))))&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;IF LEN(@sItem) &amp;gt; 0&lt;br /&gt;
&amp;nbsp; INSERT INTO @List SELECT @sItem&lt;br /&gt;
&amp;nbsp;END&lt;br /&gt;
&lt;br /&gt;
IF LEN(@sInputList) &amp;gt; 0&lt;br /&gt;
&amp;nbsp;INSERT INTO @List SELECT @sInputList -- Put the last item in&lt;br /&gt;
RETURN&lt;br /&gt;
END&lt;br /&gt;
GO&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/6565048474820398571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2013/01/split-function-in-sql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/6565048474820398571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/6565048474820398571'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2013/01/split-function-in-sql-server.html' title='Split function in sql server'/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-7972174448512589190</id><published>2013-01-08T03:51:00.003-08:00</published><updated>2013-01-08T03:51:45.062-08:00</updated><title type='text'>Write Div Content on new window</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
We want to open new window and write content on it which we want to write into it.&lt;br /&gt;
$(&quot;#adv&quot;).click(function () {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var html = $(&quot;#dvcontent&quot;).html();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var w = window.open();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; w.document.writeln(html);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;});&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/7972174448512589190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2013/01/write-div-content-on-new-window.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/7972174448512589190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/7972174448512589190'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2013/01/write-div-content-on-new-window.html' title='Write Div Content on new window'/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-1246745166224179243</id><published>2013-01-07T01:34:00.001-08:00</published><updated>2013-01-07T01:41:26.509-08:00</updated><title type='text'>Integrate Google Map into our MVC application</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
This is the code for integrating google map into our all types application just u paste this code and pass the longitude and latitude into function it ll automtically take the location and show ur desired place to u and you can manage it urself as u want.enjoy.....&lt;br /&gt;
script src=&quot;http://maps.google.com/maps?file=api&amp;amp;v=2&amp;amp;key=ABQIAAAAVc&lt;br /&gt;
JQrx7VsumiP2heFwp&lt;br /&gt;
6URQLaiSrhXTkLq3m&lt;br /&gt;
A9rOmHpVsHwBjxT&lt;br /&gt;
g7C5-XXHl634dCROpHwK&lt;br /&gt;
MO9BzmQ&amp;amp;sensor=true_or_false&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type=&quot;text/javascript&quot; script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTHqCT6Otm0NSWHhi-7BChFT6VbSMF7uz-mxvi5aYUh4q52GjRrEqeYcU4ZefkPyYtuI8824VukYbFEXavAvbYXLFBMB34Zf7CgzYABrACj8_e13zXdItWCsuKbPWS-RDezEufUB5YXGE/s1600/googlemap.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTHqCT6Otm0NSWHhi-7BChFT6VbSMF7uz-mxvi5aYUh4q52GjRrEqeYcU4ZefkPyYtuI8824VukYbFEXavAvbYXLFBMB34Zf7CgzYABrACj8_e13zXdItWCsuKbPWS-RDezEufUB5YXGE/s320/googlemap.bmp&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; script type=&quot;text/javascript&quot;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; function initialize() {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (GBrowserIsCompatible()) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var map = new GMap2(document.getElementById(&quot;map_canvas&quot;));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; map.setCenter(new GLatLng(20.593684, 78.96288), 13);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; map.setUIToDefault();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;script&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; body onload=&quot;initialize()&quot; onunload=&quot;GUnload()&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; div id=&quot;map_canvas&quot; style=&quot;width: 500px; height: 300px&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; body&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;script type=&quot;text/javascript&quot;&gt;&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; function initialize() {&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (GBrowserIsCompatible()) {&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var map = new GMap2(document.getElementById(&quot;map_canvas&quot;));&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; map.setCenter(new GLatLng(20.593684, 78.96288), 13);&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; map.setUIToDefault();&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;
&lt;br&gt;&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; script&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; head&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; body onload=&quot;initialize()&quot; onunload=&quot;GUnload()&quot;&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; div id=&quot;map_canvas&quot; style=&quot;width: 500px; height: 300px&quot;&lt;/p&gt;
&lt;p&gt;
&amp;nbsp;body&lt;/p&gt;
&lt;/div&gt;
&lt;/script&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/1246745166224179243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2013/01/integrate-google-map-into-our-mvc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/1246745166224179243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/1246745166224179243'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2013/01/integrate-google-map-into-our-mvc.html' title='Integrate Google Map into our MVC application'/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTHqCT6Otm0NSWHhi-7BChFT6VbSMF7uz-mxvi5aYUh4q52GjRrEqeYcU4ZefkPyYtuI8824VukYbFEXavAvbYXLFBMB34Zf7CgzYABrACj8_e13zXdItWCsuKbPWS-RDezEufUB5YXGE/s72-c/googlemap.bmp" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-2042110396569752486</id><published>2012-12-30T22:06:00.003-08:00</published><updated>2012-12-30T22:06:31.462-08:00</updated><title type='text'>Detect Browser Refresh to avoid events fired again 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;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-size: 14px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
If you have created an aspx page using C# and ASP.NET and have put a button on it. And in the Click event of this button if you are inserting some data in database , after click if user refresh the page than click event gets fired again resulting data insertion to database again, to stop events on the page getting fired on browser refresh we need to write bit of code to avoid it.&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-size: 14px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;In this example I’ve put a Label and a Button on the page, on click the label Text becomes Hello and when I refresh the page label&#39;s text again becomes Hello&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-size: 14px; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;a href=&quot;&quot; name=&quot;more&quot; style=&quot;border: 0px; color: #d1580d; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; text-decoration: underline; vertical-align: baseline;&quot;&gt;&lt;/a&gt;&lt;span style=&quot;background-attachment: scroll; background-color: yellow; background-image: none; background-position: 0% 0%; background-repeat: repeat repeat; border: 0px; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/span&gt;Markup&lt;/div&gt;
&lt;br /&gt;&lt;table style=&quot;border-spacing: 0px; border: 1px dashed rgb(165, 42, 42); font-family: inherit; font-size: 14px; font-style: inherit; margin: 0px 0px 0.5em; padding: 0px; vertical-align: middle; width: 708px;&quot;&gt;&lt;tbody style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;tr style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;td style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; padding: 4px 10px 4px 5px; vertical-align: middle;&quot;&gt;&lt;br /&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-size: 14px; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
Now in the Page_Load event I m creating a Session Variable and assigning System date and time to it , and in Page_Prerender event I am creating a Viewstate variable and assigning Session variable&#39;s value to it than in button&#39;s click event I am checking the values of Session variable and Viewstate variable if they both are equal than page is not refreshed otherwise it has been refreshed&amp;nbsp;&lt;/div&gt;
&lt;table style=&quot;border-spacing: 0px; border: 1px dashed rgb(165, 42, 42); font-family: inherit; font-size: 14px; font-style: inherit; margin: 0px 0px 0.5em; padding: 0px; vertical-align: middle; width: 708px;&quot;&gt;&lt;tbody style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;tr style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;td style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; padding: 4px 10px 4px 5px; vertical-align: middle;&quot;&gt;&lt;br style=&quot;background-color: #f6f4ef; color: #222222; font-family: Georgia, Times, &#39;Times New Roman&#39;; line-height: 20px;&quot; /&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f6f4ef; border: 0px; color: #222222; font-family: Georgia, Times, &#39;Times New Roman&#39;; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp;&amp;nbsp;&lt;m:smallfrac m:val=&quot;off&quot;&gt;&lt;m:narylim m:val=&quot;undOvr&quot;&gt;&lt;/m:narylim&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: blue; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;border: 0px; color: blue; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;partial&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;border: 0px; color: blue; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;border: 0px; color: #2b91af; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;_Default&lt;/span&gt;&amp;nbsp;: System.Web.UI.&lt;span style=&quot;border: 0px; color: #2b91af; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Page&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
{&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: blue; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;protected&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;border: 0px; color: blue; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&amp;nbsp;Page_Load(&lt;span style=&quot;border: 0px; color: blue; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;object&lt;/span&gt;&amp;nbsp;sender,&amp;nbsp;&lt;span style=&quot;border: 0px; color: #2b91af; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventArgs&lt;/span&gt;&amp;nbsp;e)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
{&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: blue; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(!IsPostBack)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
{&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
Session[&lt;span style=&quot;border: 0px; color: #a31515; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;CheckRefresh&quot;&lt;/span&gt;] =&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
Server.UrlDecode(System.&lt;span style=&quot;border: 0px; color: #2b91af; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;DateTime&lt;/span&gt;.Now.ToString());&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: blue; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;protected&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;border: 0px; color: blue; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&amp;nbsp;imgbtn_Click(&lt;span style=&quot;border: 0px; color: blue; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;object&lt;/span&gt;&amp;nbsp;sender,&amp;nbsp;&lt;span style=&quot;border: 0px; color: #2b91af; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ImageClickEventArgs&lt;/span&gt;&amp;nbsp;e)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
{&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: green; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;//Label2.Text = imgbtn.ToolTip;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: blue; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;protected&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;border: 0px; color: blue; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&amp;nbsp;Button1_Click(&lt;span style=&quot;border: 0px; color: blue; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;object&lt;/span&gt;&amp;nbsp;sender,&amp;nbsp;&lt;span style=&quot;border: 0px; color: #2b91af; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventArgs&lt;/span&gt;&amp;nbsp;e)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
{&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: blue; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;if&lt;/span&gt;&amp;nbsp;(Session[&lt;span style=&quot;border: 0px; color: #a31515; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;CheckRefresh&quot;&lt;/span&gt;].ToString() == ViewState[&lt;span style=&quot;border: 0px; color: #a31515; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;CheckRefresh&quot;&lt;/span&gt;].ToString())&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
{&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
Label1.Text =&amp;nbsp;&lt;span style=&quot;border: 0px; color: #a31515; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Hello&quot;&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
Session[&lt;span style=&quot;border: 0px; color: #a31515; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;CheckRefresh&quot;&lt;/span&gt;] =&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
Server.UrlDecode(System.&lt;span style=&quot;border: 0px; color: #2b91af; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;DateTime&lt;/span&gt;.Now.ToString());&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: blue; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;else&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
{&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
Label1.Text =&amp;nbsp;&lt;span style=&quot;border: 0px; color: #a31515; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Page Refreshed&quot;&lt;/span&gt;;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: blue; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;protected&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;border: 0px; color: blue; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;void&lt;/span&gt;&amp;nbsp;Page_PreRender(&lt;span style=&quot;border: 0px; color: blue; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;object&lt;/span&gt;&amp;nbsp;sender,&amp;nbsp;&lt;span style=&quot;border: 0px; color: #2b91af; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;EventArgs&lt;/span&gt;&amp;nbsp;e)&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
{&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
ViewState[&lt;span style=&quot;border: 0px; color: #a31515; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;CheckRefresh&quot;&lt;/span&gt;] = Session[&lt;span style=&quot;border: 0px; color: #a31515; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;CheckRefresh&quot;&lt;/span&gt;];&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px 0px 0.0001pt; padding: 0px; vertical-align: baseline;&quot;&gt;
}&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background-color: #f6f4ef; border: 0px; color: #222222; font-family: Georgia, Times, &#39;Times New Roman&#39;; line-height: 20px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/2042110396569752486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2012/12/detect-browser-refresh-to-avoid-events.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/2042110396569752486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/2042110396569752486'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2012/12/detect-browser-refresh-to-avoid-events.html' title='Detect Browser Refresh to avoid events fired again in ASP.NET '/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-8507094897517751316</id><published>2012-12-22T01:32:00.001-08:00</published><updated>2013-01-22T03:04:54.738-08:00</updated><title type='text'>Code for update panel postback problem solving by using Jquery</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&amp;nbsp;I have a grid when I postback this grid by linkbutton which is in this grid jquery function was not working in mouse over so I paste this code into update panel to avoid postback .&lt;br /&gt;
&lt;script type=&quot;text/javascript&quot;&gt;&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var prm = Sys.WebForms.PageRequestManager.getInstance();&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prm.add_endRequest(function () {&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; grid();&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/p&gt;
&lt;p&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/script&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; script type =&quot;text/javascript&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var prm = Sys.WebForms.PageRequestManager.getInstance();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; prm.add_endRequest(function () {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; grid();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; script&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/8507094897517751316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2012/12/code-for-update-panel-postback-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/8507094897517751316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/8507094897517751316'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2012/12/code-for-update-panel-postback-jquery.html' title='Code for update panel postback problem solving by using Jquery'/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-1185356457686254605</id><published>2012-09-22T04:00:00.001-07:00</published><updated>2013-01-16T04:45:25.472-08:00</updated><title type='text'>Refresh Page Issue 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;br /&gt;
&lt;h2 style=&quot;background-color: white; color: #ff9900; font-family: &#39;Segoe UI&#39;, Arial, sans-serif; font-size: 20px; font-weight: normal; margin: 20px 0px 11px;&quot;&gt;
Introduction&lt;/h2&gt;
&lt;div style=&quot;background-color: white; color: #111111; font-family: &#39;Segoe UI&#39;, Arial, sans-serif; font-size: 14px;&quot;&gt;
In Web Programming, the refresh click or postback is the big problem which generally developers face. So in order to avoid the refresh page issues like, if user refreshes the page after executing any button click event/method, the same method gets executed again on refresh. But this should not happen, so here is the code to avoid such issues.&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; color: #ff9900; font-family: &#39;Segoe UI&#39;, Arial, sans-serif; font-size: 20px; font-weight: normal; margin: 20px 0px 11px;&quot;&gt;
Using the Code&lt;/h2&gt;
&lt;div style=&quot;background-color: white; color: #111111; font-family: &#39;Segoe UI&#39;, Arial, sans-serif; font-size: 14px;&quot;&gt;
Here the page&#39;s&amp;nbsp;&lt;code style=&quot;border: 0px; color: #990000; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 11pt; margin: 0px; padding: 0px;&quot;&gt;PreRender&lt;/code&gt;&amp;nbsp;event and&amp;nbsp;&lt;code style=&quot;border: 0px; color: #990000; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 11pt; margin: 0px; padding: 0px;&quot;&gt;ViewState&lt;/code&gt;&amp;nbsp;variable helps to differentate between the Button click event call or the Refresh page event call. For example, We have a web page having button to display text entered in text box to the Label.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #111111; font-family: &#39;Segoe UI&#39;, Arial, sans-serif; font-size: 14px;&quot;&gt;
So when page is first time loaded, then a session[&quot;update&quot;] object is assigned by some unique value, and then the&lt;code style=&quot;border: 0px; color: #990000; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 11pt; margin: 0px; padding: 0px;&quot;&gt;PreRender&lt;/code&gt;&amp;nbsp;event is being called, where that session is assigned to the viewstate variable.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #111111; font-family: &#39;Segoe UI&#39;, Arial, sans-serif; font-size: 14px;&quot;&gt;
And on button click event, the session assigning code from page load will never called, as it is postback, so it directly calls the button click event where there is check whether the session and viewstate variables have same value. Here both values will be same. At the end of the click event method, the session variable is assigned with new unique value. Then always after click event, the&amp;nbsp;&lt;code style=&quot;border: 0px; color: #990000; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 11pt; margin: 0px; padding: 0px;&quot;&gt;PreRender&lt;/code&gt;&amp;nbsp;event gets called where that newly assigned session value is assigned to viewstate variable.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #111111; font-family: &#39;Segoe UI&#39;, Arial, sans-serif; font-size: 14px;&quot;&gt;
So whenever the page is being refreshed, viewstate value will become previous value (previous value is taken from viewstate hidden control) which will never match with current session value. So whenever the control goes in button click event, the match condition never gets satisfied hence code related to button click never gets executed.&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; color: #ff9900; font-family: &#39;Segoe UI&#39;, Arial, sans-serif; font-size: 20px; font-weight: normal; margin: 20px 0px 11px;&quot;&gt;
Points of Interest&lt;/h2&gt;
&lt;div style=&quot;background-color: white; color: #111111; font-family: &#39;Segoe UI&#39;, Arial, sans-serif; font-size: 14px;&quot;&gt;
Here we can understand the page events flow as well as&amp;nbsp;&lt;code style=&quot;border: 0px; color: #990000; font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 11pt; margin: 0px; padding: 0px;&quot;&gt;Viewstate&lt;/code&gt;&amp;nbsp;variable&#39;s workflow easily.&lt;/div&gt;
&lt;div class=&quot;pre-action-link&quot; id=&quot;premain0&quot; style=&quot;background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-width: 0px 0px 1px; color: #005782; font-family: &#39;Segoe UI&#39;, Arial, sans-serif; font-size: 11px; margin: 0px; padding: 0px; text-align: right;&quot; width=&quot;100%&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;pre id=&quot;pre0&quot; lang=&quot;cs&quot; style=&quot;background-color: #fbedbb; border: 1px solid rgb(251, 237, 187); font-family: Consolas, &#39;Courier New&#39;, Courier, mono; font-size: 9pt; overflow: auto; padding: 6px; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;border: 0px; color: blue; margin: 0px; padding: 0px;&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;code-keyword&quot; style=&quot;border: 0px; color: blue; margin: 0px; padding: 0px;&quot;&gt;void&lt;/span&gt; Page_Load(&lt;span class=&quot;code-keyword&quot; style=&quot;border: 0px; color: blue; margin: 0px; padding: 0px;&quot;&gt;object&lt;/span&gt; sender, EventArgs e)
{
    &lt;span class=&quot;code-keyword&quot; style=&quot;border: 0px; color: blue; margin: 0px; padding: 0px;&quot;&gt;if&lt;/span&gt; (!IsPostBack) &lt;span class=&quot;code-comment&quot; style=&quot;border: 0px; color: green; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;border: 0px; color: green; font-style: italic; margin: 0px; padding: 0px;&quot;&gt; If page loads for first time
&lt;/span&gt;    {
        &lt;span class=&quot;code-comment&quot; style=&quot;border: 0px; color: green; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;border: 0px; color: green; font-style: italic; margin: 0px; padding: 0px;&quot;&gt; Assign the Session[&quot;update&quot;] with unique value
&lt;/span&gt;        Session[&lt;span class=&quot;code-string&quot; style=&quot;border: 0px; color: purple; margin: 0px; padding: 0px;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;border: 0px; color: purple; margin: 0px; padding: 0px;&quot;&gt;update&quot;&lt;/span&gt;] = &lt;span class=&quot;search-highlight&quot; style=&quot;border-bottom-color: rgb(255, 153, 0); border-bottom-style: dotted; border-width: 0px 0px 1px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;Server.UrlEncode(System.DateTime.Now.ToString())&lt;/span&gt;; 
        &lt;span class=&quot;code-comment&quot; style=&quot;border: 0px; color: green; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;border: 0px; color: green; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;=============== Page load code =========================
&lt;/span&gt;



        &lt;span class=&quot;code-comment&quot; style=&quot;border: 0px; color: green; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;border: 0px; color: green; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;============== End of Page load code ===================
&lt;/span&gt;    }
}

&lt;span class=&quot;code-keyword&quot; style=&quot;border: 0px; color: blue; margin: 0px; padding: 0px;&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;code-keyword&quot; style=&quot;border: 0px; color: blue; margin: 0px; padding: 0px;&quot;&gt;void&lt;/span&gt; btnDisplay_Click(&lt;span class=&quot;code-keyword&quot; style=&quot;border: 0px; color: blue; margin: 0px; padding: 0px;&quot;&gt;object&lt;/span&gt; sender, EventArgs e)
{ 
    &lt;span class=&quot;code-comment&quot; style=&quot;border: 0px; color: green; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;border: 0px; color: green; font-style: italic; margin: 0px; padding: 0px;&quot;&gt; If page not Refreshed
&lt;/span&gt;    &lt;span class=&quot;code-keyword&quot; style=&quot;border: 0px; color: blue; margin: 0px; padding: 0px;&quot;&gt;if&lt;/span&gt; (Session[&lt;span class=&quot;code-string&quot; style=&quot;border: 0px; color: purple; margin: 0px; padding: 0px;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;border: 0px; color: purple; margin: 0px; padding: 0px;&quot;&gt;update&quot;&lt;/span&gt;].ToString() == ViewState[&lt;span class=&quot;code-string&quot; style=&quot;border: 0px; color: purple; margin: 0px; padding: 0px;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;border: 0px; color: purple; margin: 0px; padding: 0px;&quot;&gt;update&quot;&lt;/span&gt;].ToString())
    {
        &lt;span class=&quot;code-comment&quot; style=&quot;border: 0px; color: green; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;border: 0px; color: green; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;=============== On click event code ========================= 
&lt;/span&gt;
        lblDisplayAddedName.Text = txtName.Text;

        &lt;span class=&quot;code-comment&quot; style=&quot;border: 0px; color: green; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;border: 0px; color: green; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;=============== End of On click event code ==================
&lt;/span&gt;
        &lt;span class=&quot;code-comment&quot; style=&quot;border: 0px; color: green; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;border: 0px; color: green; font-style: italic; margin: 0px; padding: 0px;&quot;&gt; After the event/ method, again update the session 
&lt;/span&gt;
        Session[&lt;span class=&quot;code-string&quot; style=&quot;border: 0px; color: purple; margin: 0px; padding: 0px;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;border: 0px; color: purple; margin: 0px; padding: 0px;&quot;&gt;update&quot;&lt;/span&gt;] = &lt;span class=&quot;search-highlight&quot; style=&quot;border-bottom-color: rgb(255, 153, 0); border-bottom-style: dotted; border-width: 0px 0px 1px; font-weight: bold; margin: 0px; padding: 0px;&quot;&gt;Server.UrlEncode(System.DateTime.Now.ToString())&lt;/span&gt;; 
    }
    &lt;span class=&quot;code-keyword&quot; style=&quot;border: 0px; color: blue; margin: 0px; padding: 0px;&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;code-comment&quot; style=&quot;border: 0px; color: green; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;border: 0px; color: green; font-style: italic; margin: 0px; padding: 0px;&quot;&gt; If Page Refreshed
&lt;/span&gt;    {
        &lt;span class=&quot;code-comment&quot; style=&quot;border: 0px; color: green; font-style: italic; margin: 0px; padding: 0px;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;border: 0px; color: green; font-style: italic; margin: 0px; padding: 0px;&quot;&gt; Do nothing 
&lt;/span&gt;    }
}

&lt;span class=&quot;code-keyword&quot; style=&quot;border: 0px; color: blue; margin: 0px; padding: 0px;&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;code-keyword&quot; style=&quot;border: 0px; color: blue; margin: 0px; padding: 0px;&quot;&gt;override&lt;/span&gt; &lt;span class=&quot;code-keyword&quot; style=&quot;border: 0px; color: blue; margin: 0px; padding: 0px;&quot;&gt;void&lt;/span&gt; OnPreRender(EventArgs e)
{
    ViewState[&lt;span class=&quot;code-string&quot; style=&quot;border: 0px; color: purple; margin: 0px; padding: 0px;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;border: 0px; color: purple; margin: 0px; padding: 0px;&quot;&gt;update&quot;&lt;/span&gt;] = Session[&lt;span class=&quot;code-string&quot; style=&quot;border: 0px; color: purple; margin: 0px; padding: 0px;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;border: 0px; color: purple; margin: 0px; padding: 0px;&quot;&gt;update&quot;&lt;/span&gt;];
}&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/1185356457686254605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2012/09/refresh-page-issue-in-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/1185356457686254605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/1185356457686254605'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2012/09/refresh-page-issue-in-aspnet.html' title='Refresh Page Issue in ASP.Net'/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-7155505559878621284</id><published>2012-07-07T03:30:00.001-07:00</published><updated>2012-07-07T03:30:59.896-07:00</updated><title type='text'>One Simple Procedure for Cursor.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
Procedure That make insertion into table according weekdays which weekday data I have in my one table.&lt;br /&gt;
&lt;br /&gt;
ALTER PROC [dbo].[CRS_VehicleAdultChildPrice_Flat] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
@pk_VehiclePriceID int, &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
@WEEKDAYID NVARCHAR (255),&lt;br /&gt;
@SeasonEndDate NVARCHAR(25), &lt;br /&gt;
@SeasonStartDate NVARCHAR(25) &amp;nbsp; &amp;nbsp;&lt;br /&gt;
AS &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
DECLARE @fkVehiclePriceID int &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
DECLARE @SessionDate &amp;nbsp;NVARCHAR(25) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
DECLARE @ChildNo int &lt;br /&gt;
DECLARE @ChildMinAge int &lt;br /&gt;
DECLARE @ChildMaxAge int &amp;nbsp; &amp;nbsp;&lt;br /&gt;
DECLARE @AdultPrice decimal(18,2)&lt;br /&gt;
DECLARE @ChildPrice decimal(18,2) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
DECLARE @TourDate datetime &amp;nbsp; &amp;nbsp; &lt;br /&gt;
DECLARE @Culture nvarchar(10) &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
DECLARE @CreatedBy nvarchar(255) &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
DECLARE @ModifiedBy nvarchar(255) &amp;nbsp; &amp;nbsp;&lt;br /&gt;
DECLARE @timings nvarchar(1000) &amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
DECLARE @CUR CURSOR &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
DECLARE @CURDATE CURSOR &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
SET @CUR = CURSOR FOR SELECT &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
pk_VehiclePriceID &amp;nbsp; &amp;nbsp; &lt;br /&gt;
,AdultPrice&lt;br /&gt;
,VMS_TBL_VehiclePrice.Culture &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
,VMS_TBL_VehiclePrice.CreatedBy &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
,VMS_TBL_VehiclePrice.ModifiedBy&lt;br /&gt;
,VMS_TBL_VehiclePrice.timing&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;FROM VMS_TBL_VehiclePrice &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
INNER JOIN VMS_VehicleAdultPrice_Detail ON VMS_VehicleAdultPrice_Detail.fkVehiclePriceId=VMS_TBL_VehiclePrice.pk_VehiclePriceID &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
WHERE pk_VehiclePriceID=@pk_VehiclePriceID ORDER BY pk_VehiclePriceID &amp;nbsp; &amp;nbsp; &lt;br /&gt;
OPEN @CUR &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
FETCH NEXT &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
FROM @CUR INTO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
@fkVehiclePriceID, &amp;nbsp; &amp;nbsp; &lt;br /&gt;
@AdultPrice, &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
@Culture, &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
@CreatedBy, &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
@ModifiedBy,&lt;br /&gt;
@timings &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
WHILE @@FETCH_STATUS = 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
BEGIN &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;SET @CURDATE = CURSOR FOR SELECT &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;DATE_NAME FROM TBL_DATE_WEEKDAY WHERE WEEKDAYID IN (SELECT * FROM DBO.SPLIT(@WEEKDAYID,&#39;,&#39;)) AND ( CONVERT(DATETIME,DATE_NAME)&amp;gt;=Convert(DATETIME,@SeasonStartDate) AND CONVERT(DATETIME,DATE_NAME) &amp;lt;=Convert(DATETIME,@SeasonEndDate)) &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;OPEN @CURDATE &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;FETCH NEXT &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;FROM @CURDATE INTO @SessionDate &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;print @@FETCH_STATUS &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;WHILE @@FETCH_STATUS = 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;BEGIN &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;print @SessionDate &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;INSERT INTO VMS_VehicleAdultPrice_Flat(fkVehiclePriceID, AdultPrice,TourDate, Culture, CreatedBy, CreatedOnDate, ModifiedBy, ModifiedOnDate, Row_Guid, Row_Status,timings) &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VALUES(@fkVehiclePriceID,@AdultPrice,@SessionDate ,@Culture,@CreatedBy,GETDATE(),@ModifiedBy,GETDATE(),NEWID(),1,@timings) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;FETCH NEXT &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;FROM @CURDATE INTO @SessionDate &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;END &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;CLOSE @CURDATE &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;DEALLOCATE @CURDATE &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
FETCH NEXT &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
FROM @CUR INTO @fkVehiclePriceID, &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
@AdultPrice, &amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
@Culture, &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
@CreatedBy, &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
@ModifiedBy,&lt;br /&gt;
@timings &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
END &amp;nbsp; &amp;nbsp; &lt;br /&gt;
CLOSE @CUR &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
DEALLOCATE @CUR&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SET @CUR = CURSOR FOR SELECT &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
pk_VehiclePriceID &amp;nbsp; &amp;nbsp; &lt;br /&gt;
,ChildNo&lt;br /&gt;
,ChildMinAge&lt;br /&gt;
,ChildMaxAge&lt;br /&gt;
,ChildPrice&lt;br /&gt;
&lt;br /&gt;
,VMS_TBL_VehiclePrice.Culture &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
,VMS_TBL_VehiclePrice.CreatedBy &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
,VMS_TBL_VehiclePrice.ModifiedBy&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;FROM VMS_TBL_VehiclePrice &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
INNER JOIN VMS_TBL_ChildPrice_Detail ON VMS_TBL_ChildPrice_Detail.fkVehiclePriceId=VMS_TBL_VehiclePrice.pk_VehiclePriceID &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
WHERE pk_VehiclePriceID=@pk_VehiclePriceID ORDER BY pk_VehiclePriceID &amp;nbsp; &amp;nbsp; &lt;br /&gt;
OPEN @CUR &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
FETCH NEXT &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
FROM @CUR INTO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
@fkVehiclePriceID, &lt;br /&gt;
@ChildNo, &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
@ChildMinAge, &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
@ChildMaxAge, &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
@ChildPrice, &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
@Culture, &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
@CreatedBy, &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
@ModifiedBy &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
WHILE @@FETCH_STATUS = 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
BEGIN &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;SET @CURDATE = CURSOR FOR SELECT &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;DATE_NAME FROM TBL_DATE_WEEKDAY WHERE WEEKDAYID IN (SELECT * FROM DBO.SPLIT(@WEEKDAYID,&#39;,&#39;)) AND ( CONVERT(DATETIME,DATE_NAME)&amp;gt;=Convert(DATETIME,@SeasonStartDate) AND CONVERT(DATETIME,DATE_NAME) &amp;lt;=Convert(DATETIME,@SeasonEndDate)) &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;OPEN @CURDATE &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;FETCH NEXT &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;FROM @CURDATE INTO @SessionDate &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;print @@FETCH_STATUS &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;WHILE @@FETCH_STATUS = 0 &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;BEGIN &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;print @SessionDate &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; INSERT INTO VMS_VehicleChildPrice_Flat(fkVehiclePriceID, ChildNo, ChildMinAge, ChildMaxAge, ChildPrice, TourDate, Culture, CreatedBy, CreatedOnDate, ModifiedBy, ModifiedOnDate, Row_Guid, Row_Status) &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VALUES(@fkVehiclePriceID, @ChildNo, @ChildMinAge, @ChildMaxAge,@ChildPrice,@SessionDate ,@Culture,@CreatedBy,GETDATE(),@ModifiedBy,GETDATE(),NEWID(),1) &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;FETCH NEXT &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;FROM @CURDATE INTO @SessionDate &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;END &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;CLOSE @CURDATE &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;DEALLOCATE @CURDATE &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
FETCH NEXT &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
FROM @CUR INTO @fkVehiclePriceID, &amp;nbsp; &lt;br /&gt;
@ChildNo, &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
@ChildMinAge, &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
@ChildMaxAge, &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
@ChildPrice,&lt;br /&gt;
@Culture, &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
@CreatedBy, &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
@ModifiedBy &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
END &amp;nbsp; &amp;nbsp; &lt;br /&gt;
CLOSE @CUR &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
DEALLOCATE @CUR&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/7155505559878621284/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2012/07/one-simple-procedure-for-cursor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/7155505559878621284'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/7155505559878621284'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2012/07/one-simple-procedure-for-cursor.html' title='One Simple Procedure for Cursor.'/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-3700936405107501775</id><published>2012-07-07T03:26:00.004-07:00</published><updated>2012-07-07T03:26:30.002-07:00</updated><title type='text'>Time Drop Down Filling.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&amp;nbsp;public void GetTiming()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ArrayList aTime = new ArrayList();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int interval = Convert.ToInt32(txtTimeInterval.Text);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DateTime EndTime = Convert.ToDateTime(txtEndTime.Text);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DateTime StartTime = Convert.ToDateTime(txtStartTime.Text);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = interval; i &amp;lt;= 1440+1; i++ )&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (StartTime != EndTime)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aTime.Add(StartTime.ToString(&quot;HH:mm&quot;));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; StartTime = StartTime.AddMinutes(interval);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (StartTime == EndTime)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; aTime.Add(StartTime.ToString(&quot;HH:mm&quot;));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chkTiming.DDList.DataSource = aTime;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chkTiming.DataBind();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; chktime.Visible = true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/3700936405107501775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2012/07/time-drop-down-filling.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/3700936405107501775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/3700936405107501775'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2012/07/time-drop-down-filling.html' title='Time Drop Down Filling.'/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-656434383760932848</id><published>2012-07-07T03:25:00.001-07:00</published><updated>2012-07-07T03:25:25.592-07:00</updated><title type='text'>Regular Expression For Specific Time Format(&quot;HH:MM&quot;)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
asp:TextBox ID=&quot;txtStartTime&quot; runat=&quot;server&quot; Width=&quot;100&quot; asp:TextBox&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; &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; asp:RequiredFieldValidator ID=&quot;RequiredFieldValidator11&quot; runat=&quot;server&quot; ControlToValidate=&quot;txtStartTime&quot;&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; &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; Display=&quot;None&quot; ErrorMessage=&quot;Start Time missing&quot; SetFocusOnError=&quot;True&quot;&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; &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; ValidationGroup=&quot;validComboAddGrp&quot; asp:RequiredFieldValidator&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; &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; asp:RegularExpressionValidator ID=&quot;regextxtSessionTime&quot; runat=&quot;server&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ControlToValidate=&quot;txtStartTime&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ValidationExpression=&quot;^([0-1][0-9]|[2][0-3]):([0-5][0-9])$&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ErrorMessage=&quot;You must enter a valid time. Format: HH:MM&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Display=&quot;none&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; SetFocusOnError=&quot;true&quot; ValidationGroup=&quot;validComboAddGrp&quot;&lt;br /&gt;
&amp;nbsp; asp:RegularExpressionValidator&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/656434383760932848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2012/07/regular-expression-for-specific-time.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/656434383760932848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/656434383760932848'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2012/07/regular-expression-for-specific-time.html' title='Regular Expression For Specific Time Format(&quot;HH:MM&quot;)'/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-7747095274400169968</id><published>2012-04-28T02:20:00.001-07:00</published><updated>2012-04-28T02:25:15.500-07:00</updated><title type='text'>Bind Table using javascript like grid or repeater.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
Bind Any Table which comes from code behind stored procedure calling....Like this simply make a method which is webmethod into code behind and call it on client side.The Total code is below I am writing here.&lt;br /&gt;
//--------------------Bind Elective Papers on Change Of Specialization------------------&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; function ShowElectivePapers() {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var dCID = document.getElementById(&#39;&amp;lt;%= ddlCourse.ClientID%&amp;gt;&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var CourseID = dCID.options[dCID.selectedIndex].value;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var dSID = document.getElementById(&#39;&amp;lt;%= ddlSemester.ClientID%&amp;gt;&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var SemID = dSID.options[dSID.selectedIndex].value;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var dSpec = document.getElementById(&#39;&amp;lt;%= ddlSpecialization.ClientID%&amp;gt;&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var SpecID = dSpec.options[dSpec.selectedIndex].value;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (SpecID != 0) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BindElectivePapers(CourseID, SemID, SpecID);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; function BindElectivePapers(CCode, SemId, Spec) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $.ajax({&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; type: &quot;POST&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; url: &quot;StudentRegistration.aspx/BindElectivePapers&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contentType: &quot;application/json; charset=utf-8&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data: &quot;{&#39;CCode&#39;: &#39;&quot; + CCode + &quot;&#39;,&#39;SemId&#39;: &#39;&quot; + SemId + &quot;&#39;,&#39;Spec&#39;: &#39;&quot; + Spec + &quot;&#39;}&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dataType: &quot;json&quot;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; async: false,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; success: AjaxSucceeded,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; error: AjaxFailed&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; function AjaxSucceeded(result) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DisplayChildren(result);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; function AjaxFailed(result) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; alert(&#39;no success&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; function DisplayChildren(result) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var dtEpaper = eval(result.d);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (dtEpaper != null &amp;amp;&amp;amp; typeof (dtEpaper) == &quot;object&quot;) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; document.getElementById(&#39;&amp;lt;%= dvElectivePapers.ClientID%&amp;gt;&#39;).style.display = &#39;&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var s = new Array();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s[s.length] = &quot;&lt;br /&gt;
&lt;div class=&quot;box_bot&quot;&gt;
&lt;div class=&quot;box_l&quot;&gt;
Elective Papers&lt;/div&gt;
&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s[s.length] = &quot;&lt;br /&gt;
&lt;div class=&quot;box_sep4&quot;&gt;
&lt;/div&gt;
&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s[s.length] = &quot;&lt;br /&gt;
&lt;div class=&quot;box_msgr&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;&quot;&gt;
&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s[s.length] = &quot;&lt;br /&gt;
&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s[s.length] = &quot;&lt;br /&gt;
&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s[s.length] = &quot;&lt;br /&gt;
&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s[s.length] = &quot;&lt;br /&gt;
&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s[s.length] = &quot;&lt;br /&gt;
&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (var i = 0; i &amp;lt; dtEpaper.Table.length; i++) {&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; s[s.length] = &quot;&lt;br /&gt;
&quot;;&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; s[s.length] = &quot;&lt;br /&gt;
&quot;;&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; s[s.length] = &quot;&lt;br /&gt;
&quot;;&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; s[s.length] = &quot;&lt;br /&gt;
&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s[s.length] = &quot;&lt;br /&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; class=&quot;format&quot; style=&quot;background: none; border: none; font: normal normal 11px arial; text-align: left; width: 95%;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th&gt;Paper Code&lt;/th&gt;&lt;th&gt;Paper Name&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&quot; + dtEpaper.Table[i].Code + &quot;&lt;/td&gt;&lt;td&gt;&quot; + dtEpaper.Table[i].SubName + &quot;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s[s.length] = &quot;&lt;/div&gt;
&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; document.getElementById(&quot;&amp;lt;%= dvElectivePapers.ClientID%&amp;gt;&quot;).innerHTML = s.join(&quot;&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; document.getElementById(&#39;&amp;lt;%= dvElectivePapers.ClientID%&amp;gt;&#39;).style.display = &#39;none&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // -----------------------.cs Code with stored procedure caliing--------------&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;#region &quot;BindElectivePapers&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; [WebMethod]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public static Dictionary&lt;string, object=&quot;&quot;&gt; BindElectivePapers(string CCode, string SemId, string Spec)&lt;/string,&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CommonManger Obj = new CommonManger();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DataTable objEPaper = new DataTable();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; objEPaper = Obj.GetTableWithParameter(&quot;SP_GetElectivePapers_ViaSpecialization&quot;, &quot;@CrsID&quot;, CCode, &quot;@Sem&quot;, SemId, &quot;@CrsSpl&quot;, Spec);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (objEPaper.Rows.Count &amp;gt; 0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return JsonMethods.ToJson(objEPaper);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return null;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; #endregion&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/7747095274400169968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2012/04/bind-any-table-which-comes-from-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/7747095274400169968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/7747095274400169968'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2012/04/bind-any-table-which-comes-from-code.html' title='Bind Table using javascript like grid or repeater.'/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-8137553395276184484</id><published>2012-04-25T05:22:00.001-07:00</published><updated>2012-04-25T05:22:22.079-07:00</updated><title type='text'>Make custom order in sql</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
Hi,&lt;br /&gt;
I can also make my query according to my customization order called Custom Order .It works as i want in which order my out will show .As simple as it is...&lt;br /&gt;
SELECT COUNT(*)StudentCount,SessionCode FROM dbo.tblStudentNEDESROLL GROUP BY SessionCode ORDER BY CASE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN SessionCode = &#39;0110&#39; THEN 1&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN SessionCode = &#39;0710&#39; THEN 2&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN SessionCode = &#39;0111&#39; THEN 3&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN SessionCode = &#39;0711&#39; THEN 4&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; WHEN SessionCode = &#39;0112&#39; THEN 5&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;END&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/8137553395276184484/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2012/04/make-custom-order-in-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/8137553395276184484'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/8137553395276184484'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2012/04/make-custom-order-in-sql.html' title='Make custom order in sql'/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-4510554709752594093</id><published>2012-04-20T00:09:00.000-07:00</published><updated>2012-04-20T00:09:26.941-07:00</updated><title type='text'>Set Default database in sql on New Query</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;pre class=&quot;lang-sql prettyprint&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;This is to set any database when U want any database come to add query.In ur sql.&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre class=&quot;lang-sql prettyprint&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eeeeee; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: darkblue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Exec&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; sp_defaultdb &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;loginame&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: maroon; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&#39;login&#39;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;defdb&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: maroon; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&#39;master&#39;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/4510554709752594093/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2012/04/set-default-database-in-sql-on-new.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/4510554709752594093'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/4510554709752594093'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2012/04/set-default-database-in-sql-on-new.html' title='Set Default database in sql on New Query'/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-8409690075879261198</id><published>2012-01-22T22:06:00.000-08:00</published><updated>2012-01-22T22:06:29.784-08:00</updated><title type='text'>Check checkbox only in Repeater not outside of this control</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
This is the code for finding particular checkbox in repeater only .it will leave the checkboxes which &amp;nbsp;outside repeater &amp;nbsp;of the page.I hope it will do what you want exactly ....enjoy coding....!!!&lt;br /&gt;
&lt;br /&gt;
function checkAll(cb) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var TargetBaseControl = document.getElementById(&#39;pnlData&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var TargetChildControl = &quot;chkisPassout&quot;;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var ctrls = document.getElementsByTagName(&#39;input&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (var i = 0; i &amp;lt; ctrls.length; i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var cbox = ctrls[i];&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (cbox.type == &quot;checkbox&quot; &amp;amp;&amp;amp; cbox.id.indexOf(TargetChildControl,0) &amp;gt;= 0)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cbox.checked = cb.checked;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/8409690075879261198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2012/01/check-checkbox-only-in-repeater-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/8409690075879261198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/8409690075879261198'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2012/01/check-checkbox-only-in-repeater-not.html' title='Check checkbox only in Repeater not outside of this control'/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7672659559436266052.post-161170717360935428</id><published>2011-12-22T23:50:00.000-08:00</published><updated>2011-12-22T23:53:28.374-08:00</updated><title type='text'>Call JavaScript function Server Side button_onclick</title><content type='html'>You can easily call any javascript anywhere on page by this code simply....&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), &quot;Key&quot;, &quot;script language=&#39;javascript&#39;&amp;gt;alert(&quot;msg&quot;);script&quot;, false);&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mastpiyush.blogspot.com/feeds/161170717360935428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mastpiyush.blogspot.com/2011/12/call-javascript-function-server-side_22.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/161170717360935428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7672659559436266052/posts/default/161170717360935428'/><link rel='alternate' type='text/html' href='http://mastpiyush.blogspot.com/2011/12/call-javascript-function-server-side_22.html' title='Call JavaScript function Server Side button_onclick'/><author><name>Piyush Sen</name><uri>http://www.blogger.com/profile/12274631323279189038</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmPRYzzzu8-qJkdb7ri3NJn_6NNl_Y7v6iwUeYgHaEDPYyaxNw2-wmTcjtpSk25ZNTSki2OdzyCZA4YUjLOQjrCqkkeO9bWrE9I6ZZKQ72kNMy3A4ybQYyzzZ2T_wA034/s220/IMG_0007.JPG'/></author><thr:total>1</thr:total></entry></feed>