<?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-604929889687548566</id><updated>2024-09-04T16:50:31.809-07:00</updated><category term="Concepts"/><category term="LINQ Concepts"/><category term="HttpWebResponse"/><category term="Inputstream"/><category term="JavaScript"/><category term="stream"/><category term="streamwriter"/><title type='text'>Dot-Net Programming Tips</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>29</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-3314859835027150764</id><published>2012-08-23T05:13:00.000-07:00</published><updated>2012-08-23T05:13:43.710-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HttpWebResponse"/><category scheme="http://www.blogger.com/atom/ns#" term="Inputstream"/><category scheme="http://www.blogger.com/atom/ns#" term="stream"/><category scheme="http://www.blogger.com/atom/ns#" term="streamwriter"/><title type='text'>How to read the data from request URL and response stream value to request URL?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
HttpWebRequest class sending the data using streamwriter and getting response from particular URL.&lt;br /&gt;
&lt;br /&gt;
ex..&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
string strUrl=&quot;website&quot;;&lt;br /&gt;
HttpWebRequest request = WebRequest.Create(string.Format(strUrl, &quot;valid&quot;)) as HttpWebRequest;&lt;br /&gt;
request.Method = strMethod;&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; request.ContentType = &quot;text/xml; charset=utf-8&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; request.ContentLength = PostData.Length;&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; request.KeepAlive = false;&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; writer = new StreamWriter(request.GetRequestStream());&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; writer.Write(PostData);&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; writer.Close();&lt;/blockquote&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HttpWebResponse Response = (HttpWebResponse)request.GetResponse();&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; Stream GetDataStream = Response.GetResponseStream();&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; StreamReader GetDatafromStream = new StreamReader(GetDataStream);&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; acknownledgementresp = GetDatafromStream.ReadToEnd();&lt;br /&gt;
&lt;br /&gt;
In ASPX Page&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.IO.Stream str; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Int32 strLen, strRead;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; str = Request.InputStream;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strLen = Convert.ToInt32(str.Length);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; byte[] strArr = new byte[strLen];&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strRead = str.Read(strArr, 0, strLen);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string DataReceived = System.Text.Encoding.Default.GetString(strArr);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.ContentType = &quot;text&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Clear();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.BufferOutput = false; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; byte[] bytes = System.Text.Encoding.UTF8.GetBytes(ReceivedData);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.OutputStream.Write(bytes, 0, bytes.Length);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Flush();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.End();&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/3314859835027150764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2012/08/how-to-read-data-from-request-url-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/3314859835027150764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/3314859835027150764'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2012/08/how-to-read-data-from-request-url-and.html' title='How to read the data from request URL and response stream value to request URL?'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-6073438673360969710</id><published>2012-08-16T21:54:00.001-07:00</published><updated>2012-08-16T21:55:35.053-07:00</updated><title type='text'>dynamically POST the FORM to third party URL / Site</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;b&gt;&amp;nbsp;We want to POST FORM to third party URL or any other site. But in ASP.Net pages we cant do directly. so below customized function to send FORM dynamically.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;private void ResponseToClient()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br /&gt;&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;&amp;nbsp; NameValueCollection data = new NameValueCollection();&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; data.Add(&quot;Field1&quot;, &quot;val1&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; data.Add(&quot;Field2&quot;, &quot;val2&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; string ResponseURL = &quot;responsesimulator.aspx&quot;;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string strForm = ConstructInternalFormToPost(ResponseURL, data);&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; this.Page.Controls.Add(new LiteralControl(strForm));&lt;br /&gt;&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; catch (Exception Ex)&lt;br /&gt;&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;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private static String ConstructInternalFormToPost(string url, NameValueCollection data)&lt;br /&gt;&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; string tmpformID = &quot;PostForm&quot;;&lt;br /&gt;&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; StringBuilder strConstructForm = new StringBuilder();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strConstructForm.Append(&quot;&amp;lt;form id=\&quot;&quot; + tmpformID + &quot;\&quot; name=\&quot;&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; tmpformID + &quot;\&quot; action=\&quot;&quot; + url +&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; &quot;\&quot; method=\&quot;POST\&quot;&amp;gt;&quot;);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (string key in data)&lt;br /&gt;&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;&amp;nbsp; strConstructForm.Append(&quot;&amp;lt;input type=\&quot;hidden\&quot; name=\&quot;&quot; + key +&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; &quot;\&quot; value=\&quot;&quot; + data[key] + &quot;\&quot;&amp;gt;&quot;);&lt;br /&gt;&amp;nbsp;&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; strConstructForm.Append(&quot;&amp;lt;/form&amp;gt;&quot;);&lt;br /&gt;&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; StringBuilder ConstructScript = new StringBuilder();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ConstructScript.Append(&quot;&amp;lt;script language=&#39;javascript&#39;&amp;gt;&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ConstructScript.Append(&quot;var v&quot; + tmpformID + &quot; = document.&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; tmpformID + &quot;;&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ConstructScript.Append(&quot;v&quot; + tmpformID + &quot;.submit();&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ConstructScript.Append(&quot;&amp;lt;/script&amp;gt;&quot;);&lt;br /&gt;&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; return strConstructForm.ToString() + ConstructScript.ToString();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/6073438673360969710/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2012/08/dynamically-post-form-to-third-party.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/6073438673360969710'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/6073438673360969710'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2012/08/dynamically-post-form-to-third-party.html' title='dynamically POST the FORM to third party URL / Site'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-3692211051604293911</id><published>2012-08-14T02:06:00.000-07:00</published><updated>2012-08-14T02:06:01.871-07:00</updated><title type='text'>New Features of Visual Studio 2012 and .Net 4.5</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Thanks to telerik team....&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/AVvXsEjvCS9FMagYEUuaPA5CBJW-e3iDBkz-KiW8HKq24oWui1XDII-Om35hZYoR55_xULrU3SFlnuFDgxKQTPT7Psjq57nLAG7SEMdWD46ZOA4OtNvjjUXxaE7DNRKg2D6m4wnzmcjay-1_VvXZ/s1600/page_10.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;544&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvCS9FMagYEUuaPA5CBJW-e3iDBkz-KiW8HKq24oWui1XDII-Om35hZYoR55_xULrU3SFlnuFDgxKQTPT7Psjq57nLAG7SEMdWD46ZOA4OtNvjjUXxaE7DNRKg2D6m4wnzmcjay-1_VvXZ/s640/page_10.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEiq3bx0YXX2zW1tqY4s57ikx9hOmHzHTsFdEbhq2oXDaGbVF-lWCdtp1tZ6mnOl6KuJP5evYskXfkznQBhXO1EnBaksp0PNsToneQYHPP-SBR0iK-txymmtMAw1yovrEfB3SGQ1hD7zaq9w/s1600/page_11.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;544&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq3bx0YXX2zW1tqY4s57ikx9hOmHzHTsFdEbhq2oXDaGbVF-lWCdtp1tZ6mnOl6KuJP5evYskXfkznQBhXO1EnBaksp0PNsToneQYHPP-SBR0iK-txymmtMAw1yovrEfB3SGQ1hD7zaq9w/s640/page_11.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEgFWsDjaGk1YFIPLj3DVncns9Pc1bgl7iGIqNckUXMNuBz1g4K9-Ljn3Nlia0DXlpxjiuAwJzWCkYRhhxqQD261BlhlA8Bh-Zm_J4zIABO9eAm6fdn0cm6WpsQhFScobpUMSrvv1IDzDm1t/s1600/page_12.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;544&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFWsDjaGk1YFIPLj3DVncns9Pc1bgl7iGIqNckUXMNuBz1g4K9-Ljn3Nlia0DXlpxjiuAwJzWCkYRhhxqQD261BlhlA8Bh-Zm_J4zIABO9eAm6fdn0cm6WpsQhFScobpUMSrvv1IDzDm1t/s640/page_12.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEiPzpTISO2hGsMdoewSGiZzZJRwR73c_rzQwDE33_BaebsxWYu48bUodIClwu2ox2yOoGo7nKZ2k2gcOU9pBS0rDo9QmkXFV2A4LyWdHi9JsWHMGM86CBIvGPTGFDKumZ0JBVT8B8bU6HoG/s1600/page_13.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;544&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPzpTISO2hGsMdoewSGiZzZJRwR73c_rzQwDE33_BaebsxWYu48bUodIClwu2ox2yOoGo7nKZ2k2gcOU9pBS0rDo9QmkXFV2A4LyWdHi9JsWHMGM86CBIvGPTGFDKumZ0JBVT8B8bU6HoG/s640/page_13.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEi4PJIwVb-ZDVXFw-KvH9xj0c8U2DL1yEpP0CjeG9uAiv-ACemV8jPIMjBhb-V2zwbiKEWHFbx4oWdSDF4gsRbW1vJhqB-u8xM7_BEOscPbXIgnBkQeLPQjG_Q_7-4covPg4G4d8cb7tcv0/s1600/page_14.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;544&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4PJIwVb-ZDVXFw-KvH9xj0c8U2DL1yEpP0CjeG9uAiv-ACemV8jPIMjBhb-V2zwbiKEWHFbx4oWdSDF4gsRbW1vJhqB-u8xM7_BEOscPbXIgnBkQeLPQjG_Q_7-4covPg4G4d8cb7tcv0/s640/page_14.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEj6-CFBzpUdXKCVLNhwiWaCcuXXKbtz7Grgw0OGHr5v3j29dJ2K_WSrRvMY8QMREH7CMxqv_Jf9XjVpIY1BCOlIM8LH76MXpxtt1wttHq6K8RfOroaxoNu4uiOVCatUVOiwSvFcqpp_3tnE/s1600/page_15.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;544&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6-CFBzpUdXKCVLNhwiWaCcuXXKbtz7Grgw0OGHr5v3j29dJ2K_WSrRvMY8QMREH7CMxqv_Jf9XjVpIY1BCOlIM8LH76MXpxtt1wttHq6K8RfOroaxoNu4uiOVCatUVOiwSvFcqpp_3tnE/s640/page_15.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEiYnvOp2WkWF3xkgXW6z3tgJ_kTYy6m8VOF9h_iW0n9GNYifKJQ06eDuI7jkwQFNWtshaMIJLe6KqUv4P8BuCjtvUXxOUKswVe7o8mcxsdpe3097oj_MOYgO4QZatiF_zr3b27YyPINCZac/s1600/page_16.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;544&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYnvOp2WkWF3xkgXW6z3tgJ_kTYy6m8VOF9h_iW0n9GNYifKJQ06eDuI7jkwQFNWtshaMIJLe6KqUv4P8BuCjtvUXxOUKswVe7o8mcxsdpe3097oj_MOYgO4QZatiF_zr3b27YyPINCZac/s640/page_16.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEjJgmEamw-Y3iYMPf_WqsDzGOnIF78686oz6PVdAQnQeOV2yTcFmxatcufKoIxmChZkT0HK54jOkrCgpWe2IKZmfVbmxmvYcEKfo6qHGqjXSfpWOS-ATRrZo_7g74Jm4ImUe7TULFdV80q-/s1600/page_17.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;544&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJgmEamw-Y3iYMPf_WqsDzGOnIF78686oz6PVdAQnQeOV2yTcFmxatcufKoIxmChZkT0HK54jOkrCgpWe2IKZmfVbmxmvYcEKfo6qHGqjXSfpWOS-ATRrZo_7g74Jm4ImUe7TULFdV80q-/s640/page_17.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEiiajx5zZt-7qDZLPS1QmAhmwvyHp5TeOhGhqEboIDVA0GGsXb65A-7TqMge-7HGQNrRyTyU-x6Fcp5wXxdJ2GudyLT3Hp0X9HenyVY6cM1sezlLXzj1LU_P17-Pdo5bJYqhHaoPGlkdsSp/s1600/page_18.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;544&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiajx5zZt-7qDZLPS1QmAhmwvyHp5TeOhGhqEboIDVA0GGsXb65A-7TqMge-7HGQNrRyTyU-x6Fcp5wXxdJ2GudyLT3Hp0X9HenyVY6cM1sezlLXzj1LU_P17-Pdo5bJYqhHaoPGlkdsSp/s640/page_18.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEi2_aUrxg6ZbAqBWA2BLANlax6PmuujF-dnL6mOlpSWGi7lHSoEQibGN4iBkmcgilDlFiqG8XEYweIb4Wh8JIzEjge4XzS7bKmo_NCIWmfDc4bMWaysf-fYot_9r85vwgbPTUgJDyf_EB5S/s1600/page_19.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;544&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2_aUrxg6ZbAqBWA2BLANlax6PmuujF-dnL6mOlpSWGi7lHSoEQibGN4iBkmcgilDlFiqG8XEYweIb4Wh8JIzEjge4XzS7bKmo_NCIWmfDc4bMWaysf-fYot_9r85vwgbPTUgJDyf_EB5S/s640/page_19.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEhLxcIE0WzcRKP-dN1T86A_5S_9KktzYyRfjG9I77tJuJyGLXmihOjheNiHuA6DSdvf3yj3jJawdhLuQ_2Vydm1IiCuYZth70yTQGZ3InzsfCWpJpPud9PGJH0I6L4ZwaPcjjZ_UJq79Azw/s1600/page_2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;544&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLxcIE0WzcRKP-dN1T86A_5S_9KktzYyRfjG9I77tJuJyGLXmihOjheNiHuA6DSdvf3yj3jJawdhLuQ_2Vydm1IiCuYZth70yTQGZ3InzsfCWpJpPud9PGJH0I6L4ZwaPcjjZ_UJq79Azw/s640/page_2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEiTPqzOw-IrCIEiy4Z8Zp4QbEK1rk3zcqcty_U00hvSgg7Y7LbHfTD3AWhluu_DiqeppPFsExW8Usg_tyUznrdKiBQl6GnyRevzSSC9COzLXmoTQ0rZxfL3uzYjyFdH6BIgHcfEaVK-Bo7Q/s1600/page_20.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;544&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiTPqzOw-IrCIEiy4Z8Zp4QbEK1rk3zcqcty_U00hvSgg7Y7LbHfTD3AWhluu_DiqeppPFsExW8Usg_tyUznrdKiBQl6GnyRevzSSC9COzLXmoTQ0rZxfL3uzYjyFdH6BIgHcfEaVK-Bo7Q/s640/page_20.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEgUXW9OceTuNKKnWe9q99psn8s9W7-6tHKSupqMyI-xUWz_sKXCz700pT3EfWHztse9U4C-sGQu7e2Vw7kqURR7NFpkArw0f9c-pdCxDBE7WLFuWjlM7jZgZmOsBikfHKGc6QkC1pTgiLxi/s1600/page_3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;544&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUXW9OceTuNKKnWe9q99psn8s9W7-6tHKSupqMyI-xUWz_sKXCz700pT3EfWHztse9U4C-sGQu7e2Vw7kqURR7NFpkArw0f9c-pdCxDBE7WLFuWjlM7jZgZmOsBikfHKGc6QkC1pTgiLxi/s640/page_3.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEhkDbcZRZJ-meqNNxliEvL4gukWpHhUdXJyGXKtIgiW8pU5pwjWcu7gssfVAI_eWzTFXmZtkaOROpKyAs9K3uNnhIC-6_nRD8sEksv2IW-cldux33p58bcwOVUfOGO71Te4Z4s4H5Mo40Yq/s1600/page_4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;544&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkDbcZRZJ-meqNNxliEvL4gukWpHhUdXJyGXKtIgiW8pU5pwjWcu7gssfVAI_eWzTFXmZtkaOROpKyAs9K3uNnhIC-6_nRD8sEksv2IW-cldux33p58bcwOVUfOGO71Te4Z4s4H5Mo40Yq/s640/page_4.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEgTEIKSU5h9fET1kmoCqHbmO6xBEfgGjN3mu0joiTcc687dt-q2cNxsk-fIj6mt3KbAYs-wsbroB72vJeAa0OXHNf52xIeZHVmxf036U7i-ZPLBxB31b98PQ5iYqO1j2CFgUVhyVc4yjzx6/s1600/page_5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;544&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTEIKSU5h9fET1kmoCqHbmO6xBEfgGjN3mu0joiTcc687dt-q2cNxsk-fIj6mt3KbAYs-wsbroB72vJeAa0OXHNf52xIeZHVmxf036U7i-ZPLBxB31b98PQ5iYqO1j2CFgUVhyVc4yjzx6/s640/page_5.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEjBi3P5pGvpA4p6e1Mk3flW8t02N0XjBGQMeOqp9bkgchbJQeGojXHaccD4TzCcCUCcwmNFt0HcBoQ5C02akDbi9nXbg3tXEh4CLNbTdjxsOkLWbJ-w2IrSPOGTT-aZGNf3wO6TeFw8Q2Mx/s1600/page_6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;544&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBi3P5pGvpA4p6e1Mk3flW8t02N0XjBGQMeOqp9bkgchbJQeGojXHaccD4TzCcCUCcwmNFt0HcBoQ5C02akDbi9nXbg3tXEh4CLNbTdjxsOkLWbJ-w2IrSPOGTT-aZGNf3wO6TeFw8Q2Mx/s640/page_6.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEj5j8qVib-zQ0SF7AZg8M37vdIOjenyAjzSZ4lagSxuiSdk9M3bKGl0BvsOKCG3blzWcMpaQ_9j0AjsphUH18CmaX8nnYhmerkMOBajwY0q-koPlkkvLOPIH5CgSrTWZEHyGHz_YgfqXuuy/s1600/page_7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;544&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5j8qVib-zQ0SF7AZg8M37vdIOjenyAjzSZ4lagSxuiSdk9M3bKGl0BvsOKCG3blzWcMpaQ_9j0AjsphUH18CmaX8nnYhmerkMOBajwY0q-koPlkkvLOPIH5CgSrTWZEHyGHz_YgfqXuuy/s640/page_7.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEg92JH_PnH1HO3WdT5S0tKIZzLFb9UviuzAdS1WKYC65ORuS2J7I6jXnlxEdzf1pUTyCNOfQELk1tFEXYmPOam0iR46u4Kp5J0oLkf4h3OmXGLmx8O-KEoF0yg4o6A-qabWKSdmxk30mvAP/s1600/page_8.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;544&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg92JH_PnH1HO3WdT5S0tKIZzLFb9UviuzAdS1WKYC65ORuS2J7I6jXnlxEdzf1pUTyCNOfQELk1tFEXYmPOam0iR46u4Kp5J0oLkf4h3OmXGLmx8O-KEoF0yg4o6A-qabWKSdmxk30mvAP/s640/page_8.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEivstaN7Q_dRQ9_rPsE9gpjXFi2I1wPrLQgjyhgWVU5ewyx2qATIFdjAbR_j2P0beZLP13NF43VPVjmsbTDEWgBQmRaTr5ypRh-Ouw3ljDYySSENloR_WCelKivBmTAxehcpSeyK4EF1Hmg/s1600/page_9.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;544&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivstaN7Q_dRQ9_rPsE9gpjXFi2I1wPrLQgjyhgWVU5ewyx2qATIFdjAbR_j2P0beZLP13NF43VPVjmsbTDEWgBQmRaTr5ypRh-Ouw3ljDYySSENloR_WCelKivBmTAxehcpSeyK4EF1Hmg/s640/page_9.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/3692211051604293911/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2012/08/new-features-of-visual-studio-2012-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/3692211051604293911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/3692211051604293911'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2012/08/new-features-of-visual-studio-2012-and.html' title='New Features of Visual Studio 2012 and .Net 4.5'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvCS9FMagYEUuaPA5CBJW-e3iDBkz-KiW8HKq24oWui1XDII-Om35hZYoR55_xULrU3SFlnuFDgxKQTPT7Psjq57nLAG7SEMdWD46ZOA4OtNvjjUXxaE7DNRKg2D6m4wnzmcjay-1_VvXZ/s72-c/page_10.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-1903298153842658251</id><published>2010-08-23T02:27:00.001-07:00</published><updated>2010-08-23T02:28:14.178-07:00</updated><title type='text'>hiii</title><content type='html'>&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/1903298153842658251/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/08/hiii.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/1903298153842658251'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/1903298153842658251'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/08/hiii.html' title='hiii'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-8822493945915484605</id><published>2010-08-21T06:22:00.001-07:00</published><updated>2010-08-21T06:22:52.200-07:00</updated><title type='text'></title><content type='html'>&amp;lt;form action=&quot;http://www.google.com/cse&quot; id=&quot;cse-search-box&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;div&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;hidden&quot; name=&quot;cx&quot; value=&quot;partner-pub-3239228842410427:5ea2x3-35nv&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;hidden&quot; name=&quot;ie&quot; value=&quot;ISO-8859-1&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;text&quot; name=&quot;q&quot; size=&quot;31&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;submit&quot; name=&quot;sa&quot; value=&quot;Search&quot; /&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;script type=&quot;text/javascript&quot; src=&quot;http://www.google.com/cse/brand?form=cse-search-box&amp;amp;amp;lang=en&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/8822493945915484605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/08/actionhttpwww.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/8822493945915484605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/8822493945915484605'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/08/actionhttpwww.html' title=''/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-3833868886698172409</id><published>2010-08-17T02:30:00.000-07:00</published><updated>2010-08-17T02:30:45.450-07:00</updated><title type='text'>HTTPException was unhandled by User Code?</title><content type='html'>&lt;span style=&quot;color: red;&quot;&gt;HTTPException was unhandled by User Code? &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;Error executing child request for ~/page.aspx.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ans: &lt;span style=&quot;color: blue;&quot;&gt;if page.aspx not exists in your current directory or renamed, so check&amp;nbsp;the name.&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/3833868886698172409/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/08/httpexception-was-unhandled-by-user.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/3833868886698172409'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/3833868886698172409'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/08/httpexception-was-unhandled-by-user.html' title='HTTPException was unhandled by User Code?'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-4604350148490996938</id><published>2010-08-17T02:24:00.000-07:00</published><updated>2010-08-17T02:24:44.995-07:00</updated><title type='text'>Microsoft JScript runtime error?</title><content type='html'>&lt;span style=&quot;color: red;&quot;&gt;Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;Details: Error parsing near &#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;!DOCTYPE html P&#39;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Ans: Server.Transfer or Response.write wont work in Ajax enabled pages.&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/4604350148490996938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/08/microsoft-jscript-runtime-error.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/4604350148490996938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/4604350148490996938'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/08/microsoft-jscript-runtime-error.html' title='Microsoft JScript runtime error?'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-8724862329568089841</id><published>2010-08-12T21:43:00.000-07:00</published><updated>2010-08-12T21:46:36.794-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LINQ Concepts"/><title type='text'>Sample LINQ Queries</title><content type='html'>&lt;strong&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;DBDataContext objeDC =new DBDataContext();&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;strong&gt;1. How to check whether the UserID exist in the table using LINQ?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;blockquote&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;UserMst objUserMst =null;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;objUserMst= objeDC.UserMsts.SingleOrDefault(Rec =&amp;gt; Rec.UserMstID == &quot;sample&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;if(objUserMst !=null)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;//exists&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;else&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;// Not exists&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;blockquote&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;PwdHistory objHistory = new PwdHistory();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;objHistory.UserName = &quot;Sample&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;objHistory.UserPwd = FormsAuthentication.HashPasswordForStoringInConfigFile(&quot;password&quot;, &quot;MD5&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;objeDC.PwdHistories.InsertOnSubmit(objHistory);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;objeDC.SubmitChanges();&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;blockquote&gt;&lt;span style=&quot;color: blue;&quot;&gt;FormsAuthentication.HashPasswordForStoringInConfigFile(&quot;password&quot;, &quot;MD5&quot;);&lt;/span&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;strong&gt;4. use Transaction in LINQ (Roll and Commit) &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;blockquote&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;DBTransaction objDBTrans=null;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;objDBTrans = objeDC.Connection.BeginTransaction();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;objeDC.Transaction = objDBTrans ;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;try&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PwdHistory objHistory = new PwdHistory();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objHistory.UserName = &quot;Sample&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objHistory.UserPwd = FormsAuthentication.HashPasswordForStoringInConfigFile(&quot;password&quot;,&amp;nbsp;&quot;MD5&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objeDC.PwdHistories.InsertOnSubmit(objHistory);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objeDC.SubmitChanges();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objDBTrans.Commit();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;catch(Exception ex)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objDBTrans.RollBack();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;strong&gt;5. Simple where condition using LINQ &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;blockquote&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;var Result = from objLogin in objeDC.LoginLogs &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;where objLogin.UserMstID == strLoginId &amp;amp;&amp;amp; objLogin.LoginEventID == &quot;02&quot; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;select objLogin;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;blockquote&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;objUserMst = objeDC.UserMsts.SingleOrDefault(Rec =&amp;gt; Rec.UserMstID == &quot;sample&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;if (objUserMst != null)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objUserMst.eInsInd = true;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objeDC.SubmitChanges();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;blockquote&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;var Result = from objUserGroup in objeDC.UserGroups&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;select objUserGroup;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;DropdownList1.DataTextField = &quot;Dsc&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;DropdownList1.DataValueField = &quot;UserGroupID&quot;;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;DropdownList1.DataSource = Result;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;DropdownList1.DataBind();&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;blockquote&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;var Result = from objNewsMast in objeDC.NewsMasts&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;orderby objNewsMast.TimeStamp&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;select objNewsMast;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;gvNewsImage.DataSource = Result;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;gvNewsImage.DataBind();&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;blockquote&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;var Result = from objMenu in objeDC.Menus&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;select new&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MenuID = objMenu.MenuID.ToString().Contains(&quot;.aspx&quot;) == true?objMenu.MenuID : &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string.Empty ,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dsc = objMenu.Dsc,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;}; &lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;blockquote&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;UserGroups objUserGrp = null;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;objUserGrp = objeDC.UserGroups.SingleOrDefault(Rec =&amp;gt; Rec.UserGroupID == &quot;stringval&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;if (objUserGrp != null)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objeDC.UserGroups.DeleteOnSubmit(objUserGrp);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objeDC.SubmitChanges();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;strong&gt;11. Delete multiple records based on condition using LINQ?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;blockquote&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;objeDC.MenuAccesses.DeleteAllOnSubmit(objeDC.MenuAccesses.Where(Tmpr =&amp;gt; Tmpr.MenuID == &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;strMenuID));&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;objeDC.SubmitChanges();&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;ex.. Convert Datetime column (MM/dd/YYYY) to dd/MM/yyyy&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;blockquote&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;var objResult = from objTemp in&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;( from objNewsMast in objeDC.NewsMasts&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; select new&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date = objNewsMast.TimeStamp,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Title = objNewsMast.Title,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }).ToList()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;select new &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date = objTemp.Date.ToString(&quot;dd/MM/yyyy&quot;),&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; Title = objTemp.Title,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;});&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;strong&gt;13. convert LINQ Results to DataTable &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;blockquote&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;var ResultProgram = from objProgram in objeDC.Programs&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select objProgram;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataTable dtProgram = LINQToDataTable(ResultProgram);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;strong&gt;14. LINQ to DataTable&lt;/strong&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;blockquote&gt;&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;public DataTable LINQToDataTable&amp;lt;T&amp;gt;(IEnumerable&amp;lt;T&amp;gt; varlist)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataTable dtReturn = new DataTable();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PropertyInfo[] oProps = null;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (varlist == null) return dtReturn;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (T rec in varlist)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;if (oProps == null)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oProps = ((Type)rec.GetType()).GetProperties();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&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; foreach (PropertyInfo pi in oProps)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&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; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&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; Type colType = pi.PropertyType;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&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; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;if ((colType.IsGenericType) &amp;amp;&amp;amp; (colType.GetGenericTypeDefinition() == typeof(Nullable&amp;lt;&amp;gt;)))&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&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; colType = colType.GetGenericArguments()[0];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&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; dtReturn.Columns.Add(new DataColumn(pi.Name, colType));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&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; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataRow dr = dtReturn.NewRow();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (PropertyInfo pi in oProps)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dr[pi.Name] = pi.GetValue(rec, null) == null ? DBNull.Value : pi.GetValue&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (rec, null);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dtReturn.Rows.Add(dr);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;return dtReturn;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/blockquote&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;strong&gt;12. Format the retrieve column using LINQ) &lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;strong&gt;10. Delete a record using LINQ?&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;strong&gt;9. Check the column value having specified characters using LINQ?&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;strong&gt;8. Bind into gridview using LINQ?&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;strong&gt;7. Bind into DropdownList using LINQ?&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;strong&gt;6. Update Single value to particular record using LINQ &lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;strong&gt;3. Encrpted Password&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;strong&gt;2. insert Values into table using LINQ?&lt;/strong&gt;&lt;/span&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/8724862329568089841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/08/sample-linq-queries.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/8724862329568089841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/8724862329568089841'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/08/sample-linq-queries.html' title='Sample LINQ Queries'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-5733901392908366273</id><published>2010-08-12T01:19:00.000-07:00</published><updated>2010-08-12T01:43:45.741-07:00</updated><title type='text'>&#39;Button1_Click&#39; and no extension method &#39;Button1_Click&#39; accepting a first argument of type &#39;ASP.feedback_aspx&#39;</title><content type='html'>&lt;strong&gt;&#39;ASP.feedback_aspx&#39; does not contain a definition for &#39;Button1_Click&#39; and no extension method &#39;Button1_Click&#39; accepting a first argument of type &#39;ASP.feedback_aspx&#39; could be found (are you missing a using directive or an assembly reference?)&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Ans: After Delete the button and buttonl_Click event , it will thrown the above error while building because you didn&#39;t properly saved the file. &lt;br /&gt;
&lt;br /&gt;
Save that file and rebuild the solution.&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/5733901392908366273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/08/button1click-and-no-extension-method.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/5733901392908366273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/5733901392908366273'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/08/button1click-and-no-extension-method.html' title='&#39;Button1_Click&#39; and no extension method &#39;Button1_Click&#39; accepting a first argument of type &#39;ASP.feedback_aspx&#39;'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-5087749751704584656</id><published>2010-08-11T21:47:00.000-07:00</published><updated>2010-08-12T20:26:41.359-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LINQ Concepts"/><title type='text'>Partitioning Operators</title><content type='html'>&lt;strong&gt;Partitioning Operators are&lt;/strong&gt; &lt;br /&gt;
&lt;br /&gt;
1. Take &lt;br /&gt;
2. Skip &lt;br /&gt;
3. TakeWhile&lt;br /&gt;
4. SkipWhile&lt;br /&gt;
&lt;br /&gt;
Example SQL Table is &lt;strong&gt;UserMsts&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Fields&amp;nbsp;&lt;/strong&gt; : UserMstID, Name, EMail, CreateBy, CreateDate , Address &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;1. Take Simple Query&lt;/strong&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;em&gt;&lt;span style=&quot;color: blue;&quot;&gt;var Result = from objUserMst in UserMsts&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&lt;span style=&quot;color: blue;&quot;&gt;select objUserMst;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&lt;span style=&quot;color: blue;&quot;&gt;foreach (var n in Result.&lt;strong&gt;Take(8))&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;em&gt;Console.WriteLine (n.UserMstID + n.Name );&lt;/em&gt; &lt;/span&gt;&lt;/blockquote&gt;This Query uses &lt;strong&gt;Take&lt;/strong&gt; to get only the first&amp;nbsp;8 records.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;2. Skip&lt;/strong&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;color: blue;&quot;&gt;var Result = from objUserMst in UserMsts&lt;/span&gt;&lt;/blockquote&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select objUserMst;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;color: blue;&quot;&gt;foreach (var n in Result.&lt;strong&gt;Skip(3))&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;color: blue;&quot;&gt;Console.WriteLine (&quot;UserId=&quot;+n.UserMstID + &quot;; Name = &quot;+ n.Name ); &lt;/span&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;This Query uses to SKIP first three record and retrieve rest of the records.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;3. Retrieve records from 10 - 20 for the following results &lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Records&lt;br /&gt;
&lt;blockquote&gt;&lt;blockquote&gt;&lt;blockquote&gt;UserId=&lt;br /&gt;
UserId=admin&lt;br /&gt;
UserId=AZIZUL&lt;br /&gt;
UserId=D00281-000&lt;br /&gt;
UserId=D00304-000&lt;br /&gt;
UserId=D00611-000&lt;br /&gt;
UserId=D01619-000&lt;br /&gt;
UserId=D01745-000&lt;br /&gt;
UserId=D02669-000&lt;br /&gt;
UserId=D02670-0001&lt;br /&gt;
&lt;strong&gt;UserId=D02673-000&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;UserId=D02684-000&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;UserId=D02940-000&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;UserId=D03002-000&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;UserId=D03252-000&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;UserId=D06124-000&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;UserId=D09533-000&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;UserId=D09999-001&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;UserId=D10051-001&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;UserId=D10059-000&lt;/strong&gt;&lt;br /&gt;
UserId=D11719-000&lt;br /&gt;
UserId=D12345-000&lt;br /&gt;
UserId=D99999-000&lt;br /&gt;
UserId=d99999-999&lt;br /&gt;
UserId=DAVID&lt;br /&gt;
UserId=Jason&lt;br /&gt;
UserId=mradmin&lt;br /&gt;
UserId=SOW&lt;br /&gt;
UserId=tech_it&lt;br /&gt;
UserId=TEST&lt;br /&gt;
UserId=test1&lt;br /&gt;
UserId=testing&lt;br /&gt;
UserId=Testing1&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;Query:&lt;br /&gt;
&lt;em&gt;&lt;span style=&quot;color: blue;&quot;&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;var Result = from objUserMst in UserMsts&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;blockquote&gt;&lt;em&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&lt;span style=&quot;color: blue;&quot;&gt;select objUserMst;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&lt;span style=&quot;color: blue;&quot;&gt;foreach (var n in &lt;strong&gt;Result.Skip(10).Take(10))&lt;/strong&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&lt;span style=&quot;color: blue;&quot;&gt;Console.WriteLine (&quot;UserId=&quot;+n.UserMstID );&lt;/span&gt;&lt;/em&gt; &lt;/blockquote&gt;&lt;/blockquote&gt;&lt;strong&gt;Results:&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;strong&gt;UserId=D02673-000&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;UserId=D02684-000&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;UserId=D02940-000&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;UserId=D03002-000&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;UserId=D03252-000&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;UserId=D06124-000&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;UserId=D09533-000&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;UserId=D09999-001&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;UserId=D10051-001&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;UserId=D10059-000&lt;/strong&gt;&lt;/blockquote&gt;&lt;strong&gt;4. TakeWhile&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;em&gt;&lt;span style=&quot;color: blue;&quot;&gt;int[] numArray = { 1235, 4456, 1234, 3232, 1900, 80000, 6234, 7123, 2343,0 };&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&lt;span style=&quot;color: blue;&quot;&gt;var FindNumbers = numArray.TakeWhile(n =&amp;gt; n &amp;lt; 3232);&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&lt;span style=&quot;color: blue;&quot;&gt;foreach (var objFindNumbers in FindNumbers)&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&lt;span style=&quot;color: blue;&quot;&gt;{&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&lt;span style=&quot;color: blue;&quot;&gt;Console.WriteLine(objFindNumbers);&lt;/span&gt;&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;&lt;span style=&quot;color: blue;&quot;&gt;}&lt;/span&gt;&lt;/em&gt;&lt;/blockquote&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/strong&gt;The above query&amp;nbsp; TakeWhile to return elements starting from the beginning of the array&amp;nbsp;whether the given(3232)&amp;nbsp;&amp;nbsp;number is hit and retrieved less than 3232 numbers from the array &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Output:&lt;/strong&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;1235&lt;/strong&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/5087749751704584656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/08/partitioning-operators.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/5087749751704584656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/5087749751704584656'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/08/partitioning-operators.html' title='Partitioning Operators'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-598588247750591287</id><published>2010-08-11T00:18:00.000-07:00</published><updated>2010-08-11T00:18:47.822-07:00</updated><title type='text'>Generate Password using C#</title><content type='html'>public string GeneratePassword()&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;blockquote&gt;Random rndNumber = null;&lt;/blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; char[] chars = null;&lt;br /&gt;
&lt;blockquote&gt;try&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
int passwordLength = 8;&lt;br /&gt;
&lt;br /&gt;
string allowedChars = &quot;abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ123456789&quot;;&lt;br /&gt;
chars = new char[passwordLength];&lt;br /&gt;
&lt;br /&gt;
rndNumber = new Random();&lt;br /&gt;
&lt;br /&gt;
for (int i = 0; i &amp;lt; passwordLength; i++)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
chars[i] = allowedChars[rndNumber.Next(0, allowedChars.Length)];&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
catch&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
throw;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
return new string(chars);&lt;br /&gt;
&lt;br /&gt;
&lt;/blockquote&gt;}&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/598588247750591287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/08/generate-password-using-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/598588247750591287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/598588247750591287'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/08/generate-password-using-c.html' title='Generate Password using C#'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-3976038948484314189</id><published>2010-07-26T20:03:00.000-07:00</published><updated>2010-07-30T08:53:53.146-07:00</updated><title type='text'>Gifts</title><content type='html'>DotNetFunda:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl2HXv1qMZ4X8CoioucmcEIkSJojlAfuaoLOmIVNqq4632TCdHdMJZnY1m41TG41z3QCNZBCR_4wOqD5rVSMzB7fFz9LOAONqgmNLVg_yoM-REtAZ3XctGXT3hyphenhyphenMlk4Dd6bec0UhbVeTd5/s1600/dotnetfunda1.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl2HXv1qMZ4X8CoioucmcEIkSJojlAfuaoLOmIVNqq4632TCdHdMJZnY1m41TG41z3QCNZBCR_4wOqD5rVSMzB7fFz9LOAONqgmNLVg_yoM-REtAZ3XctGXT3hyphenhyphenMlk4Dd6bec0UhbVeTd5/s400/dotnetfunda1.gif&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;DotNetfunda&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/AVvXsEg602g49Jjh1oQ4vBz4cJWVJGZRdm7WEHvyCqksiCPUuGiCCq4uNTwJAinqqEZWcLdUXd3Nshkg0hvHcSH6W3fuL5w0xpkM5gVhHqV0kB3iz1STe776LPpnb0qhLpcxxkdD4gPVUNib7ZNt/s1600/dotnetfundaprice.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;102&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg602g49Jjh1oQ4vBz4cJWVJGZRdm7WEHvyCqksiCPUuGiCCq4uNTwJAinqqEZWcLdUXd3Nshkg0hvHcSH6W3fuL5w0xpkM5gVhHqV0kB3iz1STe776LPpnb0qhLpcxxkdD4gPVUNib7ZNt/s400/dotnetfundaprice.gif&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEguH6NP5a0ngffSACtMvqe09z2CH7IWQgJi052tuSWlJfziS7uEY_Nn4w3MOLPJyshQSnhHumhaFOeYL1RB_4KLj92XXdp5IMLBOceKWccMbrzZE6_E4BOIUT9Hy6tUcSUiKLWENTRgTizb/s1600/WindowsCE.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguH6NP5a0ngffSACtMvqe09z2CH7IWQgJi052tuSWlJfziS7uEY_Nn4w3MOLPJyshQSnhHumhaFOeYL1RB_4KLj92XXdp5IMLBOceKWccMbrzZE6_E4BOIUT9Hy6tUcSUiKLWENTRgTizb/s400/WindowsCE.gif&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/3976038948484314189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/07/gifts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/3976038948484314189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/3976038948484314189'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/07/gifts.html' title='Gifts'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgl2HXv1qMZ4X8CoioucmcEIkSJojlAfuaoLOmIVNqq4632TCdHdMJZnY1m41TG41z3QCNZBCR_4wOqD5rVSMzB7fFz9LOAONqgmNLVg_yoM-REtAZ3XctGXT3hyphenhyphenMlk4Dd6bec0UhbVeTd5/s72-c/dotnetfunda1.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-4426626315492418019</id><published>2010-07-18T20:50:00.000-07:00</published><updated>2010-07-18T23:29:09.052-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Concepts"/><title type='text'>Sample Coding</title><content type='html'>&lt;strong&gt;1.To clear history and disabled back button &lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;Response.Cache.SetCacheability(HttpCacheability.NoCache);&lt;br /&gt;
&lt;br /&gt;
Response.Cache.SetAllowResponseInBrowserHistory(false);&lt;/blockquote&gt;&lt;strong&gt;Javascript&lt;/strong&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;lt;body onload=&quot;history.go(1);&quot;&amp;gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;strong&gt;2.how to get previuos page value from another page?&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;In Button property set PostbackURL&lt;/strong&gt; - redirect page URL&lt;br /&gt;
&lt;br /&gt;
in redirected page access &lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;blockquote&gt;TextBox txt = (TextBox)Page.PreviousPage.FindControl(&quot;TextBox1&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; txt.Text; &lt;/blockquote&gt;&lt;br /&gt;
&lt;strong&gt;3.&amp;nbsp; To Set the screen based on resolution &lt;/strong&gt;&lt;br /&gt;
&lt;blockquote&gt;function onLoad()&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
window.resizeTo(screen.availWidth,screen.availHeight);&lt;br /&gt;
&lt;br /&gt;
}&lt;/blockquote&gt;&lt;br /&gt;
call the above function on body tag&lt;br /&gt;
&lt;br /&gt;
ex.. &amp;lt;body onload=&quot;javascript:onLoad()&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
automatically the browser will be maximized based on your resolution &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;4. window.opener.document.location.reload(); // Parent window refresh&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;5. window.document.location.reload(); // current window refresh&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;6. how to reset Form?&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;blockquote&gt;&amp;lt;input type=&quot;button&quot; value=&quot;Reset Form&quot; onClick=&quot;this.form.reset()&quot; /&amp;gt;&lt;/blockquote&gt;&lt;strong&gt;7.&amp;nbsp; To display message box from coding &lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;ScriptManager.RegisterClientScriptBlock(this, GetType(), &quot;Success&quot;, &quot;window.setTimeout(\&quot;alert(&#39;Record(s) successfully updated.&#39;);\&quot;,0);&quot;, true);&lt;/blockquote&gt;To&amp;nbsp;display message from server side to invoke the client side script&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;8. window.close(); // current close command&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if it doesn&#39;t works in firefox browser&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; please set your firefox browser:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;1.input &quot;about:config &quot; to your firefox address bar and enter;&lt;/blockquote&gt;&lt;blockquote&gt;2.make sure your &quot;dom.allow_scripts_to_close_windows&quot; is true&lt;/blockquote&gt;&lt;strong&gt;9. how to pass value from2 to form1 &lt;/strong&gt;&lt;br /&gt;
&lt;blockquote&gt;public partial class Form1 : Form&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public Form1()&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
InitializeComponent();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
private void button1_Click(object sender, EventArgs e)&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
{&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;Form2 frm = new Form2(this);&lt;br /&gt;
&lt;br /&gt;
frm.Show();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public partial class Form2 : Form&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
Form _frm;&lt;br /&gt;
&lt;br /&gt;
public Form2(Form frm)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
_frm=frm;&lt;br /&gt;
&lt;br /&gt;
InitializeComponent();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
private void button1_Click(object sender, EventArgs e)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
Form1 objMain = (Form1)_frm ;&lt;br /&gt;
&lt;br /&gt;
objMain.textBox1.Text = &quot;Hello&quot;;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;10.decoration = none&lt;/strong&gt; // to display is none , instead of hidden&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;11. how to set first letter should be capital letters&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string test = &quot;Test StRiNg&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string formatted = System.Globalization.CultureInfo.CurrentUICulture.TextInfo.ToTitleCase(test);&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;12 . Read Grid Values using Javascript&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
&lt;blockquote&gt;function showdata()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var gridViewCtlId = &#39;&amp;lt;%=GridView1.ClientID%&amp;gt;&#39;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var grid = document.getElementById(gridViewCtlId);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var gridLength = grid.rows.length;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i = 1; i &amp;lt; gridLength; i++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var cols= grid.rows[i].cells.length&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(var j=0; j &amp;lt; cols; j++)&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; cell=grid.rows[i].cells[j];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(cell.innerText);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;/blockquote&gt;&lt;strong&gt;13. How to maintain&amp;nbsp;cusor positon&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; page directive MaintainScrollPositionOnPostback &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;14. onfocus select the entire text&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:TextBox ID=&quot;TextBox1&quot; runat=&quot;server&quot; Text=&quot;1&quot; onfocus=&quot;this.select();&quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;15 . Set Transparent of a image &lt;/strong&gt;&lt;br /&gt;
&lt;blockquote&gt;&amp;lt;asp:ImageButton style=&quot;filter:alpha(opacity=10)&quot; ID=&quot;ImageButton1&quot; runat=&quot;server&quot; AlternateText=&quot;Search&quot; ImageUrl=&quot;~/Images/calendar.gif&quot; /&amp;gt;&lt;/blockquote&gt;&lt;strong&gt;16.&amp;nbsp; Add zeroes before number&lt;/strong&gt;&lt;br /&gt;
&lt;blockquote&gt;String.Format(&quot;{0:00000}&quot;, 15); // &quot;00015&quot;&lt;br /&gt;
String.Format(&quot;{0:00000}&quot;, -15); // &quot;-00015&quot;&lt;br /&gt;
Align number to the right or left&lt;br /&gt;
string.Format(&quot;{0,5}&quot;, 15); // &quot; 15&quot;&lt;br /&gt;
String.Format(&quot;{0,-5}&quot;, 15); // &quot;15 &quot;&lt;br /&gt;
String.Format(&quot;{0,5:000}&quot;, 15); // &quot; 015&quot;&lt;br /&gt;
String.Format(&quot;{0,-5:000}&quot;, 15); // &quot;015 &quot;&lt;/blockquote&gt;&lt;strong&gt;17. Custom number formatting (e.g. phone number)&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;String.Format(&quot;{0:+### ### ### ###}&quot;, 447900123456); // &quot;+447 900 123 456&quot;&lt;br /&gt;
String.Format(&quot;{0:##-####-####}&quot;, 8958712551); // &quot;89-5871-2551&quot;&lt;/blockquote&gt;&lt;strong&gt;18. Phone No (###) ###-#### validation control&lt;/strong&gt;&lt;br /&gt;
&lt;blockquote&gt;&amp;lt;asp:RegularExpressionValidator runat=&quot;server&quot; ID=&quot;PNRegEx&quot; ControlToValidate=&quot;PhoneNumberTextBox&quot; Display=&quot;None&quot; ValidationExpression=&quot;((\(\d{3}\) ?)&lt;br /&gt;
(\d{3}-))?\d{3}-\d{4}&quot;&lt;br /&gt;
&lt;br /&gt;
ErrorMessage=&quot;&amp;lt;b&amp;gt;Invalid Field&amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;Please enter a phone number in the format:&amp;lt;br /&amp;gt;(###) ###-####&quot; /&amp;gt;&lt;/blockquote&gt;&lt;strong&gt;19. To find Labels&lt;/strong&gt;&lt;br /&gt;
Control myForm = Page.FindControl(&quot;Form1&quot;);&lt;br /&gt;
&lt;blockquote&gt;foreach (Control ctl in myForm.Controls)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (ctl.GetType().ToString().Equals(&quot;System.Web.UI.WebControls.Label&quot;))&lt;br /&gt;
&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((Label)ctl).Text = i.ToString();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i++;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;/blockquote&gt;&lt;strong&gt;20. Check box checking differently &lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;Label1.Text = string.Format(&quot;Check box1 status &amp;lt;b&amp;gt;{0}&amp;lt;/b&amp;gt; check box2 status &amp;lt;b&amp;gt;{1}&amp;lt;/b&amp;gt;&quot;,&lt;br /&gt;
&lt;br /&gt;
(CheckBox1.Checked ? &quot;do&quot; : &quot;do not&quot;), (CheckBox2.Checked ? &quot;do&quot; : &quot;do not&quot;));&lt;/blockquote&gt;&lt;strong&gt;21. If onblur , the textbox show display a message and change the background color&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;var defaultText =&quot;Enter Your Keyword&quot;;&lt;br /&gt;
function WaterMark(txt, evt)&lt;br /&gt;
{&lt;br /&gt;
if(txt.value.length == 0 &amp;amp;&amp;amp; evt.type == &quot;blur&quot;)&lt;br /&gt;
{&lt;br /&gt;
txt.style.color = &quot;gray&quot;; --------- ERROR &lt;br /&gt;
txt.value = defaultText;&lt;br /&gt;
}&lt;br /&gt;
if(txt.value == defaultText &amp;amp;&amp;amp; evt.type == &quot;focus&quot;)&lt;br /&gt;
{&lt;br /&gt;
txt.style.color = &quot;black&quot;;&lt;br /&gt;
txt.value=&quot;&quot;;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
22.&amp;nbsp;&lt;strong&gt;javascript error &quot;Sys.InvalidOperationException. ScriptLoader.loadscripts cannot be called while the ScriptLoader is already loading scripts&quot;.&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt; &lt;br /&gt;
Sys.WebForms.PageRequestManager.getInstance().add_initializeRequest(initRequest); &lt;br /&gt;
function initRequest(sender, args) &lt;br /&gt;
{ &lt;br /&gt;
if(Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack()) args.set_cancel(true); &lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/blockquote&gt;write the above query in a page&lt;br /&gt;
&lt;strong&gt;23. &amp;nbsp;how to access all the controls through javascript&lt;/strong&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
var elem = document.getElementById(&#39;frmMain&#39;).elements;&lt;br /&gt;
for(var i = 0; i &amp;lt; elem.length; i++)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; str += &quot;&amp;lt;b&amp;gt;Type:&amp;lt;/b&amp;gt;&quot; + elem[i].type + &quot;&amp;nbsp;&amp;nbsp;&quot;;&lt;br /&gt;
&amp;nbsp; str += &quot;&amp;lt;b&amp;gt;Name:&amp;lt;/b&amp;gt;&quot; + elem[i].name + &quot;&amp;nbsp;&amp;nbsp;&quot;;&lt;br /&gt;
&amp;nbsp; str += &quot;&amp;lt;b&amp;gt;Value:&amp;lt;/b&amp;gt;&amp;lt;i&amp;gt;&quot; + elem[i].value + &quot;&amp;lt;/i&amp;gt;&amp;nbsp;&amp;nbsp;&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; str += &quot;&amp;lt;BR&amp;gt;&quot;;&lt;br /&gt;
}&lt;/blockquote&gt;&lt;strong&gt;24. how to get id of the particular control&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp; var ctrl1 = document.getElementsByTagName(&#39;textarea&#39;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (var i = 0; i &amp;lt; ctrl1.length; i++)&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; if (ctrl1[i].title == &#39;Order&#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; ctrl1[i].value = ordno;&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;/blockquote&gt;&lt;strong&gt;25. Delete duplicate records in a table&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;WITH CTE (COl1,Col2, DuplicateCount)&lt;br /&gt;
&lt;br /&gt;
AS&lt;br /&gt;
&lt;br /&gt;
(&lt;br /&gt;
&lt;br /&gt;
SELECT COl1,Col2,&lt;br /&gt;
&lt;br /&gt;
ROW_NUMBER() OVER(PARTITION BY COl1,Col2 ORDER BY Col1) AS DuplicateCount&lt;br /&gt;
&lt;br /&gt;
FROM DuplicateRcordTable&lt;br /&gt;
&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
DELETE&lt;br /&gt;
&lt;br /&gt;
FROM CTE&lt;br /&gt;
&lt;br /&gt;
WHERE DuplicateCount &amp;gt; 1&lt;/blockquote&gt;&lt;strong&gt;26. How to get readonly textbox value in server side&lt;/strong&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
Textbox1.Attributes.Add(&quot;readonly&quot;, &quot;readonly&quot;);&lt;/blockquote&gt;&lt;br /&gt;
&lt;strong&gt;27. Find the broswer version &lt;/strong&gt;&lt;br /&gt;
&lt;blockquote&gt;Dim browserCaps As HttpBrowserCapabilities = Page.Request.Browser&lt;br /&gt;
&lt;br /&gt;
lblbrowser.Text = &quot;Your Browser : &quot; + browserCaps.Browser + &quot; Version : &quot; + browserCaps.MajorVersion.ToString&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;28. how to change message box font ?&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://msdn.microsoft.com/en-gb/magazine/cc188920.aspx&quot;&gt;http://msdn.microsoft.com/en-gb/magazine/cc188920.aspx&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;29. Autocomplete Extender Method using DB&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[WebMethod]&lt;br /&gt;
&lt;br /&gt;
public string[] GetCountryInfo(string prefixText)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
int count = 10;&lt;br /&gt;
&lt;br /&gt;
string sql = &quot;Select * from Country Where Country_Name like @prefixText&quot;;&lt;br /&gt;
&lt;br /&gt;
SqlDataAdapter da = new SqlDataAdapter(sql,”Your Connection String Comes Here”));&lt;br /&gt;
&lt;br /&gt;
da.SelectCommand.Parameters.Add(&quot;@prefixText&quot;, SqlDbType.VarChar, 50).Value = prefixText+ &quot;%&quot;;&lt;br /&gt;
&lt;br /&gt;
DataTable dt = new DataTable();&lt;br /&gt;
&lt;br /&gt;
da.Fill(dt); &lt;br /&gt;
&lt;br /&gt;
string[] items = new string[dt.Rows.Count];&lt;br /&gt;
&lt;br /&gt;
int i = 0;&lt;br /&gt;
&lt;br /&gt;
foreach (DataRow dr in dt.Rows)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
items.SetValue(dr[&quot;Country_Name&quot;].ToString(),i);&lt;br /&gt;
&lt;br /&gt;
i++;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
return items;&lt;br /&gt;
&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cc1:AutoCompleteExtender ID=&quot;AutoCompleteExtender1&quot; runat=&quot;server&quot; MinimumPrefixLength=&quot;1&quot; ServiceMethod=&quot;GetCountryInfo&quot; ServicePath=&quot;WebService.asmx&quot; TargetControlID=&quot;TextBox1&quot;&amp;gt; &amp;lt;/cc1:AutoCompleteExtender&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;30. Pass Values from one page to another page without State Manangement techniques.&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
use Cross-page posting, Posts current page information to the target page.&lt;br /&gt;
&lt;br /&gt;
instead of redirect , use button property postbackURL =target page &lt;br /&gt;
&lt;br /&gt;
ex..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:Button ID=&quot;Button1&quot; PostBackUrl=&quot;~/TargetPage.aspx&quot; runat=&quot;server&quot; Text=&quot;Submit&quot; /&amp;gt;&lt;br /&gt;
in TargetPage Onload &lt;br /&gt;
if (Page.PreviousPage != null)&lt;br /&gt;
{&lt;br /&gt;
DropDownList SourceTextBox = (DropDownList )Page.PreviousPage.FindControl(&quot;DropDownList1&quot;);&lt;br /&gt;
if (SourceTextBox != null)&lt;br /&gt;
{&lt;br /&gt;
Label1.Text = SourceTextBox.SelectedValue;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;31. How to change SA password in SQL Server&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
LOGIN sa ENABLE&lt;br /&gt;
&lt;br /&gt;
GO&lt;br /&gt;
&lt;br /&gt;
ALTER LOGIN sa WITH PASSWORD = &#39;&amp;lt;password&amp;gt;&#39;&lt;br /&gt;
&lt;br /&gt;
GO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;32. for CSS calls in windows application&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Global.System.Configuration.DefaultSettingValue(&quot;Font: Name=Arial, Size=9&quot;)&amp;gt; Public Property Font() As String&lt;br /&gt;
&lt;br /&gt;
Get&lt;br /&gt;
&lt;br /&gt;
Return CType(strFont, String)&lt;br /&gt;
&lt;br /&gt;
End Get&lt;br /&gt;
&lt;br /&gt;
Set(ByVal value As String)&lt;br /&gt;
&lt;br /&gt;
strFont = value&lt;br /&gt;
&lt;br /&gt;
End Set&lt;br /&gt;
&lt;br /&gt;
End Property&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;33. Display hand symbol in div or button &lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&quot;cursor:hand&quot;&amp;gt;&amp;lt;u&amp;gt;submit&amp;lt;/u&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;34. Rectangle textbox to ellipse&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
GraphicsPath gp = new GraphicsPath();&lt;br /&gt;
&lt;br /&gt;
gp.AddEllipse(0, 0, this.cmdbtn.ClientSize.Width,this.cmdbtn.ClientSize.Height);&lt;br /&gt;
&lt;br /&gt;
this.cmdbtn.Region = new Region(gp);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;35. save screen of the windows application &lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
int width, height;&lt;br /&gt;
&lt;br /&gt;
width = System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Width;&lt;br /&gt;
&lt;br /&gt;
height = System.Windows.Forms.SystemInformation.PrimaryMonitorSize.Height;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following code will capture the screen and save it in the desktop as image.bmp;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Bitmap sBit;&lt;br /&gt;
&lt;br /&gt;
Rectangle screenRegiion = Screen.AllScreens[0].Bounds;&lt;br /&gt;
&lt;br /&gt;
sBit = new Bitmap(width, height, PixelFormat.Format32bppArgb);&lt;br /&gt;
&lt;br /&gt;
Graphics sGraph = Graphics.FromImage(sBit);&lt;br /&gt;
&lt;br /&gt;
sGraph.CopyFromScreen(screenRegiion.Left, screenRegiion.Top, 0, 0, screenRegiion.Size);&lt;br /&gt;
&lt;br /&gt;
string savedPath =Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + @&quot;\exmpale.bmp&quot;; &lt;br /&gt;
&lt;br /&gt;
sBit.Save(savedPath);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;36. To bind the combo box after particulare time interval&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
//Define a delgate to bind a combobox&lt;br /&gt;
&lt;br /&gt;
delegate void BindComboBox();&lt;br /&gt;
&lt;br /&gt;
//Defien a timer to bind the combobox for regular intervals&lt;br /&gt;
&lt;br /&gt;
System.Timers.Timer bindTimer = new System.Timers.Timer();&lt;br /&gt;
&lt;br /&gt;
//on form load add a event to elapsed.&lt;br /&gt;
&lt;br /&gt;
bindTimer.Elapsed += new ElapsedEventHandler(BindComboBoxEvent); &lt;br /&gt;
&lt;br /&gt;
bindTimer.Interval = 60000;//for every one minute&lt;br /&gt;
&lt;br /&gt;
bindTimer.Start();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public void BindComboBoxEvent(object source, ElapsedEventArgs e)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
//Create a Object for delagate and pass the bidn data method as argument&lt;br /&gt;
&lt;br /&gt;
BindComboBox bind= new BindComboBox(BindData);&lt;br /&gt;
&lt;br /&gt;
this.BeginInvoke(bind);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
private void BindData()&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
//Write code to bind data to combo box }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
37. #Region &quot;ShowReport&quot;&lt;br /&gt;
&lt;br /&gt;
Public Function ShowReport(ByVal path As String, ByVal sParamFld As String, ByVal sParamVal As String, ByVal sReportViewer As CrystalDecisions.Web.CrystalReportViewer) As ReportDocument&lt;br /&gt;
&lt;br /&gt;
Dim tmpSortList As New SortedList&lt;br /&gt;
&lt;br /&gt;
Dim ParamLength As Int16 = 0, iLoop As Int16 = 0&lt;br /&gt;
&lt;br /&gt;
Dim ParamFld() As String, ParamFldVal() As String&lt;br /&gt;
&lt;br /&gt;
Try&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
myReportDocument = New ReportDocument&lt;br /&gt;
&lt;br /&gt;
myReportDocument.Load(path)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
myReportDocument.SetDatabaseLogon(user, pwd, Servername, Database)&lt;br /&gt;
&lt;br /&gt;
Dim Logoninfo As New TableLogOnInfo()&lt;br /&gt;
&lt;br /&gt;
Logoninfo.ConnectionInfo.ServerName = Servername&lt;br /&gt;
&lt;br /&gt;
Logoninfo.ConnectionInfo.DatabaseName = Database&lt;br /&gt;
&lt;br /&gt;
Logoninfo.ConnectionInfo.UserID = user&lt;br /&gt;
&lt;br /&gt;
Logoninfo.ConnectionInfo.Password = pwd&lt;br /&gt;
&lt;br /&gt;
&#39;myReportDocument.Database.Tables().Item(0).TestConnectivity()&lt;br /&gt;
&lt;br /&gt;
myReportDocument.Database.Tables().Item(0).ApplyLogOnInfo(Logoninfo)&lt;br /&gt;
&lt;br /&gt;
myReportDocument.VerifyDatabase()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ParamFld = sParamFld.Split(&quot;*&quot;)&lt;br /&gt;
&lt;br /&gt;
ParamFldVal = sParamVal.Split(&quot;*&quot;)&lt;br /&gt;
&lt;br /&gt;
If ParamFld.Length &amp;lt;&amp;gt; ParamFldVal.Length Then&lt;br /&gt;
&lt;br /&gt;
Err.Raise(1, , &quot;Parameter Fleid should be equal to Parameter Value&quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
For iLoop = 0 To UBound(ParamFld)&lt;br /&gt;
&lt;br /&gt;
tmpSortList.Add(ParamFld(iLoop), ParamFldVal(iLoop))&lt;br /&gt;
&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
ParamFldDefn = myReportDocument.DataDefinition.ParameterFields&lt;br /&gt;
&lt;br /&gt;
ParamFldDefn.Reset()&lt;br /&gt;
&lt;br /&gt;
Dim tmpCount As Integer = 0&lt;br /&gt;
&lt;br /&gt;
sReportViewer.ReportSource = myReportDocument&lt;br /&gt;
&lt;br /&gt;
&#39;sReportViewer.DataBind()&lt;br /&gt;
&lt;br /&gt;
sReportViewer.EnableParameterPrompt = False&lt;br /&gt;
&lt;br /&gt;
For tmpCount = 0 To tmpSortList.Count - 1&lt;br /&gt;
&lt;br /&gt;
myReportDocument.SetParameterValue(ParamFldDefn(tmpCount).Name, tmpSortList(ParamFldDefn(tmpCount).Name).ToString())&lt;br /&gt;
&lt;br /&gt;
Next&lt;br /&gt;
&lt;br /&gt;
Return myReportDocument&lt;br /&gt;
&lt;br /&gt;
&#39;fnToolbarSetting()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Catch ex As Exception&lt;br /&gt;
&lt;br /&gt;
&#39; lblErr.Text = ex.Message&lt;br /&gt;
&lt;br /&gt;
Return Nothing&lt;br /&gt;
&lt;br /&gt;
End Try&lt;br /&gt;
&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;
#End Region&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;38. convert string&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Public Function ConvertoDate(ByVal dateString As String, ByRef result As DateTime) As DateTime&lt;br /&gt;
&lt;br /&gt;
Try&lt;br /&gt;
&lt;br /&gt;
Dim supportedFormats() As String = New String() {&quot;dd/MM/yyyy&quot;, &quot;MM/dd/yyyy&quot;, &quot;MM/dd/yy&quot;, &quot;ddMMMyyyy&quot;, &quot;dMMMyyyy&quot;}&lt;br /&gt;
&lt;br /&gt;
result = DateTime.ParseExact(dateString, supportedFormats, System.Globalization.CultureInfo.CurrentCulture, System.Globalization.DateTimeStyles.None)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Return result&lt;br /&gt;
&lt;br /&gt;
Catch ex As Exception&lt;br /&gt;
&lt;br /&gt;
Return Nothing&lt;br /&gt;
&lt;br /&gt;
End Try&lt;br /&gt;
&lt;br /&gt;
End Function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;39. redirect to prevoius page &lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Response.Redirect(Request.UrlReferrer.ToString(),false);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;40 . Now entered value from SQL&lt;/strong&gt; &lt;br /&gt;
&lt;br /&gt;
insert into dupemp(name,salary,deptno) values(&#39;1sd&#39;,4000,12)&lt;br /&gt;
&lt;br /&gt;
with CTE as(select *,ROW_NUMBER() over(order by (select 0))as row from dupemp)&lt;br /&gt;
&lt;br /&gt;
select * from cte where row=(select max(row) from cte)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
method 2 &lt;br /&gt;
&lt;br /&gt;
select top 1 column_list FROM&lt;br /&gt;
&lt;br /&gt;
(select ROW_NUMBER() over(order by (select 0)) as rownum,column_list from table_name) t order by rownum desc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;BEGIN DECLARE @Output VARCHAR(8000) SELECT @Output = COALESCE (@Output + &#39;;&#39;, &#39;&#39;) + CONVERT(varchar(20), PolicyNo)&lt;br /&gt;
&lt;br /&gt;
FROM tblSubmissionList END&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;42. To password encription &lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FormsAuthentication.HashPasswordForStoringInConfigFile(objCreateUser.Pwd, &quot;MD5&quot;); &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;43. to use Session in class file&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
HttpContext.Current.Session[&quot;UserName&quot;]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;44. How to use ModalPopupExtender for the asking the requirement and process within the same page&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
(ex.. like javascript prompt , msgbox like that)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1. Create the panel with the required information&lt;br /&gt;
&lt;br /&gt;
ex. forgot password &lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:Panel ID=&quot;pnlForgotPwd&quot; runat=&quot;server&quot; BorderWidth=&quot;3&quot; BorderStyle=&quot;Double&quot; BorderColor=&quot;Gray&quot; CssClass=&quot;cssImg&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:Panel ID=&quot;handlePwd&quot; runat=&quot;server&quot; Style=&quot;cursor: move; background-color: #F5F5F5;&lt;br /&gt;
&lt;br /&gt;
border: solid 1px Gray; color: Black;&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b style=&quot;color: #B5AA6D&quot;&amp;gt;&amp;nbsp;Forgot your password.&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/asp:Panel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:UpdatePanel ID=&quot;upForgotPwd&quot; runat=&quot;server&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ContentTemplate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table align=&quot;center&quot; style=&quot;margin-left: 10px; margin-right: 10px;&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td align=&quot;right&quot; style=&quot;height: 30px;&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Login ID :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td align=&quot;right&quot; valign=&quot;middle&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:TextBox ID=&quot;txtLoginID&quot; runat=&quot;server&quot; Width=&quot;170px&quot; ValidationGroup=&quot;ForgotPwd&quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:RequiredFieldValidator ID=&quot;rfvLoginID&quot; runat=&quot;server&quot; ControlToValidate=&quot;txtLoginID&quot;&lt;br /&gt;
&lt;br /&gt;
Font-Size=&quot;Small&quot; ValidationGroup=&quot;ForgotPwd&quot;&amp;gt;*&amp;lt;/asp:RequiredFieldValidator&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:UpdateProgress ID=&quot;udProgressPwd&quot; runat=&quot;server&quot; AssociatedUpdatePanelID=&quot;upForgotPwdBtn&quot;&lt;br /&gt;
&lt;br /&gt;
DisplayAfter=&quot;50&quot; DynamicLayout=&quot;true&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ProgressTemplate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&quot;margin-left: 15px;&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:Image ID=&quot;imgProPwd&quot; runat=&quot;server&quot; Height=&quot;15px&quot; ImageUrl=&quot;~/images/Processing2.gif&quot; /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ProgressTemplate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/asp:UpdateProgress&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td colspan=&quot;4&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;hr /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tr align=&quot;center&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;td align=&quot;center&quot; colspan=&quot;2&quot; valign=&quot;bottom&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:UpdatePanel ID=&quot;upForgotPwdBtn&quot; runat=&quot;server&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ContentTemplate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:ImageButton ID=&quot;btnForgotPassword&quot; ImageUrl=&quot;~/images/submit1.png&quot; runat=&quot;server&quot;&lt;br /&gt;
&lt;br /&gt;
ValidationGroup=&quot;ForgotPwd&quot; OnClick=&quot;btnForgotPassword_Click&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:ImageButton ID=&quot;btnCancelPwd&quot; ImageUrl=&quot;~/images/cancel.png&quot; runat=&quot;server&quot;&lt;br /&gt;
&lt;br /&gt;
CausesValidation=&quot;false&quot; OnClick=&quot;btnCancelPwd_Click&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ContentTemplate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/asp:UpdatePanel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ContentTemplate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/asp:UpdatePanel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/asp:Panel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. when the modelextender will arise &lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:LinkButton ID=&quot;btnForgotPwd&quot; runat=&quot;server&quot; ForeColor=&quot;#B5AA6D&quot; Text=&quot;Forgot Password&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3. Assign ModalPopupExtender &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cc1:ModalPopupExtender ID=&quot;btnForgotPwd_ModalPopupExtender&quot; BackgroundCssClass=&quot;BGCSS&quot;&lt;br /&gt;
&lt;br /&gt;
runat=&quot;server&quot; DynamicServicePath=&quot;&quot; Enabled=&quot;True&quot; TargetControlID=&quot;btnForgotPwd&quot;&lt;br /&gt;
&lt;br /&gt;
PopupControlID=&quot;pnlForgotPwd&quot; PopupDragHandleControlID=&quot;handleForgotPwd&quot; CancelControlID=&quot;btnCancel&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/cc1:ModalPopupExtender&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
TargetControlID - to invoke the modalpopupextender&lt;br /&gt;
&lt;br /&gt;
PopupControlID - panel Control id&lt;br /&gt;
&lt;br /&gt;
PopupDragHandleeControlId = which part to drag &lt;br /&gt;
&lt;br /&gt;
CancelControlId - to canel the modalpopupextender&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4. Cancel button event &lt;br /&gt;
&lt;br /&gt;
pnlForgotPwd.Style.Add(&quot;display&quot;, &quot;none&quot;);&lt;br /&gt;
&lt;br /&gt;
btnForgotPwd_ModalPopupExtender.Hide();&lt;br /&gt;
&lt;br /&gt;
txtLoginID.Text = &quot;&quot;;&lt;br /&gt;
&lt;br /&gt;
upMain.Update();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5. How to show error while popupwindow &lt;br /&gt;
&lt;br /&gt;
a) create one more panel with required control to display error message &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&quot;MsgBox&quot; runat=&quot;server&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:Panel ID=&quot;pnlOuterMsgBox&quot; runat=&quot;server&quot; CssClass=&quot;outerPopup&quot; Style=&quot;display: none;&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:Panel ID=&quot;pnlInnerMsgBox&quot; BackColor=&quot;#F0F0F0&quot; CssClass=&quot;cssImg&quot; runat=&quot;server&quot;&lt;br /&gt;
&lt;br /&gt;
Width=&quot;350px&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:Image ID=&quot;imgMsgBox&quot; runat=&quot;server&quot; /&amp;gt;&amp;lt;asp:Label ID=&quot;lblMsgBox&quot; runat=&quot;server&quot;&amp;gt;&amp;lt;/asp:Label&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:ImageButton ID=&quot;btnOK&quot; runat=&quot;server&quot; ImageUrl=&quot;~/images/ok.png&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/asp:Panel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/asp:Panel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
b) create one more modalpopextender &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cc1:ModalPopupExtender ID=&quot;mpeMsgBox&quot; runat=&quot;server&quot; TargetControlID=&quot;MsgBox&quot; PopupControlID=&quot;pnlOuterMsgBox&quot;&lt;br /&gt;
&lt;br /&gt;
CancelControlID=&quot;btnCancel&quot; OkControlID=&quot;btnOK&quot; BackgroundCssClass=&quot;BGCSS&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:Button ID=&quot;btnCancel&quot; runat=&quot;server&quot; Text=&quot;Cancel&quot; Enabled=&quot;false&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
success and not success&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if (objUser.CheckUserExists(txtLoginID.Text))&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
lblMsgBox.ForeColor = System.Drawing.Color.Green;&lt;br /&gt;
&lt;br /&gt;
imgMsgBox.ImageUrl = &quot;~/images/id_ok.png&quot;;&lt;br /&gt;
&lt;br /&gt;
lblMsgBox.Text = &quot; Password successfully send to your HP Number.&quot;;&lt;br /&gt;
&lt;br /&gt;
txtLoginID.Text = &quot;&quot;;&lt;br /&gt;
&lt;br /&gt;
mpeMsgBox.Show();&lt;br /&gt;
&lt;br /&gt;
pnlForgotPwd.Style.Add(&quot;display&quot;, &quot;none&quot;);&lt;br /&gt;
&lt;br /&gt;
btnForgotPwd_ModalPopupExtender.Hide();&lt;br /&gt;
&lt;br /&gt;
upMain.Update();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
lblMsgBox.ForeColor = System.Drawing.Color.Red;&lt;br /&gt;
&lt;br /&gt;
imgMsgBox.ImageUrl = &quot;~/images/id_occ.png&quot;;&lt;br /&gt;
&lt;br /&gt;
lblMsgBox.Text = &quot; Incorrect Login ID.&quot;;&lt;br /&gt;
&lt;br /&gt;
mpeMsgBox.Show();&lt;br /&gt;
&lt;br /&gt;
pnlForgotPwd.Visible = true;&lt;br /&gt;
&lt;br /&gt;
btnForgotPwd_ModalPopupExtender.Show();&lt;br /&gt;
&lt;br /&gt;
upMain.Update();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;45. to focus popupwindow&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function openPopup(purl)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
wndAttr = &quot;width=520,height=630,left=100,top=100&quot;;&lt;br /&gt;
&lt;br /&gt;
var w = window.open(purl, &#39;popup_test&#39;, wndAttr);&lt;br /&gt;
&lt;br /&gt;
w.focus();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;46. retrieve page records &lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
command.ExecutePageReader(CommandBehavior.Default, 1, 10);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;47. REfresh every 2 seconds&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;body onload=&quot;doTimer();&quot;&amp;gt; &amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot; &amp;gt; &amp;lt;div&amp;gt; &amp;lt;asp:ScriptManager ID=&quot;ScriptManager1&quot; runat=&quot;server&quot;&amp;gt; &amp;lt;/asp:ScriptManager&amp;gt; &amp;lt;asp:UpdatePanel ID=&quot;UpdatePanel1&quot; runat=&quot;server&quot;&amp;gt; &amp;lt;ContentTemplate&amp;gt; &amp;lt;asp:GridView ID=&quot;GridView1&quot; runat=&quot;server&quot;&amp;gt; &amp;lt;/asp:GridView&amp;gt; &amp;lt;/ContentTemplate&amp;gt; &amp;lt;/asp:UpdatePanel&amp;gt; &amp;lt;/div&amp;gt; &amp;lt;/form&amp;gt; &amp;lt;script type=&quot;text/javascript&quot;&amp;gt; var t; var timer_is_on = 0; function timedCount() { __doPostBack(&quot;UpdatePanel1&quot;, &quot;&quot;); t = setTimeout(&quot;timedCount()&quot;, 2000);//2 second } function doTimer() { if (!timer_is_on) { timer_is_on = 1; timedCount();} }&amp;lt;/script&amp;gt; &amp;lt;/body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;48.. Gridview Chkbox in ASp Update panel&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function CheckAllElements(checkallbox) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if (checkallbox.checked == true) {&lt;br /&gt;
&lt;br /&gt;
for (i = 0; i &amp;lt; document.forms[0].elements.length; i++) {&lt;br /&gt;
&lt;br /&gt;
//.match(&quot;world&quot;)&lt;br /&gt;
&lt;br /&gt;
if (document.forms[0].elements[i].id.match(&quot;chkDetails&quot;) != null)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
if (document.forms[0].elements[i].type == &#39;checkbox&#39;) {&lt;br /&gt;
&lt;br /&gt;
document.forms[0].elements[i].checked = true;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
else {&lt;br /&gt;
&lt;br /&gt;
for (i = 0; i &amp;lt; document.forms[0].elements.length; i++) {&lt;br /&gt;
&lt;br /&gt;
if (document.forms[0].elements[i].id.match(&quot;chkDetails&quot;) != null) {&lt;br /&gt;
&lt;br /&gt;
if (document.forms[0].elements[i].type == &#39;checkbox&#39;) {&lt;br /&gt;
&lt;br /&gt;
document.forms[0].elements[i].checked = false;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//document.Form1.submit();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;49. convert linq to datatable&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public DataTable LINQToDataTable&amp;lt;T&amp;gt;(IEnumerable&amp;lt;T&amp;gt; varlist)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
DataTable dtReturn = new DataTable();&lt;br /&gt;
&lt;br /&gt;
// column names &lt;br /&gt;
&lt;br /&gt;
PropertyInfo[] oProps = null;&lt;br /&gt;
&lt;br /&gt;
if (varlist == null) return dtReturn;&lt;br /&gt;
&lt;br /&gt;
foreach (T rec in varlist)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
// Use reflection to get property names, to create table, Only first time, others &lt;br /&gt;
&lt;br /&gt;
//will follow &lt;br /&gt;
&lt;br /&gt;
if (oProps == null)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
oProps = ((Type)rec.GetType()).GetProperties();&lt;br /&gt;
&lt;br /&gt;
foreach (PropertyInfo pi in oProps)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
Type colType = pi.PropertyType;&lt;br /&gt;
&lt;br /&gt;
if ((colType.IsGenericType) &amp;amp;&amp;amp; (colType.GetGenericTypeDefinition() == typeof(Nullable&amp;lt;&amp;gt;)))&lt;br /&gt;
&lt;br /&gt;
colType = colType.GetGenericArguments()[0];&lt;br /&gt;
&lt;br /&gt;
dtReturn.Columns.Add(new DataColumn(pi.Name, colType));&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DataRow dr = dtReturn.NewRow();&lt;br /&gt;
&lt;br /&gt;
foreach (PropertyInfo pi in oProps)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
dr[pi.Name] = pi.GetValue(rec, null) == null ? DBNull.Value : pi.GetValue&lt;br /&gt;
&lt;br /&gt;
(rec, null);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
dtReturn.Rows.Add(dr);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
return dtReturn;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
LINQToDataTable(ResultMenuAcc); // var ResultMenuAcc result&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;50. to enter key active login id &lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
txtPassword.Attributes.Add(&quot;onKeyPress&quot;, &quot;javascript:if (event.keyCode == 13) __doPostBack(&#39;&quot; + btnLogin.UniqueID + &quot;&#39;,&#39;&#39;)&quot;); &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;52. Split only number from string exx. adsfad1234&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
you can use regular expression to split the value &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ex. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
string val =&quot;SCV 5000&quot;;&lt;br /&gt;
&lt;br /&gt;
Regex r = new Regex(&quot;^[0-9]$&quot;);&lt;br /&gt;
&lt;br /&gt;
string[] tmpval = r.Split(val);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
tmpval[1] = have numberic values&lt;br /&gt;
&lt;br /&gt;
tmpval[0] = character values&lt;br /&gt;
&lt;br /&gt;
Regex not work try below one &quot;^\d+$&quot; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;53. SCrolling text from bottom to up with scroll bar&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;marquee direction=up height=150 scrollAmount=2.8 scrollDelay=70 onMouseDown=&quot;this.stop()&quot; onMouseOver=&quot;this.stop()&quot; onMouseMove=&quot;this.stop()&quot; onMouseOut=&quot;this.start()&quot;&amp;gt; hello &amp;lt;br /&amp;gt; hello1 &amp;lt;/marquee&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;54. Remove duplicates in a string &lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
function removeDuplicates(field) { &lt;br /&gt;
&lt;br /&gt;
var temp = field.value; &lt;br /&gt;
&lt;br /&gt;
var array = temp.split(&quot; &quot;); &lt;br /&gt;
&lt;br /&gt;
array.sort(); &lt;br /&gt;
&lt;br /&gt;
temp = array.join(&quot; &quot;); &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;55. Without prompting close button message&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function CloseWindow()&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
window.open(&#39;&#39;,&#39;_self&#39;,&#39;&#39;);&lt;br /&gt;
&lt;br /&gt;
window.close();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;56.. Refresh page &lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:Timer ID=&quot;Timer1&quot; OnTick=&quot;Timer1_Tick&quot; runat=&quot;server&quot; Interval=&quot;10000&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:UpdatePanel ID=&quot;StockPricePanel&quot; runat=&quot;server&quot; UpdateMode=&quot;Conditional&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Triggers&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:AsyncPostBackTrigger ControlID=&quot;Timer1&quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/Triggers&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ContentTemplate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stock price is &amp;lt;asp:Label id=&quot;StockPrice&quot; runat=&quot;server&quot;&amp;gt;&amp;lt;/asp:Label&amp;gt;&amp;lt;BR /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
as of &amp;lt;asp:Label id=&quot;TimeOfPrice&quot; runat=&quot;server&quot;&amp;gt;&amp;lt;/asp:Label&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ContentTemplate&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/asp:UpdatePanel&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
protected void Timer1_Tick(object sender, EventArgs e)&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;57. to populate the file and folder in tree&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public void PopulateTree(string dir, TreeNode node) {&lt;br /&gt;
&lt;br /&gt;
// get the information of the directory&lt;br /&gt;
&lt;br /&gt;
DirectoryInfo directory = new DirectoryInfo(dir);&lt;br /&gt;
&lt;br /&gt;
// loop through each subdirectory&lt;br /&gt;
&lt;br /&gt;
foreach(DirectoryInfo d in directory.GetDirectories()) {&lt;br /&gt;
&lt;br /&gt;
// create a new node&lt;br /&gt;
&lt;br /&gt;
TreeNode t = new TreeNode(d.Name);&lt;br /&gt;
&lt;br /&gt;
// populate the new node recursively&lt;br /&gt;
&lt;br /&gt;
PopulateTree(d.FullName, t);&lt;br /&gt;
&lt;br /&gt;
node.Nodes.Add(t); // add the node to the &quot;master&quot; node&lt;br /&gt;
&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
// lastly, loop through each file in the directory, and add these as nodes&lt;br /&gt;
&lt;br /&gt;
foreach(FileInfo f in directory.GetFiles()) {&lt;br /&gt;
&lt;br /&gt;
// create a new node&lt;br /&gt;
&lt;br /&gt;
TreeNode t = new TreeNode(f.Name);&lt;br /&gt;
&lt;br /&gt;
// add it to the &quot;master&quot;&lt;br /&gt;
&lt;br /&gt;
node.Nodes.Add(t);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;58. Common on Text box CSS&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
input[type=text] { &lt;br /&gt;
&lt;br /&gt;
width: 300px; &lt;br /&gt;
&lt;br /&gt;
background-color: cyan; &lt;br /&gt;
&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;59.custom MessageBox&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
private void MessageBox(string Message) &lt;br /&gt;
&lt;br /&gt;
{ Guid Key = Guid.NewGuid(); &lt;br /&gt;
&lt;br /&gt;
string K = Key.ToString().Replace(&quot;-&quot;, &quot;&quot;); &lt;br /&gt;
&lt;br /&gt;
ScriptManager.RegisterClientScriptBlock(this, GetType(), k, &quot;alert(&#39;&quot; + Message + &quot;&#39;);&quot;, true); }&lt;/blockquote&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/4426626315492418019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/07/sample-coding.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/4426626315492418019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/4426626315492418019'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/07/sample-coding.html' title='Sample Coding'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-8592465319107588094</id><published>2010-07-18T20:25:00.000-07:00</published><updated>2010-07-18T20:25:24.919-07:00</updated><title type='text'>Dot-Net Programming Tips: Dyamically set User Name , Password for crystal report.</title><content type='html'>&lt;a href=&quot;http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/07/dyamically-set-user-name-password-for.html&quot;&gt;Dot-Net Programming Tips: Dyamically set User Name , Password for crystal report.&lt;/a&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/8592465319107588094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/07/dot-net-programming-tips-dyamically-set.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/8592465319107588094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/8592465319107588094'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/07/dot-net-programming-tips-dyamically-set.html' title='Dot-Net Programming Tips: Dyamically set User Name , Password for crystal report.'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-8471965940194947023</id><published>2010-07-18T20:24:00.000-07:00</published><updated>2010-07-18T20:24:31.058-07:00</updated><title type='text'>Dyamically set User Name , Password for crystal report.</title><content type='html'>myReportDocument.SetDatabaseLogon(user, pwd, Servername, Database)&lt;br /&gt;
   Dim Logoninfo As New TableLogOnInfo()&lt;br /&gt;
   Logoninfo.ConnectionInfo.ServerName = Servername&lt;br /&gt;
   Logoninfo.ConnectionInfo.DatabaseName = Database&lt;br /&gt;
   Logoninfo.ConnectionInfo.UserID = user&lt;br /&gt;
   Logoninfo.ConnectionInfo.Password = pwd&lt;br /&gt;
   myReportDocument.Database.Tables().Item(0).ApplyLogOnInfo(Logoninfo)&lt;br /&gt;
   myReportDocument.VerifyDatabase()&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/8471965940194947023/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/07/dyamically-set-user-name-password-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/8471965940194947023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/8471965940194947023'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/07/dyamically-set-user-name-password-for.html' title='Dyamically set User Name , Password for crystal report.'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-2694787799314538199</id><published>2010-02-22T01:52:00.000-08:00</published><updated>2010-02-22T01:52:03.118-08:00</updated><title type='text'>Several Ways Redirect to Another Page</title><content type='html'>&lt;b&gt;Hyperlinks&lt;/b&gt;&lt;br /&gt;
 &lt;br /&gt;
  &lt;blockquote&gt;Performs new request on the target page.&lt;br /&gt;
    Does not pass current page information to the target page.&lt;br /&gt;
    Requires user initiation.&lt;br /&gt;
    Redirects to any page, not just pages in the same Web application.&lt;br /&gt;
    Enables you to share information between pages using query string or session &lt;/blockquote&gt;state. &lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Cross-page posting&lt;/b&gt;&lt;br /&gt;
   &lt;blockquote&gt;Posts current page information to the target page.&lt;br /&gt;
    Makes post information available in the target page.&lt;br /&gt;
    Requires user initiation.&lt;br /&gt;
    Redirects to any page, not just pages in the same Web application.&lt;br /&gt;
    Enables the target page to read public properties of the source page if the pages are in the same Web application.&lt;br /&gt;
   To pass current page information to the target page (as in multi-page forms).&lt;br /&gt;
   When navigation should be under user control.&lt;/blockquote&gt;&lt;br /&gt;
&lt;b&gt;Browser redirect&lt;/b&gt;&lt;br /&gt;
  &lt;blockquote&gt;Performs a new HTTP GET request on the target page.&lt;br /&gt;
    Passes the query string (if any) to the target page. In Internet Explorer, the size of the query string is limited to 2,048 characters.&lt;br /&gt;
    Provides programmatic and dynamic control over the target URL and query string.&lt;br /&gt;
    Enables you to redirect to any page, not just pages in the same Web application.&lt;br /&gt;
    Enables you to share information between source and target pages using session state.&lt;br /&gt;
    For conditional navigation, when you want to control the target URL and control when navigation takes place. For example, use this option if the application must determine which page to navigate to based on data provided by the user.&lt;/blockquote&gt;&lt;br /&gt;
&lt;b&gt;Server transfer&lt;/b&gt;&lt;br /&gt;
   &lt;blockquote&gt;Transfers control to a new page that renders in place of the source page.&lt;br /&gt;
    Redirects only to target pages that are in the same Web application as the source page.&lt;br /&gt;
    Enables you to read values and public properties from source page.&lt;br /&gt;
     Does not update browser information with information about the target page. Pressing the refresh or back buttons in the browser can result in unexpected behavior.&lt;br /&gt;
    For conditional navigation, when you want to control when navigation takes place and you want access to the context of the source page.&lt;br /&gt;
    Best used in situations where the URL is hidden from the user.&lt;/blockquote&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/2694787799314538199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/02/several-ways-redirect-to-another-page.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/2694787799314538199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/2694787799314538199'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/02/several-ways-redirect-to-another-page.html' title='Several Ways Redirect to Another Page'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-3705973253916062833</id><published>2010-02-10T18:25:00.000-08:00</published><updated>2010-02-10T18:25:34.272-08:00</updated><title type='text'>Detect Javascript is enabled in ASPX programmatically</title><content type='html'>&lt;blockquote&gt;if (Session[&quot;Flag&quot;] == null)&lt;br /&gt;
        {&lt;br /&gt;
            Session[&quot;Flag&quot;] = &quot;Checked&quot;;&lt;br /&gt;
            string path = Request.Url + &quot;?temp=1&quot;;&lt;br /&gt;
            Page.ClientScript.RegisterStartupScript(this.GetType(), &quot;redirect&quot;,&lt;br /&gt;
              &quot;window.location.href=&#39;&quot; + path + &quot;&#39;;&quot;, true);&lt;br /&gt;
        }&lt;br /&gt;
        if (Request.QueryString[&quot;temp&quot;] == null)&lt;br /&gt;
            Response.Write(&quot;JavaScript is not enabled.&quot;);&lt;br /&gt;
        else&lt;br /&gt;
            Response.Write(&quot;JavaScript is enabled.&quot;);&lt;/blockquote&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/3705973253916062833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/02/detect-javascript-is-enabled-in-aspx.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/3705973253916062833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/3705973253916062833'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/02/detect-javascript-is-enabled-in-aspx.html' title='Detect Javascript is enabled in ASPX programmatically'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-2404728904146794991</id><published>2010-02-01T19:30:00.000-08:00</published><updated>2010-02-01T19:30:11.089-08:00</updated><title type='text'>Could not find the visual SourceSafe internet web service connection information. SourceSafe web service cannot be accessed.</title><content type='html'>Could not find the visual SourceSafe internet web service connection information. SourceSafe web service cannot be accessed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Solution:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Visual  Studio -&gt; Tools -&gt; options -&gt; Choose Source Control and Plug-in Selection. &lt;br /&gt;
&lt;br /&gt;
Switch Back to Microsoft Visual SourceSafe instead of Microsoft Visual SourceSafe(Interenet);&lt;br /&gt;
&lt;br /&gt;
&lt;/b&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/2404728904146794991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/02/could-not-find-visual-sourcesafe.html#comment-form' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/2404728904146794991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/2404728904146794991'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/02/could-not-find-visual-sourcesafe.html' title='Could not find the visual SourceSafe internet web service connection information. SourceSafe web service cannot be accessed.'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-5674829970907170028</id><published>2010-01-16T18:27:00.000-08:00</published><updated>2010-01-16T18:27:49.006-08:00</updated><title type='text'>Multi Language Support</title><content type='html'>&lt;meta content=&quot;text/html; charset=utf-8&quot; http-equiv=&quot;Content-Type&quot;&gt;&lt;/meta&gt;&lt;meta content=&quot;Word.Document&quot; name=&quot;ProgId&quot;&gt;&lt;/meta&gt;&lt;meta content=&quot;Microsoft Word 12&quot; name=&quot;Generator&quot;&gt;&lt;/meta&gt;&lt;meta content=&quot;Microsoft Word 12&quot; name=&quot;Originator&quot;&gt;&lt;/meta&gt;&lt;link href=&quot;file:///C:%5CUsers%5CMuhil%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml&quot; rel=&quot;File-List&quot;&gt;&lt;/link&gt;&lt;link href=&quot;file:///C:%5CUsers%5CMuhil%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx&quot; rel=&quot;themeData&quot;&gt;&lt;/link&gt;&lt;link href=&quot;file:///C:%5CUsers%5CMuhil%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml&quot; rel=&quot;colorSchemeMapping&quot;&gt;&lt;/link&gt;    &lt;m:smallfrac m:val=&quot;off&quot;&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val=&quot;0&quot;&gt;    &lt;m:rmargin m:val=&quot;0&quot;&gt;    &lt;m:defjc m:val=&quot;centerGroup&quot;&gt;    &lt;m:wrapindent m:val=&quot;1440&quot;&gt;    &lt;m:intlim m:val=&quot;subSup&quot;&gt;    &lt;m:narylim m:val=&quot;undOvr&quot;&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;
&lt;!--
 /* Font Definitions */
 @font-face
	{font-family:&quot;Cambria Math&quot;;
	panose-1:0 0 0 0 0 0 0 0 0 0;
	mso-font-charset:1;
	mso-generic-font-family:roman;
	mso-font-format:other;
	mso-font-pitch:variable;
	mso-font-signature:0 0 0 0 0 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:&quot;&quot;;
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;
	mso-fareast-font-family:&quot;Times New Roman&quot;;
	mso-ansi-language:EN-US;
	mso-fareast-language:EN-US;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-default-props:yes;
	font-size:10.0pt;
	mso-ansi-font-size:10.0pt;
	mso-bidi-font-size:10.0pt;}
@page Section1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;
	mso-header-margin:36.0pt;
	mso-footer-margin:36.0pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
--&gt;
&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;Use Global Resources for your page text and controls based on the user’s language.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;meta content=&quot;text/html; charset=utf-8&quot; http-equiv=&quot;Content-Type&quot;&gt;&lt;/meta&gt;&lt;meta content=&quot;Word.Document&quot; name=&quot;ProgId&quot;&gt;&lt;/meta&gt;&lt;meta content=&quot;Microsoft Word 12&quot; name=&quot;Generator&quot;&gt;&lt;/meta&gt;&lt;meta content=&quot;Microsoft Word 12&quot; name=&quot;Originator&quot;&gt;&lt;/meta&gt;&lt;link href=&quot;file:///C:%5CUsers%5CMuhil%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml&quot; rel=&quot;File-List&quot;&gt;&lt;/link&gt;&lt;link href=&quot;file:///C:%5CUsers%5CMuhil%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx&quot; rel=&quot;themeData&quot;&gt;&lt;/link&gt;&lt;link href=&quot;file:///C:%5CUsers%5CMuhil%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml&quot; rel=&quot;colorSchemeMapping&quot;&gt;&lt;/link&gt;    &lt;m:smallfrac m:val=&quot;off&quot;&gt;    &lt;m:dispdef&gt;    &lt;m:lmargin m:val=&quot;0&quot;&gt;    &lt;m:rmargin m:val=&quot;0&quot;&gt;    &lt;m:defjc m:val=&quot;centerGroup&quot;&gt;    &lt;m:wrapindent m:val=&quot;1440&quot;&gt;    &lt;m:intlim m:val=&quot;subSup&quot;&gt;    &lt;m:narylim m:val=&quot;undOvr&quot;&gt;   &lt;/m:narylim&gt;&lt;/m:intlim&gt; &lt;/m:wrapindent&gt;&lt;style&gt;
&lt;!--
 /* Font Definitions */
 @font-face
	{font-family:&quot;Cambria Math&quot;;
	panose-1:0 0 0 0 0 0 0 0 0 0;
	mso-font-charset:1;
	mso-generic-font-family:roman;
	mso-font-format:other;
	mso-font-pitch:variable;
	mso-font-signature:0 0 0 0 0 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-unhide:no;
	mso-style-qformat:yes;
	mso-style-parent:&quot;&quot;;
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;
	mso-fareast-font-family:&quot;Times New Roman&quot;;
	mso-ansi-language:EN-US;
	mso-fareast-language:EN-US;}
.MsoChpDefault
	{mso-style-type:export-only;
	mso-default-props:yes;
	font-size:10.0pt;
	mso-ansi-font-size:10.0pt;
	mso-bidi-font-size:10.0pt;}
@page Section1
	{size:612.0pt 792.0pt;
	margin:72.0pt 90.0pt 72.0pt 90.0pt;
	mso-header-margin:36.0pt;
	mso-footer-margin:36.0pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
 /* List Definitions */
 @list l0
	{mso-list-id:1154024637;
	mso-list-type:hybrid;
	mso-list-template-ids:-96552886 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
	{mso-level-tab-stop:36.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
@list l1
	{mso-list-id:1538155849;
	mso-list-type:hybrid;
	mso-list-template-ids:-2042348234 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l1:level1
	{mso-level-tab-stop:36.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;}
ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
--&gt;
&lt;/style&gt;  &lt;/m:defjc&gt;&lt;/m:rmargin&gt;&lt;/m:lmargin&gt;&lt;/m:dispdef&gt;&lt;/m:smallfrac&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Basics&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;ol start=&quot;1&quot; style=&quot;margin-top: 0cm;&quot; type=&quot;1&quot;&gt;&lt;li class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;A Resource file(.resx) stores values.&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;Manually indicate that controls should use resources for their      property value&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;At run-time, the controls property values are derived from the      resource file.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Steps&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;ol start=&quot;1&quot; style=&quot;margin-top: 0cm;&quot; type=&quot;1&quot;&gt;&lt;li class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;In Solution Explorer, right click the root of your web site ,      Click Add ASP.NET Folder and then click App_GlobalResources..&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&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;&lt;/span&gt;&lt;br /&gt;
&lt;/div&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/AVvXsEiM8cmzzGzpyDZdilWY9qxREi6LKkFYF6HE9zje9dymaZ6O4YsHDyIFCngMKVTKj-hEMLwtX1K3x_YgjKejS3EVdksvbvOFg7BwF8krHuG_3ROF102oI0ozAdiwS53OzRpGaFrVo4evRiX4/s1600-h/1.GIF&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM8cmzzGzpyDZdilWY9qxREi6LKkFYF6HE9zje9dymaZ6O4YsHDyIFCngMKVTKj-hEMLwtX1K3x_YgjKejS3EVdksvbvOFg7BwF8krHuG_3ROF102oI0ozAdiwS53OzRpGaFrVo4evRiX4/s320/1.GIF&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;ol start=&quot;2&quot; style=&quot;margin-top: 0cm;&quot; type=&quot;1&quot;&gt;&lt;li class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;Right-Click the App_GlobalResources folder, and then click Add      New Item &lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;Choose Resource templates , Name box , type MultiLanguage.resx      and click Add.&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;Open the MultiLanguage.resx file&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;First row under the Name column type Login&amp;nbsp; and Value Column type Login &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6 . Create for resource file for Chinese and Malay language in the name of&amp;nbsp; MultiLanguage.zh-SG.resx&amp;nbsp; and MultiLanguage.ms-MY.resx&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7. Enter the all the corresponding values.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&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/AVvXsEhhFYIzoWmIuNgVh6mBLnXeOqylbOdtxC0bBEuD7zzh0LIOPe189ZMMKbTFuHH3qi6KTysp-_Ylr2wD35vwbDL9GRBIwqt_vUgegLOd9VRwfzYTPc2vxVt4IKZOK2UcR1IQRnpnYMWzY54t/s1600-h/english.GIF&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;233&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhFYIzoWmIuNgVh6mBLnXeOqylbOdtxC0bBEuD7zzh0LIOPe189ZMMKbTFuHH3qi6KTysp-_Ylr2wD35vwbDL9GRBIwqt_vUgegLOd9VRwfzYTPc2vxVt4IKZOK2UcR1IQRnpnYMWzY54t/s320/english.GIF&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&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/AVvXsEjwdNmx6N0RMJyEmfbwb4h42DhSWSAx_foMZGf2EdbW6QGWmfc-vKLJ_tit7icT3JTnWHTZG-_or6BxcyKBhUBjtoczbqky_kAlUXrMgmiN1ujKZ-mU_xyrU9BJc34tnjBC0Rt8jooO0oe_/s1600-h/ch.GIF&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;233&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwdNmx6N0RMJyEmfbwb4h42DhSWSAx_foMZGf2EdbW6QGWmfc-vKLJ_tit7icT3JTnWHTZG-_or6BxcyKBhUBjtoczbqky_kAlUXrMgmiN1ujKZ-mU_xyrU9BJc34tnjBC0Rt8jooO0oe_/s320/ch.GIF&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&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/AVvXsEgEmXisbKmJyqMEZ3YuaRXsoUAJ4H5NlAHj7PrMxNCCCq0wzCL6KRTgvh5ujOgxhpQAAoAh_xdEnMAnKI1W3JC_Q99MBFVuh7QZp29nRqP5GXvWMVpdPmL6xpVMlNgkzhZqA1pp-yLNwaqE/s1600-h/malay.GIF&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEmXisbKmJyqMEZ3YuaRXsoUAJ4H5NlAHj7PrMxNCCCq0wzCL6KRTgvh5ujOgxhpQAAoAh_xdEnMAnKI1W3JC_Q99MBFVuh7QZp29nRqP5GXvWMVpdPmL6xpVMlNgkzhZqA1pp-yLNwaqE/s320/malay.GIF&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;Now you have created three values for the resource. At runtime, ASP.Net will read the value based on what language user selected.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8. Add Label Control to the page &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;1.&amp;nbsp;&amp;nbsp;&amp;nbsp; Default.aspx and switch to design mode, drag label control into the page&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; Right-Click the Label control , click properties and then click the ellipsis(..)button in the expression box.The Expressions dialog box appears&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;3. In the Bindable Properties list, click Text.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;4. In the Expression Type Lost, Select Resources.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;5. Expression Properties, Set ClassKey to MultiLanguage and ResourceKey to Username , click Ok.&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;6. Assign for all Control. &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&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/AVvXsEjc-Ab0-vpWNrhzSk8PwmM2ytuklET-prxA4YCpVJUXw44Uf1U-3EChV-Fg11TU6mPt-n5C3KQx2tagQZGDnZRrM51bDHZGMO9oHT1w2WkV4VpoZ_qVyX_U2A7X0njuoeTaDo4Wb_iCaHjc/s1600-h/Design.GIF&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;233&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjc-Ab0-vpWNrhzSk8PwmM2ytuklET-prxA4YCpVJUXw44Uf1U-3EChV-Fg11TU6mPt-n5C3KQx2tagQZGDnZRrM51bDHZGMO9oHT1w2WkV4VpoZ_qVyX_U2A7X0njuoeTaDo4Wb_iCaHjc/s320/Design.GIF&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;b&gt;&lt;span lang=&quot;EN-US&quot;&gt;Chinese Link Button Event &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;Session[&lt;span style=&quot;color: maroon;&quot;&gt;&quot;Language&quot;&lt;/span&gt;] = &lt;span style=&quot;color: maroon;&quot;&gt;&quot;zh-SG&quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;Response.Redirect(&lt;span style=&quot;color: maroon;&quot;&gt;&quot;Default.aspx&quot;&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&lt;b&gt;Malay Link Button Event &lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp; Session[&lt;span style=&quot;color: maroon;&quot;&gt;&quot;Language&quot;&lt;/span&gt;] = &lt;span style=&quot;color: maroon;&quot;&gt;&quot;ms-MY&quot;&lt;/span&gt;;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp; Response.Redirect(&lt;span style=&quot;color: maroon;&quot;&gt;&quot;Default.aspx&quot;&lt;/span&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&lt;b&gt;Add the below function in every page&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;protected&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; InitializeCulture()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: teal; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;String&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt; str = (&lt;span style=&quot;color: teal;&quot;&gt;String&lt;/span&gt;)Session[&lt;span style=&quot;color: maroon;&quot;&gt;&quot;Language&quot;&lt;/span&gt;];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (str != &lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: teal;&quot;&gt;String&lt;/span&gt; selectedLanguage = str;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UICulture = selectedLanguage;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Culture = selectedLanguage;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: teal;&quot;&gt;Thread&lt;/span&gt;.CurrentThread.CurrentCulture =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; &lt;span style=&quot;color: teal;&quot;&gt;CultureInfo&lt;/span&gt;.CreateSpecificCulture(selectedLanguage);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: teal;&quot;&gt;Thread&lt;/span&gt;.CurrentThread.CurrentUICulture = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; &lt;span style=&quot;color: teal;&quot;&gt;CultureInfo&lt;/span&gt;(selectedLanguage);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: blue;&quot;&gt;base&lt;/span&gt;.InitializeCulture();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/blockquote&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;Write the &lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;InitializeCulture function in separate file and call that file.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;MultiLanguage.cs&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;using System;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;using System.Data;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;using System.Configuration;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;using System.Web;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;using System.Web.Security;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;using System.Web.UI;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;using System.Web.UI.WebControls;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;using System.Web.UI.WebControls.WebParts;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;using System.Web.UI.HtmlControls;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;using System.Globalization;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;using System.Threading;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;/// &lt;summary&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/summary&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;/// Summary description for MultiLanguage&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;/// &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;public class MultiLanguage : System.Web.UI.Page&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public MultiLanguage()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // TODO: Add constructor logic here&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void fnSupportMultiLanguage()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String str = (String)Session[&quot;Language&quot;];&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (str != null)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String selectedLanguage = str;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UICulture = selectedLanguage;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Culture = selectedLanguage;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thread.CurrentThread.CurrentCulture =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; CultureInfo.CreateSpecificCulture(selectedLanguage);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thread.CurrentThread.CurrentUICulture = new&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&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; CultureInfo(selectedLanguage);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; base.InitializeCulture();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;In Aspx Page &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;protected&lt;/span&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;override&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;void&lt;/span&gt; InitializeCulture()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: teal;&quot;&gt;MultiLanguage&lt;/span&gt; ml = &lt;span style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; &lt;span style=&quot;color: teal;&quot;&gt;MultiLanguage&lt;/span&gt;();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ml.fnSupportMultiLanguage();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot; style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&amp;nbsp;  &lt;span lang=&quot;EN-US&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/5674829970907170028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/01/multi-language-support.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/5674829970907170028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/5674829970907170028'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2010/01/multi-language-support.html' title='Multi Language Support'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM8cmzzGzpyDZdilWY9qxREi6LKkFYF6HE9zje9dymaZ6O4YsHDyIFCngMKVTKj-hEMLwtX1K3x_YgjKejS3EVdksvbvOFg7BwF8krHuG_3ROF102oI0ozAdiwS53OzRpGaFrVo4evRiX4/s72-c/1.GIF" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-4235838036853114231</id><published>2009-12-22T23:06:00.000-08:00</published><updated>2009-12-22T23:06:18.890-08:00</updated><title type='text'>How to add CheckedListBox  Items Programmatically  in windows application?</title><content type='html'>C# &lt;br /&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; ArrayList US = new ArrayList();&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; US.Add(new country(&quot;India&quot;, &quot;Ind&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; US.Add(new country(&quot;Austria&quot;, &quot;Ans&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; US.Add(new country(&quot;Malaysia&quot;, &quot;Mal&quot;));&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; checkedListBox1.DataSource = US;&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; checkedListBox1.DisplayMember = &quot;County&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; checkedListBox1.ValueMember = &quot;SCode&quot;;&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; public class country&lt;br /&gt;
&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;&amp;nbsp; private string Contry;&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; private string code;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public country(string strLongName, string strShortName)&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; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.Contry = strShortName;&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; this.code = strLongName;&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; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string SCode&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; {&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; get&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; {&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; return Contry;&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; }&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; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string County&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; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get&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; {&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; return code;&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; }&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; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;String str=checkedListBox1.SelectedValue.ToString();&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/4235838036853114231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2009/12/how-to-add-checkedlistbox-items.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/4235838036853114231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/4235838036853114231'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2009/12/how-to-add-checkedlistbox-items.html' title='How to add CheckedListBox  Items Programmatically  in windows application?'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-7322237730585445464</id><published>2009-12-20T22:37:00.000-08:00</published><updated>2009-12-20T22:37:46.912-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Concepts"/><title type='text'>BusinessLayer and Presentation Layer - C#</title><content type='html'>&lt;b style=&quot;color: blue;&quot;&gt;Business Layer&lt;/b&gt; &lt;br /&gt;
&lt;blockquote&gt;using System;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Data.SqlClient;&lt;br /&gt;
using AcPro.DataLayer;&lt;br /&gt;
&lt;br /&gt;
namespace AcPro.BusinessLayer&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;summary&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// Summary description for loging.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;/summary&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public class login&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public login()&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;&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; private string P_orgname; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public string orgname&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;&amp;nbsp; set&lt;br /&gt;
&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;&amp;nbsp;&amp;nbsp; P_orgname=value;&lt;br /&gt;
&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; get&lt;br /&gt;
&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;&amp;nbsp;&amp;nbsp; return P_orgname;&lt;br /&gt;
&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; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; private string P_username; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public string username&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;&amp;nbsp; set&lt;br /&gt;
&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;&amp;nbsp;&amp;nbsp; P_username=value;&lt;br /&gt;
&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; get&lt;br /&gt;
&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;&amp;nbsp;&amp;nbsp; return P_username;&lt;br /&gt;
&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; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; private string P_pwd;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public string pwd&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;&amp;nbsp; set&lt;br /&gt;
&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;&amp;nbsp;&amp;nbsp; P_pwd=value;&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; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &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; &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;&amp;nbsp;&amp;nbsp; return P_pwd;&lt;br /&gt;
&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; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public DataSet Executesp() &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;&amp;nbsp; string strsql=&quot;loginsuccess&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; SqlParameter[] prms;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; prms=new SqlParameter[3];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; prms[0]=new SqlParameter(&quot;@orgname&quot;,orgname);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; prms[1]=new SqlParameter(&quot;@username&quot;,username);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; prms[2]=new SqlParameter(&quot;@pwd&quot;,pwd);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DataSet ds=DataAccess.ExecuteSql(strsql,prms);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return ds;&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;
}&lt;br /&gt;
&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;b style=&quot;color: blue;&quot;&gt;Presentation Layer&lt;/b&gt; -C# &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; Login is&amp;nbsp; &lt;b style=&quot;color: blue;&quot;&gt;Business Layer&lt;/b&gt; File Name&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; login ln=new login();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ln.orgname=Ddl_OrgName.SelectedItem.Text.Trim();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Session[&quot;OrgName&quot;]=Ddl_OrgName.SelectedItem.Text.Trim(); // For Display purpose -Muhil&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ln.username=txt_UserName.Text.Trim();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Session[&quot;UserName&quot;]=txt_UserName.Text.Trim(); //For Display purpose -Muhil&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ln.pwd=txt_Password.Text.Trim();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DataSet ds=ln.Executesp();&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/7322237730585445464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2009/12/businesslayer-and-presentation-layer-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/7322237730585445464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/7322237730585445464'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2009/12/businesslayer-and-presentation-layer-c.html' title='BusinessLayer and Presentation Layer - C#'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-2309331847323678217</id><published>2009-12-20T22:33:00.000-08:00</published><updated>2009-12-20T22:33:34.016-08:00</updated><title type='text'>DataLayer - C#</title><content type='html'>&lt;blockquote&gt;&lt;br /&gt;
using System;&lt;br /&gt;
using System.Data;&lt;br /&gt;
using System.Data.SqlClient;&lt;br /&gt;
using System.Configuration;&lt;br /&gt;
&lt;br /&gt;
namespace AcPro.DataLayer&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;summary&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// Summary description for DataAccess.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;/summary&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public class DataAccess&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; protected static SqlConnection Conn;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; protected static SqlTransaction sqlTrans;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public DataAccess()&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;&amp;nbsp; //&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; // TODO: Add constructor logic here&lt;br /&gt;
&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; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;b&gt;&amp;nbsp;&amp;nbsp; public static void OpenConnection()&lt;/b&gt;&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;&amp;nbsp; string strConnectionString=ConfigurationSettings.AppSettings[&quot;ConnectionString&quot;];&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Conn=new SqlConnection();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(Conn.State==ConnectionState.Open)&lt;br /&gt;
&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;&amp;nbsp;&amp;nbsp; Conn.Close();&lt;br /&gt;
&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; else&lt;br /&gt;
&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;&amp;nbsp;&amp;nbsp; Conn.ConnectionString=strConnectionString;&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; Conn.Open();&lt;br /&gt;
&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; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt; public static void CloseConnection()&lt;/b&gt;&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;&amp;nbsp; if(Conn!=null)&lt;br /&gt;
&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;&amp;nbsp;&amp;nbsp; if(Conn.State==ConnectionState.Open)&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; {&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; Conn.Close();&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; }&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; Conn=null;&lt;br /&gt;
&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; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;b&gt;&amp;nbsp;&amp;nbsp; public static void BeginTransaction()&lt;/b&gt;&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;&amp;nbsp; OpenConnection();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //Begin the transaction&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; sqlTrans=Conn.BeginTransaction();&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; /// &lt;summary&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; /// Commits the Transaction&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;/summary&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;b&gt;&amp;nbsp; public static void CommitTransaction()&lt;/b&gt;&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;&amp;nbsp; sqlTrans.Commit();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; sqlTrans.Dispose();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; CloseConnection();&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; /// &lt;summary&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; /// Rolls Back the Transaction&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;/summary&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;b&gt; public static void RollBackTransaction()&lt;/b&gt;&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;&amp;nbsp; sqlTrans.Rollback();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; sqlTrans.Dispose();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; CloseConnection();&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;b&gt;public static int ExecuteNonQuery(string CommandText,SqlParameter[] Params)&lt;/b&gt;&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;&amp;nbsp; int intRecordsAffected;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; OpenConnection();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; SqlCommand cmdObj=new SqlCommand();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; sqlTrans=Conn.BeginTransaction();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cmdObj.CommandType=CommandType.StoredProcedure;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cmdObj.Connection=Conn;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cmdObj.CommandText=CommandText;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cmdObj.Transaction=sqlTrans;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if (Params.Length&amp;gt;0)&lt;br /&gt;
&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;&amp;nbsp;&amp;nbsp; for (int i=0;i&lt;params.length;i++)&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&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; cmdObj.Parameters.Add(Params[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; }&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; &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; try&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; {&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; intRecordsAffected=cmdObj.ExecuteNonQuery();&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; sqlTrans.Commit();&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&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;&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;&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;&amp;nbsp;&amp;nbsp; catch(SqlException e)&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; {&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; sqlTrans.Rollback();&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; throw e;&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; }&lt;br /&gt;
&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; cmdObj.Dispose();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; CloseConnection();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return intRecordsAffected;&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;&lt;b&gt;&amp;nbsp; public static int ExecutiveSclar(string CommandText, SqlParameter[] Params)&lt;/b&gt;&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;&amp;nbsp; OpenConnection();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; SqlCommand cmdObj=new SqlCommand(CommandText,Conn);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cmdObj.CommandType=CommandType.StoredProcedure;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(Params.Length&amp;gt;0)&lt;br /&gt;
&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;&amp;nbsp;&amp;nbsp; for(int i=0;i&lt;params.length;i++)&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&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; cmdObj.Parameters.Add(Params[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; }&lt;br /&gt;
&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; int HeadPk=Convert.ToInt32(cmdObj.ExecuteScalar());&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cmdObj.Dispose();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; CloseConnection();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return HeadPk;&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;summary&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ///&amp;nbsp; return values in dataset &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;/summary&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;/params.length;i++)&gt;&lt;/params.length;i++)&gt;&lt;br /&gt;
&lt;param name=&quot;CommandText&quot; /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;param name=&quot;Params&quot; /&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; /// &lt;returns&gt;&lt;/returns&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;b&gt;&amp;nbsp;&amp;nbsp; public static DataSet ExecuteSql(string CommandText, SqlParameter[] Params)&lt;/b&gt;&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;&amp;nbsp; OpenConnection();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; SqlCommand cmdObj=new SqlCommand(CommandText,Conn);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; cmdObj.CommandType=CommandType.StoredProcedure;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; if(Params.Length&amp;gt;0)&lt;br /&gt;
&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;&amp;nbsp;&amp;nbsp; for(int i=0;i&lt;params.length;i++)&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&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; cmdObj.Parameters.Add(Params[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; }&lt;br /&gt;
&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; SqlDataAdapter mySDA=new SqlDataAdapter(cmdObj);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DataSet myDS=new DataSet();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; mySDA.Fill(myDS);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; //cmdObj.Dispose();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; CloseConnection();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return myDS;&lt;br /&gt;
&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;b&gt;&amp;nbsp;&amp;nbsp; public static DataTable populateledger(String CommandText,SqlParameter[] Params)&lt;/b&gt;&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;&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;&amp;nbsp;&amp;nbsp; &amp;nbsp; OpenConnection();&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; SqlCommand cmdObj=new SqlCommand(CommandText,Conn);&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; cmdObj.CommandType=CommandType.StoredProcedure;&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;&amp;nbsp;&amp;nbsp; &amp;nbsp; if (Params.Length&amp;gt;0)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; {&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; for (int i=0;i&lt;params.length;i++)&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; {&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; cmdObj.Parameters.Add(Params[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; &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;&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;&amp;nbsp;&amp;nbsp; &amp;nbsp; SqlDataAdapter mySDA=new SqlDataAdapter(cmdObj);&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; DataTable myDT=new DataTable();&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; myDT.Clear();&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; mySDA.Fill(myDT);&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mySDA.Dispose();&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;// cmdObj.Dispose();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; CloseConnection();&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; return myDT;&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; &lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static DataTable ExecuteTable(string strsql)&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {OpenConnection();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; DataTable dt=new DataTable();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try&lt;br /&gt;
&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;&amp;nbsp;&amp;nbsp; SqlDataAdapter da=new SqlDataAdapter(strsql,Conn);&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; da.Fill(dt);&lt;br /&gt;
&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; catch(Exception e)&lt;br /&gt;
&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;&amp;nbsp;&amp;nbsp; throw e;&lt;br /&gt;
&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; return dt;&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;
}&lt;br /&gt;
&lt;br /&gt;
&lt;/params.length;i++)&gt;&lt;/params.length;i++)&gt;&lt;/blockquote&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/2309331847323678217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2009/12/datalayer-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/2309331847323678217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/2309331847323678217'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2009/12/datalayer-c.html' title='DataLayer - C#'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-1504268006533029408</id><published>2009-12-20T22:17:00.000-08:00</published><updated>2009-12-21T00:33:37.437-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Concepts"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><title type='text'>Javascript Stuff</title><content type='html'>&lt;b style=&quot;color: blue;&quot;&gt;How to Clear Controls in Web-Page using JavaScript?&lt;/b&gt;&lt;br /&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; function clearFormTextElements(Form)&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; if( typeof( Form ) == &quot;object&quot; )&lt;br /&gt;
&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;&amp;nbsp; for(var i = 0; i &amp;lt;&amp;nbsp; Form.elements.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; {&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; if( Form.elements[i].type == &quot;text&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; Form.elements[i].value = &quot;&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; else&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; Form.elements[i].selectedIndex=-1;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Analog Clock &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;fCol=&#39;white&#39;; &lt;br /&gt;
sCol=&#39;FF00FF&#39;; &lt;br /&gt;
mCol=&#39;red&#39;; &lt;br /&gt;
hCol=&#39;green&#39;; &lt;br /&gt;
Ybase=50; &lt;br /&gt;
Xbase=50; &lt;br /&gt;
H=&#39;...&#39;;&lt;br /&gt;
H=H.split(&#39;&#39;);&lt;br /&gt;
M=&#39;... &#39;;&lt;br /&gt;
M=M.split(&#39;&#39;);&lt;br /&gt;
S=&#39;....&#39;;&lt;br /&gt;
S=S.split(&#39;&#39;);&lt;br /&gt;
NS4=(document.layers);&lt;br /&gt;
NS6=(document.getElementById&amp;amp;&amp;amp;!document.all);&lt;br /&gt;
IE4=(document.all);&lt;br /&gt;
Ypos=0;&lt;br /&gt;
Xpos=0;&lt;br /&gt;
dots=12;&lt;br /&gt;
Split=360/dots;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;/pre&gt;&lt;/blockquote&gt;document.write(&#39;div Style=&quot;position:absolute;top:0px;left:0px&quot;&amp;gt;&lt;br /&gt;
&lt;div );=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;br /&gt;
for (i=1; i less than dots+1; i++){&lt;br /&gt;
document.write(&#39;div id=&quot;ieDigits&quot; style=&quot;position:absolute;top:0px;left:0px;width:30px;height:30px;font-family:Arial;font-size:10px;color:&#39;+fCol+&#39;;text-align:center;padding-top:10px&quot;&amp;gt;&#39;+i+&#39;&lt;/div&gt;&#39;);&lt;br /&gt;
}&lt;br /&gt;
document.write(&#39;/div&amp;gt;&#39;)&lt;br /&gt;
document.write(&#39;div style=&quot;position:absolute;top:0px;left:0px&quot;&amp;gt;&lt;div style=&quot;position: relative;&quot;&gt;&#39;);&lt;br /&gt;
for (i=0; i less than M.length; i++){&lt;br /&gt;
document.write(&#39;div id=y style=&quot;position:absolute;width:2px;height:2px;font-size:2px;background:&#39;+mCol+&#39;&quot;&amp;gt;&lt;/div&gt;&#39;);&lt;br /&gt;
}&lt;br /&gt;
document.write(&#39;/div&amp;gt;&#39;)&lt;br /&gt;
document.write(&#39;div style=&quot;position:absolute;top:0px;left:0px&quot;&amp;gt;&lt;div style=&quot;position: relative;&quot;&gt;&#39;);&lt;br /&gt;
for (i=0; i less than H.length; i++){&lt;br /&gt;
document.write(&#39;div id=z style=&quot;position:absolute;width:2px;height:2px;font-size:2px;background:&#39;+hCol+&#39;&quot;&amp;gt;&lt;/div&gt;&#39;);&lt;br /&gt;
}&lt;br /&gt;
document.write(&#39;/div&amp;gt;&#39;)&lt;br /&gt;
document.write(&#39;div style=&quot;position:absolute;top:0px;left:0px&quot;&amp;gt;&lt;div style=&quot;position: relative;&quot;&gt;&#39;);&lt;br /&gt;
for (i=0; i less than S.length; i++){&lt;br /&gt;
document.write(&#39;div id=x style=&quot;position:absolute;width:2px;height:2px;font-size:2px;background:&#39;+sCol+&#39;&quot;&amp;gt;&lt;/div&gt;&#39;);&lt;br /&gt;
}&lt;br /&gt;
document.write(&#39;/div&amp;gt;&#39;)&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function clock(){&lt;br /&gt;
time = new Date ();&lt;br /&gt;
secs = time.getSeconds();&lt;br /&gt;
sec = -1.57 + Math.PI * secs/30;&lt;br /&gt;
mins = time.getMinutes();&lt;br /&gt;
min = -1.57 + Math.PI * mins/30;&lt;br /&gt;
hr = time.getHours();&lt;br /&gt;
hrs = -1.57 + Math.PI * hr/6 + Math.PI*parseInt(time.getMinutes())/360;&lt;br /&gt;
if (IE4){&lt;br /&gt;
Ypos=document.body.scrollTop+window.document.body.clientHeight-Ybase-20;&lt;br /&gt;
Xpos=document.body.scrollLeft+window.document.body.clientWidth-Xbase-20;&lt;br /&gt;
for (i=0; i &amp;lt; dots; ++i){&lt;br /&gt;
&amp;nbsp;ieDigits[i].style.pixelTop=Ypos-15+Ybase*Math.sin(-1.045 +i *Split*Math.PI/180)&lt;br /&gt;
&amp;nbsp;ieDigits[i].style.pixelLeft=Xpos-15+Xbase*Math.cos(-1.045 +i *Split*Math.PI/180)&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
for (i=0; i &amp;lt; S.length; i++){&lt;br /&gt;
&amp;nbsp;x[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(sec);&lt;br /&gt;
&amp;nbsp;x[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(sec);&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
for (i=0; i &amp;lt; M.length; i++){&lt;br /&gt;
&amp;nbsp;y[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(min);&lt;br /&gt;
&amp;nbsp;y[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(min);&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
for (i=0; i &amp;lt; H.length; i++){&lt;br /&gt;
&amp;nbsp;z[i].style.pixelTop =Ypos+i*Ybase/4.1*Math.sin(hrs);&lt;br /&gt;
&amp;nbsp;z[i].style.pixelLeft=Xpos+i*Xbase/4.1*Math.cos(hrs);&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
}&lt;br /&gt;
setTimeout(&#39;clock()&#39;,100);&lt;br /&gt;
}&lt;br /&gt;
clock();&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;How to Select all checkbox in CheckboxList ?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;function selectall()&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;for (var i=1; i&lt;document.forms(0).length; i++)&amp;nbsp;&amp;nbsp;=&quot;&quot;&gt; &lt;/document.forms(0).length;&gt;&amp;lt;&amp;nbsp;&amp;nbsp; document.forms(0).length; i++)&lt;br /&gt;
&lt;document.forms(0).length; i++)&amp;nbsp;&amp;nbsp;=&quot;&quot;&gt; &amp;nbsp;{&amp;nbsp; &lt;br /&gt;
if(document.forms(0).elements[i].id )&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(document.forms(0).elements[i].id.indexOf(&quot;CheckBoxList1&quot;)!=-1) &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.forms(0).elements[i].checked=true;&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;}&lt;br /&gt;
}&lt;br /&gt;
&lt;/document.forms(0).length;&gt;&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;How to DeSelect all checkbox in CheckboxList using Javascript?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;function deselectall()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp;for (var i=1; i&lt;document.forms(0).length; i++)&amp;nbsp;&amp;nbsp;=&quot;&quot;&gt; &amp;lt;&amp;nbsp;&amp;nbsp; document.forms(0).length; i++)&lt;br /&gt;
&amp;nbsp;{&amp;nbsp; &lt;br /&gt;
if(document.forms(0).elements[i].id )&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; { &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(document.forms(0).elements[i].id.indexOf(&quot;CheckBoxList1&quot;)!=-1) &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.forms(0).elements[i].checked=false;&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;}&lt;br /&gt;
}&lt;br /&gt;
&lt;/document.forms(0).length;&gt;&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: blue;&quot;&gt;Amount Field Validation&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;function fnCurrency(pCtlTextBox)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var pNumKeyCode = window.event.keyCode;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var pStrValue = pCtlTextBox.value;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var pNumLength = pStrValue.length - 1; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var pNumDeciPosi = pStrValue.indexOf(&quot;.&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (pNumLength &amp;lt; 0 &amp;amp;&amp;amp; pNumKeyCode == 46)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(&quot;Period Not allowed In First Position.&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; window.event.keyCode = 0;&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; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (pNumDeciPosi &amp;gt; 0 &amp;amp;&amp;amp; pNumDeciPosi+2 == pNumLength)&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; alert(&quot;After Period Only Two Numbers are Allowed.&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; window.event.keyCode = 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else if(pNumKeyCode &amp;gt; 47 &amp;amp;&amp;amp; pNumKeyCode &amp;lt; 58)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; window.event.keyCode = pNumKeyCode;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else if(pNumKeyCode == 46 &amp;amp;&amp;amp; pNumDeciPosi &amp;lt; 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; window.event.keyCode = pNumKeyCode; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else&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; alert(&quot;Only numeric values allowed.&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; window.event.keyCode = 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
} &lt;br /&gt;
&lt;/blockquote&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/1504268006533029408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2009/12/javascript-stuff.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/1504268006533029408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/1504268006533029408'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2009/12/javascript-stuff.html' title='Javascript Stuff'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-1419715089105562231</id><published>2009-12-20T21:35:00.000-08:00</published><updated>2009-12-20T21:36:49.342-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Concepts"/><title type='text'>How to Know No. Of users Logged In?</title><content type='html'>&lt;div style=&quot;color: blue;&quot;&gt;&lt;b&gt;STEP 1&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;Add below lines in&amp;nbsp; Global.asax File&lt;/b&gt;&lt;br /&gt;
&lt;blockquote&gt;    &lt;br /&gt;
&lt;b&gt;Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)&lt;/b&gt;&lt;br /&gt;
&lt;blockquote&gt;          &lt;span style=&quot;color: blue;&quot;&gt;Application.Add(&quot;UserCount&quot;, 0)&lt;/span&gt;&lt;br style=&quot;color: blue;&quot; /&gt;&lt;/blockquote&gt;&lt;b&gt;End Sub&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;          &lt;span style=&quot;color: blue;&quot;&gt;Dim UserCount As Integer&lt;/span&gt;&lt;br style=&quot;color: blue;&quot; /&gt;&lt;span style=&quot;color: blue;&quot;&gt;          UserCount = Convert.ToInt32(Application.Get(&quot;UserCount&quot;).ToString())&lt;/span&gt;&lt;br style=&quot;color: blue;&quot; /&gt;&lt;span style=&quot;color: blue;&quot;&gt;          UserCount = UserCount + 1&lt;/span&gt;&lt;br style=&quot;color: blue;&quot; /&gt;&lt;span style=&quot;color: blue;&quot;&gt;          Application.Set(&quot;UserCount&quot;, UserCount)&lt;/span&gt;&lt;br style=&quot;color: blue;&quot; /&gt;&lt;/blockquote&gt;&lt;b&gt;End Sub&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)&lt;/b&gt;&lt;br /&gt;
&lt;/blockquote&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;color: blue;&quot;&gt;Dim UserCount As Integer&lt;/span&gt;&lt;br style=&quot;color: blue;&quot; /&gt;&lt;span style=&quot;color: blue;&quot;&gt;          UserCount = Convert.ToInt32(Application.Get(&quot;UserCount&quot;).ToString())&lt;/span&gt;&lt;br style=&quot;color: blue;&quot; /&gt;&lt;span style=&quot;color: blue;&quot;&gt;          UserCount = UserCount - 1&lt;/span&gt;&lt;br style=&quot;color: blue;&quot; /&gt;&lt;span style=&quot;color: blue;&quot;&gt;          Application.Set(&quot;UserCount&quot;, UserCount)&lt;/span&gt;&lt;br /&gt;
&lt;/blockquote&gt;&lt;b&gt;End Sub&lt;/b&gt;&lt;br /&gt;
&lt;/blockquote&gt;&lt;br /&gt;
&lt;b style=&quot;color: blue;&quot;&gt;Step: 2&amp;nbsp;&lt;/b&gt; &lt;br /&gt;
&lt;pre&gt;Add a Web.Config File

  &lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt; sessionState mode=&quot;InProc&quot;/ &amp;gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;script runat=&quot;server&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &#39; Code that runs on application startup
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Application.Add(&quot;UserCount&quot;, 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &#39; Code that runs on application shutdown
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &#39; Code that runs when an unhandled error occurs
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &#39; Code that runs when a new session is started
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Dim UserCount As Integer
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UserCount = Convert.ToInt32(Application.Get(&quot;UserCount&quot;).ToString())
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UserCount = UserCount + 1
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Application.Set(&quot;UserCount&quot;, UserCount)
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub

&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &#39; Code that runs when a session ends. 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &#39; Note: The Session_End event is raised only when the sessionstate mode
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &#39; is set to InProc in the Web.config file. If session mode is set to StateServer 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &#39; or SQLServer, the event is not raised.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Dim UserCount As Integer
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; UserCount = Convert.ToInt32(Application.Get(&quot;UserCount&quot;).ToString())
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; UserCount = UserCount - 1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Application.Set(&quot;UserCount&quot;, UserCount)
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; 
&lt;/script&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;b style=&quot;color: blue;&quot;&gt;Step: 3&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: blue;&quot;&gt;Code Behind &lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;blockquote&gt;&amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; TextBox1.Text = Application.Get(&quot;UserCount&quot;).ToString()&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/blockquote&gt;&lt;/blockquote&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/AVvXsEiBstNKbR9AFNAASiDXJvpR-GEpAN6MiWoGoWXZn00-ttle0ZyAFdz8zaHGyTxrdYDOC2xzZDQyLAjnSUC7gjJUgMsFsD_7blQhVujnEjccTXtSVr5gMMdaCSwWxtW_Wdm-P28_4TrkKQhG/s1600-h/Untitled.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBstNKbR9AFNAASiDXJvpR-GEpAN6MiWoGoWXZn00-ttle0ZyAFdz8zaHGyTxrdYDOC2xzZDQyLAjnSUC7gjJUgMsFsD_7blQhVujnEjccTXtSVr5gMMdaCSwWxtW_Wdm-P28_4TrkKQhG/s320/Untitled.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;script runat=&quot;server&quot;&gt;
      Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
          &#39; Code that runs on application startup
          Application.Add(&quot;UserCount&quot;, 0)
        
      End Sub
    
      Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
          &#39; Code that runs on application shutdown
      End Sub
        
      Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
          &#39; Code that runs when an unhandled error occurs
      End Sub

      Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
          &#39; Code that runs when a new session is started
          Dim UserCount As Integer
          UserCount = Convert.ToInt32(Application.Get(&quot;UserCount&quot;).ToString())
          UserCount = UserCount + 1
          Application.Set(&quot;UserCount&quot;, UserCount)
      End Sub

      Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
          &#39; Code that runs when a session ends. 
          &#39; Note: The Session_End event is raised only when the sessionstate mode
          &#39; is set to InProc in the Web.config file. If session mode is set to StateServer 
          &#39; or SQLServer, the event is not raised.
          Dim UserCount As Integer
          UserCount = Convert.ToInt32(Application.Get(&quot;UserCount&quot;).ToString())
          UserCount = UserCount - 1
          Application.Set(&quot;UserCount&quot;, UserCount)
      End Sub
       
  
&lt;/script&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/1419715089105562231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2009/12/how-to-know-no-of-users-logged-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/1419715089105562231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/1419715089105562231'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2009/12/how-to-know-no-of-users-logged-in.html' title='How to Know No. Of users Logged In?'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBstNKbR9AFNAASiDXJvpR-GEpAN6MiWoGoWXZn00-ttle0ZyAFdz8zaHGyTxrdYDOC2xzZDQyLAjnSUC7gjJUgMsFsD_7blQhVujnEjccTXtSVr5gMMdaCSwWxtW_Wdm-P28_4TrkKQhG/s72-c/Untitled.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-604929889687548566.post-5158924156795697963</id><published>2009-12-14T20:42:00.000-08:00</published><updated>2009-12-14T21:09:03.618-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Concepts"/><category scheme="http://www.blogger.com/atom/ns#" term="LINQ Concepts"/><title type='text'>How to convert the string to DateTime ?</title><content type='html'>&lt;b&gt;Common Function:&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;pre&gt;Public Function ConvertoDate(ByVal dateString As String,
 ByRef result As DateTime) As DateTime   
Try             
     Dim supportedFormats() As String = New String() 
{&quot;dd/MM/yyyy&quot;, &quot;MM/dd/yyyy&quot;, &quot;MM/dd/yy&quot;, 
&quot;ddMMMyyyy&quot;, &quot;dMMMyyyy&quot;}             
     result = DateTime.ParseExact(dateString, 
supportedFormats, System.Globalization.CultureInfo.
CurrentCulture, System.Globalization.DateTimeStyles.None)  
     Return result    
Catch ex As Exception   
    Return Nothing      
End Try    
End Function 
&lt;pre&gt;We should enter the Date below format. Then only it 
will convert into DateTime.

Dim supportedFormats() As String = New String() {&quot;dd/MM/yyyy&quot;, 
&quot;MM/dd/yyyy&quot;, &quot;MM/dd/yy&quot;, &quot;ddMMMyyyy&quot;, &quot;dMMMyyyy&quot;}
&lt;b&gt;
&lt;/b&gt;
&lt;b&gt;Calling the function&lt;/b&gt;
&lt;br /&gt;
ConvertoDate(frmDate, TfrmDate)&lt;br /&gt;
frmDate - String&lt;br /&gt;
TfrmDate - DateTime object&lt;div class=&quot;blogger-post-footer&quot;&gt;I&#39;m a great believer in luck, and I find the harder I work the more I have of it.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/feeds/5158924156795697963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2009/12/how-to-convert-string-to-datetime-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/5158924156795697963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/604929889687548566/posts/default/5158924156795697963'/><link rel='alternate' type='text/html' href='http://dotnetprogrammingtipsbymuhil.blogspot.com/2009/12/how-to-convert-string-to-datetime-using.html' title='How to convert the string to DateTime ?'/><author><name>Muhilan</name><uri>http://www.blogger.com/profile/13954335250217720863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>