<?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-3190935115660981173</id><updated>2026-04-02T16:49:19.411-07:00</updated><category term="Asp.net / C#"/><category term="MVC3"/><category term="JQuery and CSS"/><category term="MVC4"/><category term="JQuery"/><category term="Asp.net"/><category term="Asp.net/C#"/><category term="HTML-CSS"/><category term="CSS and JavaScript"/><category term="kendo UI"/><category term="JavaScript"/><category term="Telerik MVC grids"/><category term="MS Sql Server 2008/2008 R2"/><category term="C"/><category term="Razor"/><category term="Asp.net/C#  Information"/><category term="C Program"/><category term="C++ Program"/><category term="LINQ"/><category term="Tips and Tricks"/><category term="C++"/><category term="CSS"/><category term="Hacks"/><category term="VS2012"/><category term="Internet/Windows"/><category term="Itextsharp"/><category term="SQL"/><category term="VS2010"/><category term="Entity FrameWork"/><category term="Security"/><category term="Utility tools"/><category term="telerik"/><category term="validation of asp.net controls"/><category term="Cloud Computing"/><category term="Cryptography"/><category term="Decryption"/><category term="Encryption"/><category term="Info"/><category term="SQL Server 2012"/><category term="SVN Error"/><category term="Web Performance"/><category term="Windows 7"/><category term="Windows Azure"/><category term="Windows OS"/><title type='text'>Sudarsan Dash&amp;#39;s Blogs on C, C++,C# , .Net , Azure, .Net Core &amp;amp; Jquery</title><subtitle type='html'>Life is a Short Span, try to earn knowledge in every Field.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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>131</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3190935115660981173.post-187091808895971679</id><published>2024-12-02T22:11:00.000-08:00</published><updated>2024-12-02T22:11:53.009-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Asp.net / C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Asp.net/C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Asp.net/C#  Information"/><category scheme="http://www.blogger.com/atom/ns#" term="Entity FrameWork"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC3"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC4"/><category scheme="http://www.blogger.com/atom/ns#" term="Telerik MVC grids"/><category scheme="http://www.blogger.com/atom/ns#" term="Utility tools"/><category scheme="http://www.blogger.com/atom/ns#" term="VS2010"/><category scheme="http://www.blogger.com/atom/ns#" term="VS2012"/><title type='text'>How to Create a Generic Method to Get the Enum Description in C#</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public static SelectList GetSelectListForEnumWithDescription(Type enumType)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var list = new List&amp;lt;Object&amp;gt;();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Array enumValues = Enum.GetValues(enumType);&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; foreach (Enum enumValue in enumValues)&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; list.Add(new&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;ID = (int)Enum.Parse(enumType, enumValue.ToString()),&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Value = GetEnumDescription(enumValue)});&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; return new SelectList(list, &quot;ID&quot;, &quot;Value&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public static string GetEnumDescription(Enum value)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FieldInfo fi = value.GetType().GetField(value.ToString());&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DescriptionAttribute[] attributes =&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (DescriptionAttribute[]) fi.GetCustomAttributes(typeof (DescriptionAttribute), false);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (attributes != null &amp;amp;&amp;amp; attributes.Length &amp;gt; 0)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return attributes[0].Description;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else return value.ToString();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/187091808895971679/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2014/03/how-to-create-generic-method-to-get.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/187091808895971679'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/187091808895971679'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2014/03/how-to-create-generic-method-to-get.html' title='How to Create a Generic Method to Get the Enum Description in C#'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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-3190935115660981173.post-9161167610791936305</id><published>2024-12-02T22:10:00.006-08:00</published><updated>2024-12-02T22:10:59.859-08:00</updated><title type='text'>Developer and Reviewer Checklist - Keep Handy while Developing Code</title><content type='html'>&lt;p&gt;&lt;/p&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;b&gt;Does the code work as expected?&amp;nbsp;&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Does the code follow the StyleCop/FxCop/JSLint/SonarLint rules?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Review static analysis warning suppressions if any.&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Do you see any code duplication?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Please refer the Portal Standardization sheet as well while implementation&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Is there any copy-pasted code from any other source?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Does the code follow a modular structure?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Validate code metrics.&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Is there any code that is commented out?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Are there any TODO markers or any incomplete code?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Is proper authentication and authorization in place? Validate across personas&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Adequate logging (Verbose, Warning, Error etc.)?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Does the code handle all exception scenarios?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;· What happens if call to external system fail?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;· What happens if the call to database fails?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Can the number of database queries be optimized?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Proper use of cache?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Review transactions&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Do methods and functions validate inputs before using it?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Are comments present and are they appropriate?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Do loops have proper terminating conditions?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Do methods have too many parameters?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Do methods, classes etc. have meaningful names?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Does the code perform excessive string concatenation?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;For custom exception classes, does the code implement the standard exception pattern?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;For classes that need to implement, do they implement the standard dispose pattern?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Does the code use dynamic SQL?&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Does the code implement guidelines to avoid XSS attack&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Does the code implement technique to avoid CSRF attack&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Each UI control should have corresponding ID for automation purpose.&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;For a control type(ex : dropdown), across the pages it should have same control properties.&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;TFS task status update&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Link TFS ID with check-in&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Deployment Scripts, RM updated if applicable&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Verified the successful deployment in Dev integration environment&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/9161167610791936305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2024/12/developer-and-reviewer-checklist-keep.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/9161167610791936305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/9161167610791936305'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2024/12/developer-and-reviewer-checklist-keep.html' title='Developer and Reviewer Checklist - Keep Handy while Developing Code'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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-3190935115660981173.post-7570324280959146286</id><published>2014-03-11T01:42:00.000-07:00</published><updated>2014-03-11T01:42:25.380-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Asp.net / C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Entity FrameWork"/><category scheme="http://www.blogger.com/atom/ns#" term="VS2010"/><category scheme="http://www.blogger.com/atom/ns#" term="VS2012"/><title type='text'>MetadataException: Unable to load the specified metadata resource in Visual Studio 2012 or in Entity Frame work</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
When ever you are getting this error , just be sure that this property was bind in you Entity Framework.&lt;br /&gt;
&lt;br /&gt;
Just open your &amp;nbsp;.edmx file , go to the properties and then set the property of the &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;&quot;Metadata Artifact Processing&lt;/b&gt;&lt;/span&gt;&quot; &amp;nbsp;to &quot;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;Embed in Output Assembly&lt;/b&gt;&lt;/span&gt;&quot;. That&#39;s all your problem is fixed.&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/AVvXsEjGwPLtNsg2XjTS4II-6slOpA2PY1OVX0bawwgeT5V2gHO2kKM8gMUZXtKxWV-Xr91QPDS6SVmKGfRbL_2sUGkaNQ3HeMSu3jrxTL3UgPdaZk1beE1aHLG3xSUeQgKL_3NPjiTZvy7CfTJx/s1600/1.png&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/AVvXsEjGwPLtNsg2XjTS4II-6slOpA2PY1OVX0bawwgeT5V2gHO2kKM8gMUZXtKxWV-Xr91QPDS6SVmKGfRbL_2sUGkaNQ3HeMSu3jrxTL3UgPdaZk1beE1aHLG3xSUeQgKL_3NPjiTZvy7CfTJx/s1600/1.png&quot; height=&quot;60&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/7570324280959146286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2014/03/metadataexception-unable-to-load.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/7570324280959146286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/7570324280959146286'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2014/03/metadataexception-unable-to-load.html' title='MetadataException: Unable to load the specified metadata resource in Visual Studio 2012 or in Entity Frame work'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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/AVvXsEjGwPLtNsg2XjTS4II-6slOpA2PY1OVX0bawwgeT5V2gHO2kKM8gMUZXtKxWV-Xr91QPDS6SVmKGfRbL_2sUGkaNQ3HeMSu3jrxTL3UgPdaZk1beE1aHLG3xSUeQgKL_3NPjiTZvy7CfTJx/s72-c/1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3190935115660981173.post-470388286820987382</id><published>2014-02-18T00:15:00.001-08:00</published><updated>2014-02-18T00:18:52.377-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JQuery and CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC3"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC4"/><category scheme="http://www.blogger.com/atom/ns#" term="Razor"/><category scheme="http://www.blogger.com/atom/ns#" term="Telerik MVC grids"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips and Tricks"/><title type='text'>How to open a new tab On click of a hyper-linked column in Telerik Razor Grid</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Today i got a requirement to open a external URL in a tab when the linked column is clicked.&lt;br /&gt;
This &amp;nbsp;can be achieved by simply adding the client template/ template to the linked column.&lt;br /&gt;
&lt;br /&gt;
1) &lt;b&gt;&lt;u&gt;&lt;i&gt;Using Template Attribute in the Telerik Grid&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;pre style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;&quot;&gt;column.Bound(a&amp;nbsp;=&amp;gt;&amp;nbsp;a.Website)
      .Template(&lt;span style=&quot;background: yellow;&quot;&gt;@&amp;lt;text&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background: yellow;&quot;&gt;@&lt;/span&gt;Url.Content(item.Website)&lt;span style=&quot;color: blue;&quot;&gt;&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;target&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;_blank&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: yellow;&quot;&gt;@&lt;/span&gt;item.Website&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background: yellow;&quot;&gt;&amp;lt;/text&amp;gt;&lt;/span&gt;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  .HeaderTemplate(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;background: yellow;&quot;&gt;@&amp;lt;text&amp;gt;&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;javascript:void(0)&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;t-link&quot;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;orderby&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;Website&quot;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;Website&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span style=&quot;background: yellow;&quot;&gt;@&lt;/span&gt;Html.TextBoxFor(m&amp;nbsp;=&amp;gt;&amp;nbsp;m.Filter.Website)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;span style=&quot;background: yellow;&quot;&gt;&amp;lt;/text&amp;gt;&lt;/span&gt;);&lt;/pre&gt;
&lt;br /&gt;
2)&amp;nbsp;&lt;b&gt;&lt;u&gt;&lt;i&gt;Using Client Template Attribute in the Telerik Grid&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;
&lt;br /&gt;
&lt;pre style=&quot;font-family: Consolas; font-size: 13px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;column.Bound(a&amp;nbsp;=&amp;gt;&amp;nbsp;a.Website)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.ClientTemplate(&lt;/span&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: maroon;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: red;&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;=&#39;&lt;/span&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;lt;#= Website #&amp;gt;&lt;span style=&quot;color: blue;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: red;&quot;&gt;target&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;=&#39;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;_blank&#39;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;lt;#= Website #&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: maroon;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: yellow; color: blue;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;.HeaderTemplate(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;@&amp;lt;text&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: maroon;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: red;&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&quot;javascript:void(0)&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&quot;t-link&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: red;&quot;&gt;orderby&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&quot;Website&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Website&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: maroon;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Html.TextBoxFor(m&amp;nbsp;=&amp;gt;&amp;nbsp;m.Filter.Website)&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;background-color: yellow;&quot;&gt;&amp;lt;/text&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;);&lt;/span&gt;&lt;/pre&gt;
&lt;b&gt;&lt;u&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;
&lt;b&gt;&lt;u&gt;&lt;i&gt;Output:&lt;/i&gt;&lt;/u&gt;&lt;/b&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/AVvXsEhsDBpO_gxeUx0rTxYIZdaL8f3uzpxtlLAgUIwdD0mUpBnFcwJEuf7xox15pkjeqfqiAf5bGjYnfkjnmOWezPdCFWMT-gWdkP7vXb0_-grIxgTu3sweFYUYKsYKZJVvyJFLjudOcXcrZ5Zw/s1600/1.PNG&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/AVvXsEhsDBpO_gxeUx0rTxYIZdaL8f3uzpxtlLAgUIwdD0mUpBnFcwJEuf7xox15pkjeqfqiAf5bGjYnfkjnmOWezPdCFWMT-gWdkP7vXb0_-grIxgTu3sweFYUYKsYKZJVvyJFLjudOcXcrZ5Zw/s1600/1.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;u&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;
&lt;b&gt;&lt;u&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;
But the really annoying is that when you click the link it is throwing error &amp;nbsp;as&lt;br /&gt;
&amp;nbsp;&quot;&lt;u&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;The resource you are looking for has been removed, had its name changed, or is temporarily unavailable&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/u&gt;&quot;&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/AVvXsEhwSvNsG-DrgZPm7LfcYcDN4pp0PcQ_xSIqv_Uvw07G-resyKY2VJfxXXMGr-Ke-YcTa_oaUPzkULhmaZju4PDE5E7sU-5zHWdlKni4VSWdwn5_zPn1ceRKZsC44cLdGR6G_8mdMcKXoPcc/s1600/2.PNG&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/AVvXsEhwSvNsG-DrgZPm7LfcYcDN4pp0PcQ_xSIqv_Uvw07G-resyKY2VJfxXXMGr-Ke-YcTa_oaUPzkULhmaZju4PDE5E7sU-5zHWdlKni4VSWdwn5_zPn1ceRKZsC44cLdGR6G_8mdMcKXoPcc/s1600/2.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is because the IIS is unable to resolve the path.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;i&gt;Solution to the above issue:&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/u&gt;&lt;/b&gt;
The above issue can be fixed by a simple trick, just you need to append the http:// to the website in the client template or in the template attribute. See the code below:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;font-family: Consolas; font-size: 13px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;column.Bound(a&amp;nbsp;=&amp;gt;&amp;nbsp;a.Website)
      .Template(&lt;span style=&quot;background-color: yellow; background-position: initial initial; background-repeat: initial initial;&quot;&gt;@&amp;lt;text&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;a&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: yellow; background-position: initial initial; background-repeat: initial initial;&quot;&gt;@&lt;/span&gt;Url.Content(&quot;&lt;/span&gt;&lt;span style=&quot;background-color: red;&quot;&gt;&lt;b&gt;http://&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&quot;+&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;item.Website)&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: red;&quot;&gt;target&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&quot;_blank&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;item.Website&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: maroon;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;&amp;lt;/text&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  .HeaderTemplate(
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;@&amp;lt;text&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: maroon;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: red;&quot;&gt;href&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&quot;javascript:void(0)&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: red;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&quot;t-link&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: red;&quot;&gt;orderby&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&quot;Website&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Website&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span style=&quot;background-color: white; color: maroon;&quot;&gt;a&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;@&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;Html.TextBoxFor(m&amp;nbsp;=&amp;gt;&amp;nbsp;m.Filter.Website)&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;background-color: yellow;&quot;&gt;&amp;lt;/text&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;);&lt;/span&gt;&lt;/pre&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;u&gt;&lt;i&gt;Note:&lt;/i&gt;&lt;/u&gt;&lt;/b&gt; Similarly if it is a mail ID column then, use mailto: as the prefix.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Thats it, Enjoy!&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/470388286820987382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2014/02/how-to-open-new-tab-on-click-of-hyper.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/470388286820987382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/470388286820987382'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2014/02/how-to-open-new-tab-on-click-of-hyper.html' title='How to open a new tab On click of a hyper-linked column in Telerik Razor Grid'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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/AVvXsEhsDBpO_gxeUx0rTxYIZdaL8f3uzpxtlLAgUIwdD0mUpBnFcwJEuf7xox15pkjeqfqiAf5bGjYnfkjnmOWezPdCFWMT-gWdkP7vXb0_-grIxgTu3sweFYUYKsYKZJVvyJFLjudOcXcrZ5Zw/s72-c/1.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3190935115660981173.post-6848361378289228285</id><published>2014-01-12T23:07:00.002-08:00</published><updated>2014-01-12T23:07:22.663-08:00</updated><title type='text'>How to Add Re-ordering of the columns in Telerik MVC or Razor Grid.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;Some times it is required that the column &amp;nbsp;had to be re-ordered in a grid as, we are using a Telerik grid , as adding the property reorder will do the task.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;Here is the code below to do it:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre style=&quot;font-size: 13px;&quot;&gt;&lt;span style=&quot;background-color: yellow; font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;.Reorderable(reorder&amp;nbsp;=&amp;gt;&amp;nbsp;reorder.Columns(&lt;span style=&quot;color: blue;&quot;&gt;true&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-size: 13px;&quot;&gt;&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-size: 13px;&quot;&gt;&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;  Just add this line to your Telerik Razor grid, it will do the task.
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-size: 13px;&quot;&gt;&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-size: 13px;&quot;&gt;&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; font-size: 13px;&quot;&gt;&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;Happy Coding!&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/6848361378289228285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2014/01/how-to-add-re-ordering-of-columns-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/6848361378289228285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/6848361378289228285'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2014/01/how-to-add-re-ordering-of-columns-in.html' title='How to Add Re-ordering of the columns in Telerik MVC or Razor Grid.'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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-3190935115660981173.post-1352108073281320714</id><published>2014-01-12T22:56:00.005-08:00</published><updated>2017-02-24T01:31:13.621-08:00</updated><title type='text'>How to show the Pager in Telerik Grid both in top and bottom.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;While working in a project , my client wants to show the paging in the grid in both in the top of the grid as well as in the bottom of the grid also. As I am using the Telerik grid, it has a property to set while creating the grid.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;So here is the code for it:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;pre style=&quot;font-size: 13px;&quot;&gt;&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;.Pageable(p&amp;nbsp;=&amp;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;p.Style(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #2b91af;&quot;&gt;GridPagerStyles&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;.NextPreviousAndNumeric | &lt;/span&gt;&lt;span style=&quot;background-color: white; color: #2b91af;&quot;&gt;GridPagerStyles&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;.PageSizeDropDown);&amp;nbsp;&amp;nbsp;  &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;         &lt;/span&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;p.Position(&lt;span style=&quot;color: #2b91af;&quot;&gt;GridPagerPosition&lt;/span&gt;.Both); // this line will do the Magic&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;
         p.PageSize(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;.Parse(ViewBag.PageSize&amp;nbsp;??&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #a31515;&quot;&gt;&quot;50&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;),&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;[]&amp;nbsp;{&amp;nbsp;10,&amp;nbsp;20,&amp;nbsp;50&amp;nbsp;});
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}).Sortable()&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;Happy Coding!&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/1352108073281320714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2014/01/how-to-show-pager-in-telerik-grid-both.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/1352108073281320714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/1352108073281320714'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2014/01/how-to-show-pager-in-telerik-grid-both.html' title='How to show the Pager in Telerik Grid both in top and bottom.'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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-3190935115660981173.post-4659288538206059387</id><published>2013-09-23T05:01:00.000-07:00</published><updated>2013-09-23T05:01:06.884-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Hacks"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML-CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery and CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="kendo UI"/><category scheme="http://www.blogger.com/atom/ns#" term="Telerik MVC grids"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips and Tricks"/><title type='text'>How to Insert space before capital letters using Jquery</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;Assume you have a string &quot;HelloWorld&quot; and you need to show as &quot;Hello World&quot;. How you can&amp;nbsp;achieve&amp;nbsp;it using Jquery.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;It can be done in a very simpler way as below:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&quot;Your string&quot;.replace( /([a-z])([A-Z])/g, &quot;$1 $2&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;so here it will be &quot;HelloWorld&quot;.replace( /([a-z])([A-Z])/g, &quot;$1 $2&quot;) will produce &quot;Hello World&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;Enjoy!&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/4659288538206059387/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2013/09/how-to-insert-space-before-capital.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/4659288538206059387'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/4659288538206059387'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2013/09/how-to-insert-space-before-capital.html' title='How to Insert space before capital letters using Jquery'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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-3190935115660981173.post-8747193871283466273</id><published>2013-07-17T00:14:00.002-07:00</published><updated>2013-07-17T00:14:55.625-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LINQ"/><title type='text'>Differentiate between &#39;All&#39; and &#39;Any&#39; Operators in LINQ. </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In LINQ, All operator is &amp;nbsp;to check whether all the elements met the specific condition or not. While Any operator checks whether there is any element exist in the collection or not.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For Example:&lt;br /&gt;
&lt;br /&gt;
int array={1,2,3,4,5};&lt;br /&gt;
&lt;br /&gt;
bool result=array.All(i=&amp;gt;i &amp;lt; 6); here it will check the elements and returns true.&lt;br /&gt;
&lt;br /&gt;
Similarly,&lt;br /&gt;
&lt;br /&gt;
bool result= array.Any( ); // here it checks whether the collection has any elements and returns true.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hope you Enjoyed!&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/8747193871283466273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2013/07/differentiate-between-all-and-any.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/8747193871283466273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/8747193871283466273'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2013/07/differentiate-between-all-and-any.html' title='Differentiate between &#39;All&#39; and &#39;Any&#39; Operators in LINQ. '/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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-3190935115660981173.post-6157698802261417785</id><published>2013-07-15T23:22:00.001-07:00</published><updated>2013-07-15T23:24:47.988-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MVC3"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC4"/><category scheme="http://www.blogger.com/atom/ns#" term="Razor"/><title type='text'>Compile Time View Checking In Asp.net MVC</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;You might have noticed that in MVC3/MVC4 if you had done some thing wrong in the view files it will not throw any error during compilation and it will build successfully. The error in the file is only noticed during executing/rendering the view file. So in order to trap the error during the compilation time you can follow the method below:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Step-1 :&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Open your solution project file in any XML Editor or in the Visual Studio itself &amp;nbsp;and you will find a tag named&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;lt;MVCBuildViews&amp;gt;, here it false and just make it true and save it.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&amp;lt;MVCBuildViews&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;false&amp;lt;/MVCBuildViews&amp;gt; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp;change it to&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;lt;MVCBuildViews&amp;gt;true&amp;lt;/MVCBuildViews&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Thats all, so now when your view has any error then it will throw error during the compilation.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/6157698802261417785/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2013/07/compile-time-view-checking-in-aspnet-mvc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/6157698802261417785'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/6157698802261417785'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2013/07/compile-time-view-checking-in-aspnet-mvc.html' title='Compile Time View Checking In Asp.net MVC'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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-3190935115660981173.post-5418577403731604394</id><published>2013-07-15T02:07:00.003-07:00</published><updated>2013-07-15T02:07:54.131-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="LINQ"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC3"/><category scheme="http://www.blogger.com/atom/ns#" term="Razor"/><title type='text'>The Use of ALL Operator in LINQ</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Today, I came across the All operator in LINQ. This operator returns bool value rather than records after condition is satisfied. The operator will be highly helpful when you need some kind of validation to find unique data. for e.g. Checking the existing email &amp;nbsp;or UserID registered and so on.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Lets Go with a Example to do the Task:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;int [] array = { 1,2,3,4,5 };&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;bool result = array.All(value =&amp;gt; value &amp;gt; 2 );&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Console.WriteLine(result); &amp;nbsp;// Here it will print False since it will check all the values and &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // all the values must be grater than 2.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp;result = array.All(value =&amp;gt; value &amp;lt; 6 );&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Console.WriteLine(result); // Here it will print True since it will check all the values and &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// found all values are less than 6.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Hope it helps you!&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/5418577403731604394/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2013/07/the-use-of-all-operator-in-linq.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/5418577403731604394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/5418577403731604394'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2013/07/the-use-of-all-operator-in-linq.html' title='The Use of ALL Operator in LINQ'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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-3190935115660981173.post-8644084923878140075</id><published>2013-06-17T01:57:00.000-07:00</published><updated>2013-06-17T01:59:58.121-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="Asp.net / C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Itextsharp"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC3"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC4"/><category scheme="http://www.blogger.com/atom/ns#" term="Razor"/><category scheme="http://www.blogger.com/atom/ns#" term="Telerik MVC grids"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips and Tricks"/><title type='text'>Error 349: Duplicate headers received from server in Google Chrome while rendering PDF using ITextSharp in Asp.Net MVC</title><content type='html'>&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&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/AVvXsEiUGzoMrA8DbAK5fYW9GaQAhnKMvSu9LS5z3PODAz1sRbk92wbcOu7iBT_ZhX544ZF9l8KKtHoSqAdWnLVtxl6CR_5Sm8R2X5V3NdJcrIaEZ_bcmfg_cBstAKHB_pfgGNgIZ8jPTGt2oSfe/s1600/1.png&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/AVvXsEiUGzoMrA8DbAK5fYW9GaQAhnKMvSu9LS5z3PODAz1sRbk92wbcOu7iBT_ZhX544ZF9l8KKtHoSqAdWnLVtxl6CR_5Sm8R2X5V3NdJcrIaEZ_bcmfg_cBstAKHB_pfgGNgIZ8jPTGt2oSfe/s1600/1.png&quot; height=&quot;150&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;While working on generating &amp;nbsp;PDF in Asp.Net MVC3, I got a peculiar error while rendering the PDF in Chrome browsers, which is not being found in any other browsers like Internet Explorer or Fire Fox.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;This error comes because chrome browsers doesn&#39;t ignore duplicate headers. This can be addressed easily the following ways, if you or your web app is sending out headers. Then check the following things:&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;strong style=&quot;border: 0px; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;1. Enclose fileName using “”. i.e&lt;/strong&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 1.714285714rem; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;code style=&quot;border: 0px; font-family: Consolas, Monaco, &#39;Lucida Console&#39;, monospace; font-size: 0.857142857rem; line-height: 2; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Response.Addheader(&#39;Content-Disposition: attachment; filename=&quot;&#39; +&amp;nbsp;fileName&amp;nbsp;&#39;&quot;&#39;);&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 1.714285714rem; padding: 0px; vertical-align: baseline;&quot;&gt;
instead of&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 1.714285714rem; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;code style=&quot;border: 0px; font-family: Consolas, Monaco, &#39;Lucida Console&#39;, monospace; font-size: 0.857142857rem; line-height: 2; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Response.Addheader(&#39;Content-Disposition: attachment; filename=&#39;+&amp;nbsp;fileName);&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 1.714285714rem; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;2. If possible replace spaces and commas (,) with underscores (_)&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 1.714285714rem; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;code style=&quot;border: 0px; font-family: Consolas, Monaco, &#39;Lucida Console&#39;, monospace; font-size: 0.857142857rem; line-height: 2; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 1.714285714rem; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;code style=&quot;border: 0px; font-family: Consolas, Monaco, &#39;Lucida Console&#39;, monospace; font-size: 0.857142857rem; line-height: 2; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 13px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-family: Consolas; font-size: 13px;&quot;&gt;string&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 13px;&quot;&gt;&amp;nbsp;regExp&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 13px;&quot;&gt;@&quot;[^\w\d]&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Consolas; font-size: 13px;&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;pre style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;&quot;&gt;Response.AddHeader(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;content-disposition&quot;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;attachment;filename=&quot;&lt;/span&gt;&amp;nbsp;+&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Test_PDF_&quot;&lt;/span&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;        &lt;span style=&quot;color: #2b91af;&quot;&gt;Regex&lt;/span&gt;.Replace(model.CompanyName,&amp;nbsp;regExp,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;_&quot;&lt;/span&gt;)+&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;_&quot;&lt;/span&gt;&amp;nbsp;+
&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;&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;&lt;span style=&quot;color: #2b91af;&quot;&gt;Regex&lt;/span&gt;.Replace(model.FullName,&amp;nbsp;regExp,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;_&quot;&lt;/span&gt;)&amp;nbsp;+&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;_&quot;&lt;/span&gt;&amp;nbsp;+&amp;nbsp;                                                        DateTime.Now.ToShortDateString());teString());&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;&quot;&gt;&lt;div style=&quot;border: 0px; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 1.714285714rem; padding: 0px; vertical-align: baseline; white-space: normal;&quot;&gt;
&lt;strong style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;3. Explicitly tell Asp.Net MVC to override headers by setting optional&amp;nbsp;&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;replace&lt;/em&gt;&amp;nbsp;parameter to&amp;nbsp;&lt;em style=&quot;border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;true&lt;/em&gt;.&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 1.714285714rem; padding: 0px; vertical-align: baseline; white-space: normal;&quot;&gt;
&lt;code style=&quot;border: 0px; font-family: Consolas, Monaco, &#39;Lucida Console&#39;, monospace; font-size: 0.857142857rem; line-height: 2; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-family: Consolas; font-size: 13px;&quot;&gt;Response.AddHeader(&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-family: Consolas; font-size: 13px;&quot;&gt;&quot;Content-type: application/pdf&quot;,true);&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 1.714285714rem; padding: 0px; vertical-align: baseline; white-space: normal;&quot;&gt;
Happy Coding!&lt;/div&gt;
&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #444444; font-family: &#39;Open Sans&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 24px; margin-bottom: 1.714285714rem; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/8644084923878140075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2013/06/error-349-duplicate-headers-received.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/8644084923878140075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/8644084923878140075'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2013/06/error-349-duplicate-headers-received.html' title='Error 349: Duplicate headers received from server in Google Chrome while rendering PDF using ITextSharp in Asp.Net MVC'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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/AVvXsEiUGzoMrA8DbAK5fYW9GaQAhnKMvSu9LS5z3PODAz1sRbk92wbcOu7iBT_ZhX544ZF9l8KKtHoSqAdWnLVtxl6CR_5Sm8R2X5V3NdJcrIaEZ_bcmfg_cBstAKHB_pfgGNgIZ8jPTGt2oSfe/s72-c/1.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>The Hyderabad Public School, Mayur Marg, Begumpet, Hyderabad, Andhra Pradesh 500016, India</georss:featurename><georss:point>17.4445264 78.457432899999958</georss:point><georss:box>17.4369524 78.447347899999954 17.452100400000003 78.467517899999962</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3190935115660981173.post-4140037307557385600</id><published>2013-06-14T01:49:00.000-07:00</published><updated>2013-06-17T01:59:19.225-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Asp.net / C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Hacks"/><category scheme="http://www.blogger.com/atom/ns#" term="Itextsharp"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery and CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC3"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC4"/><category scheme="http://www.blogger.com/atom/ns#" term="Razor"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips and Tricks"/><title type='text'>How to prevent the multiple submit of record in ASP.Net MVC using JQuery</title><content type='html'>There are various methods are available to do that one, it can be done using JQuery, using sessions or Filters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Method -1 ( Using JQuery Approach)&lt;br /&gt;
&lt;pre style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;&quot;&gt;&amp;nbsp;$(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;form&#39;&lt;/span&gt;).submit(&lt;span style=&quot;color: blue;&quot;&gt;function&lt;/span&gt;&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;if&lt;/span&gt;&amp;nbsp;($(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;).find(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;.input-validation-error&#39;&lt;/span&gt;).length&amp;nbsp;==&amp;nbsp;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;$(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;).find(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;:submit&#39;&lt;/span&gt;).attr(&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;disabled&#39;&lt;/span&gt;,&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;disabled&#39;&lt;/span&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;/pre&gt;
&lt;br /&gt;
This is the simplest method to prevent the&amp;nbsp;multiple submission of the record in MVC and even it works on JQuery Unobstructive validations.&lt;br /&gt;
&lt;br /&gt;
Happy Coding!</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/4140037307557385600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2013/06/how-to-prevent-multiple-submit-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/4140037307557385600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/4140037307557385600'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2013/06/how-to-prevent-multiple-submit-of.html' title='How to prevent the multiple submit of record in ASP.Net MVC using JQuery'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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><georss:featurename>The Hyderabad Public School, Mayur Marg, Begumpet, Hyderabad, Andhra Pradesh 500016, India</georss:featurename><georss:point>17.443149491894363 78.459548950195312</georss:point><georss:box>17.439362491894364 78.454506450195311 17.446936491894363 78.464591450195314</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3190935115660981173.post-5036629316793235297</id><published>2013-06-05T23:14:00.001-07:00</published><updated>2013-06-17T02:00:18.555-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MS Sql Server 2008/2008 R2"/><title type='text'>How to get a set of record from middle of the table, Say you need records from 5 to 15 from a table containing 100 records in SQL Server</title><content type='html'>Its a small query that will help you to find the records from from &amp;nbsp;n to m from a table having N records.&lt;br /&gt;
&lt;br /&gt;
Where N :- total records in the table.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; n :- starting record number.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; m :- ending record number.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Courier New, Courier, monospace;&quot;&gt;select top 20 * from School&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Courier New, Courier, monospace;&quot;&gt;except&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: Courier New, Courier, monospace;&quot;&gt;select top (5) * from School&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
so, here it first select top 20 records and from it it discards the 1st top 5 records.&lt;br /&gt;
&lt;br /&gt;
Enjoy!</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/5036629316793235297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2013/06/how-to-get-set-of-record-from-middle-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/5036629316793235297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/5036629316793235297'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2013/06/how-to-get-set-of-record-from-middle-of.html' title='How to get a set of record from middle of the table, Say you need records from 5 to 15 from a table containing 100 records in SQL Server'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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><georss:featurename>The Hyderabad Public School, Mayur Marg, Begumpet, Hyderabad, Andhra Pradesh 500016, India</georss:featurename><georss:point>17.4445264 78.457432899999958</georss:point><georss:box>17.4369524 78.447347899999954 17.452100400000003 78.467517899999962</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3190935115660981173.post-5344407274854612682</id><published>2013-06-05T04:03:00.002-07:00</published><updated>2013-06-05T04:05:29.959-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="kendo UI"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC3"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC4"/><title type='text'>Writing multiple condition for a Kendo Grid column Template to fetch the record.</title><content type='html'>&lt;pre style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;&quot;&gt;&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;Sometime you are required to write a template for Kendo Grid to fetch the data on a condition below is the column template to write multiple condition to do it. Its easy one, but to&amp;nbsp;remember those small tricky things, I had posted this one.&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;&quot;&gt;Column[&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;&quot;&gt;{&amp;nbsp;field:&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;DateActivated&quot;&lt;/span&gt;,&amp;nbsp;title:&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Activated&quot;&lt;/span&gt;,&amp;nbsp;width:&amp;nbsp;50,&amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;&quot;&gt;template:&amp;nbsp;&lt;span style=&quot;color: #a31515;&quot;&gt;&#39;#=(DateActivated==null)?&quot;&quot;:(Status==&quot;Requested&quot;)?&quot;&quot;:&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;&quot;&gt;&lt;span style=&quot;color: #a31515;&quot;&gt;&amp;nbsp;kendo.toString(kendo.parseDate(DateActivated&quot;),&quot;MM/dd/yyyy&quot;)#&#39;&lt;/span&gt;,filterable:&amp;nbsp;&lt;span style=&quot;color: blue;&quot;&gt;false&lt;/span&gt;&amp;nbsp;}]
&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;&quot;&gt;
&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; background-position: initial initial; background-repeat: initial initial; font-family: Consolas; font-size: 13px;&quot;&gt;&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;Happy Coding!&lt;/span&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/5344407274854612682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2013/06/writing-multiple-condition-for-kendo.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/5344407274854612682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/5344407274854612682'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2013/06/writing-multiple-condition-for-kendo.html' title='Writing multiple condition for a Kendo Grid column Template to fetch the record.'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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-3190935115660981173.post-2591447680017980321</id><published>2013-06-04T02:49:00.001-07:00</published><updated>2013-06-17T02:11:25.438-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Info"/><category scheme="http://www.blogger.com/atom/ns#" term="Itextsharp"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC3"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC4"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips and Tricks"/><title type='text'>Getting the Error &quot;The document has no pages&quot; in PDF reporting Using ItextSharp in Asp.net MVC3/MVC4</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Today while working with a project, I got a task to do i.e for creating dynamic PDFs of the View.&lt;br /&gt;
So I had started working on that and completed before time.&lt;br /&gt;
&lt;br /&gt;
However , when I tried to put into the azure production environment, i got peculiar error which i had not observed in my dev Environment or in the stage.&lt;br /&gt;
&lt;br /&gt;
The error I got is &amp;nbsp;&quot;&lt;span style=&quot;color: red;&quot;&gt;The document has no pages&lt;/span&gt;&quot; . I started doing research into it but unable to find any solution. At last, I thought that it might be out of memory or buffering issue, no still that is not the case. the problem arises due to inability to find the relative source path that you had provided to the image source in the view while creating the PDF with the logo or images in it.&lt;br /&gt;
&lt;br /&gt;
So, before deploying to the production server be sure the following things has been checked:&lt;br /&gt;
&lt;br /&gt;
1) The Image file which u have used must be existing in the website inside some folder.&lt;br /&gt;
2) Be sure that PDF supports few file formats such as .jpg/.bmp, so use the image of that type.&lt;br /&gt;
3) Don&#39;t use the image source with relative URL, it will not be able to find the image. It will work in the local but throw an error in production or staging server. So better use the live site followed with the image source.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are still getting the same error then just try to render some text and check whether it is rendering or not. If it is rendering then there might be some image rendering issue. Is still getting the error then just recheck your code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Happy coding!&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/2591447680017980321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2013/06/getting-error-document-has-no-pages-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/2591447680017980321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/2591447680017980321'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2013/06/getting-error-document-has-no-pages-in.html' title='Getting the Error &quot;The document has no pages&quot; in PDF reporting Using ItextSharp in Asp.net MVC3/MVC4'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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><georss:featurename>The Hyderabad Public School, Mayur Marg, Begumpet, Hyderabad, Andhra Pradesh 500016, India</georss:featurename><georss:point>17.4445264 78.457432899999958</georss:point><georss:box>17.4369524 78.447347899999954 17.452100400000003 78.467517899999962</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3190935115660981173.post-2888221846358485329</id><published>2013-05-24T02:11:00.001-07:00</published><updated>2013-06-17T03:11:42.234-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CSS and JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML-CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery and CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="kendo UI"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC3"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC4"/><category scheme="http://www.blogger.com/atom/ns#" term="Telerik MVC grids"/><title type='text'>Jquery Method to Check the File upload control Empty or not, File Size and File Type(e.g. JPG,BMP,PDF)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Html:&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;lt;input type=&quot;file&quot; id=&quot;file&quot; name=&quot;file&quot; /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;lt;span id=&quot;valFile&quot; class=&quot;&quot;&amp;gt;&amp;lt;/span&amp;gt; // span for showing error message.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;CSS:&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;.field-validation-error {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; color: #f00;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;.field-validation-valid {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; display: none;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;.input-validation-error {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; border: 1px solid #f00;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; background-color: #fee;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;JQuery Snippet:&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;$(document).ready(function( )&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;//Changing the Error message of the File Upload and checking the File size and File type.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;#file&quot;).change(function () {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;#valFile&quot;).html(&quot;Please select file.&quot;); // Default Error Message&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var fileExtension = [&#39;jpeg&#39;, &#39;jpg&#39;, &#39;png&#39;, &#39;gif&#39;, &#39;bmp&#39;, &#39;doc&#39;, &#39;docx&#39;, &#39;pdf&#39;];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ($(this).val() != &quot;&quot;) { //checking wheather the file uploader is empty or not&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Checking the File type&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ($.inArray($(this).val().split(&#39;.&#39;).pop().toLowerCase(), fileExtension) == -1) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(this).addClass(&quot;input-validation-error&quot;).removeClass(&quot;valid&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;#valFile&quot;).addClass(&quot;field-validation-error&quot;).removeClass(&quot;field-validation-valid&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&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; .html(&quot;Invalid Filetype(only image files/doc/docx/pdf)&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&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;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(this).removeClass(&quot;input-validation-error&quot;).addClass(&quot;valid&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;#valFile&quot;).removeClass(&quot;field-validation-error&quot;).addClass(&quot;field-validation-valid&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ((this.files[0].size &amp;gt; 4194304) &amp;amp;&amp;amp; ($(this).val() != &#39;&#39;)) {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&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; $(this).addClass(&quot;input-validation-error&quot;).removeClass(&quot;valid&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&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; $(&quot;#valFile&quot;).addClass(&quot;field-validation-error&quot;).removeClass(&quot;field-validation-valid&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&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; .html(&quot;File size exceeded 4MB&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&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;font-family: Trebuchet MS, sans-serif;&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;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(this).addClass(&quot;input-validation-error&quot;).removeClass(&quot;valid&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;#valFile&quot;).addClass(&quot;field-validation-error&quot;).removeClass(&quot;field-validation-valid&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;});&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Happy Coding!&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/2888221846358485329/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2013/05/jquery-method-to-check-file-upload.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/2888221846358485329'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/2888221846358485329'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2013/05/jquery-method-to-check-file-upload.html' title='Jquery Method to Check the File upload control Empty or not, File Size and File Type(e.g. JPG,BMP,PDF)'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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><georss:featurename>The Hyderabad Public School, Mayur Marg, Begumpet, Hyderabad, Andhra Pradesh 500016, India</georss:featurename><georss:point>17.4445264 78.457432899999958</georss:point><georss:box>17.4369524 78.447347899999954 17.452100400000003 78.467517899999962</georss:box></entry><entry><id>tag:blogger.com,1999:blog-3190935115660981173.post-8482057033449442814</id><published>2013-05-22T06:03:00.000-07:00</published><updated>2013-05-22T06:03:37.763-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="Hacks"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML-CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC3"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC4"/><category scheme="http://www.blogger.com/atom/ns#" term="Telerik MVC grids"/><category scheme="http://www.blogger.com/atom/ns#" term="Tips and Tricks"/><category scheme="http://www.blogger.com/atom/ns#" term="validation of asp.net controls"/><title type='text'>How to create a File Upload with File Validation in Asp.net MVC / How to Use the @Html.TextBoxFor() for File Upload ?</title><content type='html'>While Wonder how to validate the Upload control in a easy way, I find this solution as the best to do it, although lot of other ways are found.This is because you need not need to write much more code as a normal razor validation will solve the problem.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;My View:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;
&lt;br /&gt;
&amp;nbsp;&amp;lt;div id=&quot;dvUpload&quot; class=&quot;hide fieldControlContainer&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div class=&quot;innerDivLeft&quot;&amp;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;lt;label class=&quot;blue&quot;&amp;gt;Upload Document:&amp;lt;/label&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div class=&quot;innerDivRight&quot;&amp;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;span style=&quot;color: red;&quot;&gt;&amp;nbsp; @Html.TextBoxFor(model =&amp;gt; model.File, new { @class = &quot;inputTextBox&quot;, type=&quot;file&quot; })&lt;/span&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; @Html.ValidationMessageFor(model =&amp;gt; model.File)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The magic lies with this line&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;@Html.TextBoxFor(model =&amp;gt; model.File, new { @class = &quot;inputTextBox&quot;, type=&quot;file&quot; }), &lt;/span&gt;here it will be rendered as a file upload control rather than a text because we are over riding the default&amp;nbsp;behavior&amp;nbsp;of input tag rendering by specifying it as type=&quot;file&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;My Controller:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;public ActionResult Index(HttpPostedFileBase file, MyModel model)&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Codes written here.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;MyModel:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;
public class MyModel&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[Required(ErrorMessage = &quot;Please select file&quot;)] &amp;nbsp; &amp;nbsp; // &lt;span style=&quot;color: red;&quot;&gt;this is for model validation&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public HttpPostedFileBase File { get; set; }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;
Now your file upload validation will be checked like any other normal control.&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/8482057033449442814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2013/05/how-to-create-file-upload-with-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/8482057033449442814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/8482057033449442814'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2013/05/how-to-create-file-upload-with-file.html' title='How to create a File Upload with File Validation in Asp.net MVC / How to Use the @Html.TextBoxFor() for File Upload ?'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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-3190935115660981173.post-8405300150392190040</id><published>2013-05-17T04:56:00.003-07:00</published><updated>2013-05-17T04:57:29.349-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML-CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery and CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC3"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC4"/><category scheme="http://www.blogger.com/atom/ns#" term="Razor"/><title type='text'>How to make a textbox to accept only integers as Input.</title><content type='html'>&lt;b&gt;&lt;u&gt;Html Page:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;lt;input type=&quot;text&quot; name=&quot;age&quot; id=&quot;txtAge&quot; /&amp;gt;&amp;amp;nbsp;&amp;lt;span id=&quot;errormsg&quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;JQuery Snippet for the above TextBox:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;
&lt;b&gt;&lt;u&gt;Method-1:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
$(document).ready(function () {&lt;br /&gt;
&amp;nbsp; //called when key is pressed in textbox&lt;br /&gt;
&amp;nbsp; $(&quot;#txtAge&quot;).keypress(function (e) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;//if the letter is not digit then display error and don&#39;t type anything&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;if (e.which != 8 &amp;amp;&amp;amp; e.which != 0 &amp;amp;&amp;amp; (e.which &amp;lt; 48 || e.which &amp;gt; 57)) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //display error message&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(&quot;#errormsg&quot;).html(&quot;Digits Only&quot;).show().fadeOut(&quot;slow&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return false;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp;});&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;Method-2:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
$(document).ready(function () {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; $(&quot;#txtAge&quot;).keydown(function (e) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (e.shiftKey) e.preventDefault();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var nKeyCode = e.keyCode;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Ignore Backspace (Keycode=8), Tab keys(Keycode=9) &amp;nbsp;&amp;amp; Delete(Keycode=46)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (nKeyCode == 8 || nKeyCode == 9 || nKeyCode == 46) return;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (nKeyCode &amp;lt; 95) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (nKeyCode &amp;lt; 48 || nKeyCode &amp;gt; 57) e.preventDefault();&lt;br /&gt;
&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; if (nKeyCode &amp;lt; 96 || nKeyCode &amp;gt; 105) e.preventDefault();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; });&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
Enjoy!&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/8405300150392190040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2013/05/how-to-make-textbox-to-accept-only.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/8405300150392190040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/8405300150392190040'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2013/05/how-to-make-textbox-to-accept-only.html' title='How to make a textbox to accept only integers as Input.'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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-3190935115660981173.post-4539498565217575259</id><published>2013-05-16T03:45:00.000-07:00</published><updated>2013-05-16T03:47:42.703-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Hacks"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML-CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC3"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC4"/><title type='text'>Uploading a file to Server in Asp.net MVC 3 /4.</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;View page:&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;@using (Html.BeginForm(&lt;span style=&quot;color: red;&quot;&gt;&quot;Index&quot;, &quot;MyController&quot;, FormMethod.Post , new { enctype = &quot;multipart/form-data&quot; }&lt;/span&gt;))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;// &amp;nbsp;Controls for your Model........(see below)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp;&amp;lt;div&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div class=&quot;innerLeftContainer&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;label &amp;gt;Full Name:&amp;lt;/label&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div class=&quot;innerRightContainer&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.TextBoxFor(model =&amp;gt; model.FullName, new {@class = &quot;inputTextBox&quot;})&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Html.ValidationMessageFor(model=&amp;gt;model.FullName)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;lt;div id=&quot;dvUpload&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div class=&quot;innerLeftContainer&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;label&amp;gt;Upload Document:&amp;lt;/label&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;div class=&quot;innerRightContainer&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&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;lt;input type=&quot;file&quot; id=&quot;DocumentUpload&quot; name=&quot;file&quot; /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Note: The Form Method and the enctype is highly required for uploading your file to the server orthrwise you will always get the HttpPostedFileBase as null.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;Action Method: ( in the Controller)&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp;[HttpPost]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public ActionResult Index(HttpPostedFileBase file, MyModel model)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Verify that the user selected a file&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (file != null &amp;amp;&amp;amp; file.ContentLength &amp;gt; 0)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // extract only the fielname&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var fileName = Path.GetFileName(file.FileName);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (fileName != null)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&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;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // store the file inside ~/App_Data/uploads folder&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var path = Path.Combine(Server.MapPath(&quot;~/App_Data/uploads&quot;), fileName);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; file.SaveAs(path);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&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;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // redirect back to the index action to show the form once again&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return RedirectToAction(&quot;Index&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Trebuchet MS, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/4539498565217575259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2013/05/uploading-file-to-server-in-aspnet-mvc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/4539498565217575259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/4539498565217575259'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2013/05/uploading-file-to-server-in-aspnet-mvc.html' title='Uploading a file to Server in Asp.net MVC 3 /4.'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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-3190935115660981173.post-1023648309074126683</id><published>2013-04-25T04:55:00.000-07:00</published><updated>2013-04-25T04:55:05.567-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Utility tools"/><title type='text'>Test you Website with different screen resolution and in diferent device</title><content type='html'>While browsing, today I find out that by providing you website url &amp;nbsp;below the link helps you to test your site in different resolution.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://quirktools.com/screenfly/&quot;&gt;http://quirktools.com/screenfly/&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000ee;&quot;&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;
For Example: I need to test: WWW.Google.com, so give the URL in the textbox. once you give it will activate the devices resolution&lt;br /&gt;&lt;a href=&quot;http://quirktools.com/screenfly/&quot;&gt;&lt;/a&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/AVvXsEic6XTXDdh42rI69ref-rcc1Yc4o2hyphenhyphenjAQeTROqPMx2W71s1J17wMsq09Mg2c07ujlnM-dbT9Tjpt1o3hz6BJiTaWvAwkENkvmIFTJlndxhwa0kTHf766nBrZkpxGcjvLIleL_7QkWT-RBv/s1600/1.png&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/AVvXsEic6XTXDdh42rI69ref-rcc1Yc4o2hyphenhyphenjAQeTROqPMx2W71s1J17wMsq09Mg2c07ujlnM-dbT9Tjpt1o3hz6BJiTaWvAwkENkvmIFTJlndxhwa0kTHf766nBrZkpxGcjvLIleL_7QkWT-RBv/s1600/1.png&quot; height=&quot;224&quot; width=&quot;640&quot; /&gt;&lt;/a&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/AVvXsEhkVf5enH_xg32Upw61BbtLMq0s1neebEY8v-HsNyY-vyhkfMg_zjuBo1Ccix9Hz6yUPnSaXDFIlY9N52DkG9FKhiX2wOLNFw-xtYTQvf_Ay45eZZlrjPV_SAL2fhhUoMT6WYf5XsVt46nS/s1600/2.png&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/AVvXsEhkVf5enH_xg32Upw61BbtLMq0s1neebEY8v-HsNyY-vyhkfMg_zjuBo1Ccix9Hz6yUPnSaXDFIlY9N52DkG9FKhiX2wOLNFw-xtYTQvf_Ay45eZZlrjPV_SAL2fhhUoMT6WYf5XsVt46nS/s1600/2.png&quot; height=&quot;356&quot; width=&quot;640&quot; /&gt;&lt;/a&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;
</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/1023648309074126683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2013/04/test-you-website-with-different-screen.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/1023648309074126683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/1023648309074126683'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2013/04/test-you-website-with-different-screen.html' title='Test you Website with different screen resolution and in diferent device'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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/AVvXsEic6XTXDdh42rI69ref-rcc1Yc4o2hyphenhyphenjAQeTROqPMx2W71s1J17wMsq09Mg2c07ujlnM-dbT9Tjpt1o3hz6BJiTaWvAwkENkvmIFTJlndxhwa0kTHf766nBrZkpxGcjvLIleL_7QkWT-RBv/s72-c/1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3190935115660981173.post-7172085476772014292</id><published>2013-04-24T04:12:00.001-07:00</published><updated>2013-04-24T04:16:13.572-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML-CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery and CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="kendo UI"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC3"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC4"/><category scheme="http://www.blogger.com/atom/ns#" term="Telerik MVC grids"/><title type='text'>Searching Records from the Kendo Grid by Date given in the Search Box.</title><content type='html'>&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;While working on a project I came to an issue in kendo grid i.e to search the Grid records using Date.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;Say , I had an accounts list from a bank in which lots of data are displayed including A/C opening date, Last log-in, Last transaction, Last Unsuccessful Log-in and there is a search box that finds the records when the date is given in the search box. But to my dismay it doesn&#39;t works for me, after spending a valuable of&amp;nbsp;1 day&amp;nbsp;of my work , I had got the success.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;So here is the image below:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&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/AVvXsEjyA-86InzAilsfFTEVeqXhykK8x9Tn12EtHmSD9rL7aGVF-Yb91Wjz73keFVMbWXyIPeUyEzBNMbL7dbo9LGYcM7Yi1C-iNACjZhY9S_S6csYuqErm58G9T06ezBCGEcl8bd6E7aSpVtPQ/s1600/Search+Grid.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/a&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/AVvXsEhtyQleILcMHEjEQFcL6RAhv3U57gfMp0NqeHhbbGgge-2xtAehFpSjZjwbQ1y5WpAyerKNVAQ3mXzP89YF0jw9iQVjoL7LA3xSePzufMuGF1bJo7LKfEKIgU-R_uiGzBk8vNsR6-N30dFc/s1600/Search-Grid.png&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/AVvXsEhtyQleILcMHEjEQFcL6RAhv3U57gfMp0NqeHhbbGgge-2xtAehFpSjZjwbQ1y5WpAyerKNVAQ3mXzP89YF0jw9iQVjoL7LA3xSePzufMuGF1bJo7LKfEKIgU-R_uiGzBk8vNsR6-N30dFc/s1600/Search-Grid.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;The Code to make your grid work for dates&amp;nbsp;filtration&amp;nbsp;or searching:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;In the web page(.html / .cshtml / .jsp etc)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;lt;div id=&quot;grid&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;Script:&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;$(document).ready(function () {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;initGrid();&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;/// This function is called when you start typing in the search textbox. Here Id of search textbox is #search.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; $(&#39;#search&#39;).keyup(function () {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; clearTimeout($.data(this, &#39;timer&#39;));&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var wait = setTimeout(searchDataSource, 500);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(this).data(&#39;timer&#39;, wait);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; });&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;});&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;function searchDataSource() {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var query = $(&quot;#search&quot;).val();&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var $filter = [&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&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;{ field: &quot;AccOpenDate&quot;, operator: &quot;eq&quot;, value: new Date(query) },&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&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;{ field: &quot;LastLogin&quot;, operator: &quot;eq&quot;, value: new Date(query) },&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&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;{ field: &quot;LastTrans&quot;, operator: &quot;eq&quot;, value: new Date(query) },&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&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;{ field: &quot;FaliureLogin&quot;, operator: &quot;eq&quot;, value: new Date(query) }&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ];&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (query.length &amp;gt; 2) &amp;nbsp;// search only when the no. of character typed is greater than 2&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; grid.data(&quot;kendoGrid&quot;).&lt;wbr&gt;&lt;/wbr&gt;dataSource.filter({&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; logic: &quot;or&quot;,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filters: $filter&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else if (query.length == 0)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; grid.data(&quot;kendoGrid&quot;).&lt;wbr&gt;&lt;/wbr&gt;dataSource.filter([]);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;function initGrid() {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; grid = $(&quot;#grid&quot;).kendoGrid({&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dataSource: {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; transport: { read: &quot;/Bank/accounts&quot; },&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; schema: { data: &quot;Data&quot;, total: &quot;Total&quot; },&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pageSize: 30,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; serverPaging: false,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; serverFiltering: false,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; serverSorting: false&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; height: gridHeight,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; change: function () {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var selectedRows = this.select();&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; selectedElement = this.dataItem(selectedRows[0])&lt;wbr&gt;&lt;/wbr&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; showActionPane(&lt;wbr&gt;&lt;/wbr&gt;selectedElement.Name != null &amp;amp;&amp;amp; selectedElement.Name != &quot;&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; selectable: &quot;single&quot;,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; filterable: true,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sortable: true,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pageable: true,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resizable: true,&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; columns: [&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { field: &quot;Name&quot;, title: &quot;Name&quot;, width: 60, template: &#39;&amp;lt;a href=&quot;/Account/Details/#=Id#&quot;&amp;gt;&lt;wbr&gt;&lt;/wbr&gt;#=Name#&amp;lt;/a&amp;gt;&#39; },&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { field: &quot;Status&quot;, title: &quot;Status&quot;, width: 50 },&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { field: &quot;AccountType&quot;, title: &quot;Account Type&quot;, width: 80 },&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { field: &quot;AccOpenDate&quot;, title: &quot;A/c Open Date&quot;, width: 50, template: &#39;#=(AccOpenDate==null)?&quot;&quot;:&lt;wbr&gt;&lt;/wbr&gt;kendo.toString(kendo.&lt;wbr&gt;&lt;/wbr&gt;parseDate(AccOpenDate,&quot;0:MM/&lt;wbr&gt;&lt;/wbr&gt;dd/yyyy&quot;),&quot;MM/dd/yyyy&quot;) #&#39;, filterable: true, format: &quot;{0:M/d/yyyy}&quot;, type: &quot;date&quot; },&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { field: &quot;LastLogin&quot;, title: &quot;Last Login&quot;, width: 50, template: &#39;#=(LastLogin==null)?&quot;&quot;:&lt;wbr&gt;&lt;/wbr&gt;kendo.toString(kendo.&lt;wbr&gt;&lt;/wbr&gt;parseDate(LastLogin,&quot;0:MM/&lt;wbr&gt;&lt;/wbr&gt;dd/yyyy&quot;),&quot;MM/dd/yyyy&quot;) #&#39;, filterable: false, format: &quot;{0:M/d/yyyy}&quot;, type: &quot;date&quot; },&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { field: &quot;LastTrans&quot;, title: &quot;Last Transaction&quot;, width: 50, template: &#39;#=(LastTrans==null)?&quot;&quot;:&lt;wbr&gt;&lt;/wbr&gt;kendo.toString(kendo.&lt;wbr&gt;&lt;/wbr&gt;parseDate(LastTrans,&quot;0:&lt;wbr&gt;&lt;/wbr&gt;MM/dd/yyyy&quot;),&quot;MM/dd/yyyy&quot;) #&#39;, filterable: false, format: &quot;{0:M/d/yyyy}&quot;, type: &quot;date&quot; },&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { field: &quot;FaliureLogin&quot;, title: &quot;Unsuccessful Login&quot;, width: 50, template: &#39;#=(FaliureLogin==null)?&quot;&quot;:&lt;wbr&gt;&lt;/wbr&gt;kendo.toString(kendo.&lt;wbr&gt;&lt;/wbr&gt;parseDate(FaliureLogin,&quot;0:MM/&lt;wbr&gt;&lt;/wbr&gt;dd/yyyy&quot;),&quot;MM/dd/yyyy&quot;) #&#39;, filterable: false, format: &quot;{0:M/d/yyyy}&quot;, type: &quot;date&quot; }&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; });&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222;&quot;&gt;
&lt;h4&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;u&gt;output:&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #222222; font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Search records by Date through Search Textbox text:&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;b style=&quot;background-color: transparent;&quot;&gt;&lt;span style=&quot;color: #222222; font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;( here searching the record occurs on all the&amp;nbsp;columns)&lt;/span&gt;&lt;/b&gt;&lt;/h4&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/AVvXsEg19oAEjDiYrmS1dQ6nJXPGfj43IsxL1CPbUpJB-IpFGh6hNE3CNnZOT-k286HJVAYwb71oOGEIyi0iLn7kvdsZmGiFzJJ42ZIM7eerSRdB1tzM1CALloanzWlH59pxM6EUjMJbKkoKzg2O/s1600/1.png&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/AVvXsEg19oAEjDiYrmS1dQ6nJXPGfj43IsxL1CPbUpJB-IpFGh6hNE3CNnZOT-k286HJVAYwb71oOGEIyi0iLn7kvdsZmGiFzJJ42ZIM7eerSRdB1tzM1CALloanzWlH59pxM6EUjMJbKkoKzg2O/s1600/1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&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 style=&quot;background-color: white;&quot;&gt;
&lt;h4&gt;
&lt;b&gt;&lt;span style=&quot;color: #222222; font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;Search records by Date through filter Button: ( here searching the record which has opened on 04/04/2013. So two records where as in the above it is searching all the&amp;nbsp;columns having 04/04/2013. so three records.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/h4&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/AVvXsEgnbBXToZEbelSEj3RwSlcQFaGtaNmg80qfaPjHg3cYx06gUmAlM34doyXePpzvFWbBiH0cXzFc_dSJrreqSJzZwkotSmPySBDQolsb6pRH09AxfhCgDGlI5hVKowN__hfbx5LnUgJbVRM1/s1600/2.png&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/AVvXsEgnbBXToZEbelSEj3RwSlcQFaGtaNmg80qfaPjHg3cYx06gUmAlM34doyXePpzvFWbBiH0cXzFc_dSJrreqSJzZwkotSmPySBDQolsb6pRH09AxfhCgDGlI5hVKowN__hfbx5LnUgJbVRM1/s1600/2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #222222; font-size: 13px;&quot;&gt;
&lt;b style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/7172085476772014292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2013/04/searching-records-from-kendo-grid-by.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/7172085476772014292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/7172085476772014292'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2013/04/searching-records-from-kendo-grid-by.html' title='Searching Records from the Kendo Grid by Date given in the Search Box.'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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/AVvXsEhtyQleILcMHEjEQFcL6RAhv3U57gfMp0NqeHhbbGgge-2xtAehFpSjZjwbQ1y5WpAyerKNVAQ3mXzP89YF0jw9iQVjoL7LA3xSePzufMuGF1bJo7LKfEKIgU-R_uiGzBk8vNsR6-N30dFc/s72-c/Search-Grid.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3190935115660981173.post-689058485907774879</id><published>2013-04-23T02:15:00.000-07:00</published><updated>2013-04-23T02:15:05.435-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="CSS and JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML-CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery and CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="kendo UI"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC3"/><title type='text'>How to count the number of check-box checked on a particular condition from a table using Jquery</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;u style=&quot;font-weight: bold;&quot;&gt;Scenario:&lt;/u&gt;&amp;nbsp;Assume that a table has data from a cricket team with details such as ID , Name, Role , Age ,City, Average. SO you need to calculate how many bowlers you have selected from the table, total no. of players selected and their average age.&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;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwcWuJy-rgHptNufY8XPn50YCQAShzcDIeFFw5t4dVVDmxrj6B_VSY4H7UHxnmhClrE25bMUVVUDfQd8KKxuqd1yro-Gq-p7BbUfpBUm2IWfmxaQopRnDtGYY-icFLy2i4VaMA2Qes5uBM/s1600/1.png&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/AVvXsEhwcWuJy-rgHptNufY8XPn50YCQAShzcDIeFFw5t4dVVDmxrj6B_VSY4H7UHxnmhClrE25bMUVVUDfQd8KKxuqd1yro-Gq-p7BbUfpBUm2IWfmxaQopRnDtGYY-icFLy2i4VaMA2Qes5uBM/s1600/1.png&quot; /&gt;&lt;/a&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;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilHLlxKyQlsaluvk9C-3Zm4PoLyPiAxmTRAebq3oYiiQaUDjf0UTK6Y3EwiheiJ2SZVoAiQuYo-HBChE7bgM_vlO-K7v22C_h9gvKYLKwoq0Fl5-BOtD8bozhMOezlHjLcaBfNeraWnCw-/s1600/2.png&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/AVvXsEilHLlxKyQlsaluvk9C-3Zm4PoLyPiAxmTRAebq3oYiiQaUDjf0UTK6Y3EwiheiJ2SZVoAiQuYo-HBChE7bgM_vlO-K7v22C_h9gvKYLKwoq0Fl5-BOtD8bozhMOezlHjLcaBfNeraWnCw-/s1600/2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Similarly, if batsman age or count is required then simply change the value of Contains to &quot;Batsman&quot; from the above code.&lt;br /&gt;
&lt;br /&gt;
Happy Coding!</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/689058485907774879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2013/04/how-to-count-number-of-check-box.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/689058485907774879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/689058485907774879'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2013/04/how-to-count-number-of-check-box.html' title='How to count the number of check-box checked on a particular condition from a table using Jquery'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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/AVvXsEhwcWuJy-rgHptNufY8XPn50YCQAShzcDIeFFw5t4dVVDmxrj6B_VSY4H7UHxnmhClrE25bMUVVUDfQd8KKxuqd1yro-Gq-p7BbUfpBUm2IWfmxaQopRnDtGYY-icFLy2i4VaMA2Qes5uBM/s72-c/1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3190935115660981173.post-2057429079151323001</id><published>2013-04-23T00:30:00.000-07:00</published><updated>2013-04-23T00:31:47.388-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="Asp.net/C#"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML-CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery and CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="kendo UI"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC3"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC4"/><title type='text'>How to check all the check box when All check-box is checked and uncheck All check-box, if one of the check-box from the group is unchecked</title><content type='html'>&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;lt;form name=&quot;frmChkForm&quot; id=&quot;frmChkForm&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;lt;input type=&quot;checkbox&quot; name=&quot;chkcc9&quot; id=&quot;chkAll&quot;&amp;gt;Check Me&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;lt;input type=&quot;checkbox&quot; name=&quot;Bowler&quot; class=&quot;chkGroup&quot;&amp;gt;Bowler&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;lt;input type=&quot;checkbox&quot; name=&quot;Batsman&quot; class=&quot;chkGroup&quot;&amp;gt;Batsman&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;lt;input type=&quot;checkbox&quot; name=&quot;AllRounder&quot; class=&quot;chkGroup&quot;&amp;gt;AllRounder&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;$(&quot;#chkAll&quot;).click(function() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;$(&quot;.chkGroup&quot;).attr(&quot;checked&quot;, this.checked);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;});&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;With added functionality to ensure the check all checkbox gets checked/dechecked if all individual checkboxes are checked:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;$(&quot;.chkGroup&quot;).click(function() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; $(&quot;#chkAll&quot;)[0].checked = $(&quot;.chkGroup:checked&quot;).length == $(&quot;.chkGroup&quot;).length;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;});&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Happy Coding!&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/2057429079151323001/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2013/04/how-to-check-all-check-box-when-all-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/2057429079151323001'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/2057429079151323001'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2013/04/how-to-check-all-check-box-when-all-is.html' title='How to check all the check box when All check-box is checked and uncheck All check-box, if one of the check-box from the group is unchecked'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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-3190935115660981173.post-2220960954001254480</id><published>2013-04-23T00:25:00.002-07:00</published><updated>2013-04-23T00:25:37.640-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Asp.net"/><category scheme="http://www.blogger.com/atom/ns#" term="Asp.net / C#"/><category scheme="http://www.blogger.com/atom/ns#" term="Asp.net/C#"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery and CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="kendo UI"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC3"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC4"/><title type='text'>Blank out a form/ reset a form with jQuery</title><content type='html'>&lt;br /&gt;
&lt;u&gt;First method:&lt;/u&gt;&lt;br /&gt;
&amp;lt;form id=&quot;form&quot;&amp;gt;&lt;br /&gt;
&amp;lt;input type=&quot;text&quot; value=&quot;Here is some data&quot; id=&quot;data&quot; /&amp;gt;&lt;br /&gt;
&amp;lt;input type=&quot;button&quot; value=&quot;Clear Input&quot; id=&quot;button&quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
$(function(){&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; $(&#39;#button&#39;).click(function(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$(&#39;:input&#39;,&#39;#form&#39;).not(&#39;:button, :submit, :reset, :hidden&#39;).val(&#39;&#39;).removeAttr(&#39;checked,selected&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; });&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;Second method:&lt;/u&gt;&lt;br /&gt;
function clearForms()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; var i;&lt;br /&gt;
&amp;nbsp; for (i = 0; (i &amp;lt; document.forms.length); i++) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; document.forms[i].reset();&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Happy Coding!&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/2220960954001254480/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2013/04/blank-out-form-reset-form-with-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/2220960954001254480'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/2220960954001254480'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2013/04/blank-out-form-reset-form-with-jquery.html' title='Blank out a form/ reset a form with jQuery'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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-3190935115660981173.post-937940570346825333</id><published>2013-04-22T03:10:00.000-07:00</published><updated>2013-04-22T03:10:27.464-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery and CSS"/><category scheme="http://www.blogger.com/atom/ns#" term="kendo UI"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC3"/><category scheme="http://www.blogger.com/atom/ns#" term="MVC4"/><title type='text'>Ajax method of calling Action method of a controller:</title><content type='html'>&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;I need to call a action method in order to save the uploaded image file using Jquery or the Ajax method. So below is the code for it.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;$.ajax({&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;url: &lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; color: #a31515; line-height: 115%; padding: 0in;&quot;&gt;&quot;/&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;Image&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; color: #a31515; line-height: 115%; padding: 0in;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;&lt;b&gt;UploadTest&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; color: #a31515; line-height: 115%; padding: 0in;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;&amp;nbsp;//&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: red; line-height: 115%;&quot;&gt;Image&amp;nbsp;&lt;/b&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt;is the controller &amp;amp;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;color: #38761d; line-height: 115%;&quot;&gt;UploadTest&lt;/b&gt;&lt;span style=&quot;line-height: 115%;&quot;&gt; is Action Method&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;type: &lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; color: #a31515; line-height: 115%; padding: 0in;&quot;&gt;&quot;POST&quot;&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;data: $(&lt;span style=&quot;color: blue;&quot;&gt;&quot;#frmTest&quot;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;).serialize(), &amp;nbsp; // Here provide the form Id&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;&quot; name=&quot;OLE_LINK3&quot;&gt;async: &lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; color: blue; line-height: 115%; padding: 0in;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cache: &lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; color: blue; line-height: 115%; padding: 0in;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// Don&#39;t keep the cache&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;&lt;br /&gt;
&lt;a href=&quot;&quot; name=&quot;OLE_LINK2&quot;&gt;&lt;/a&gt;&lt;a href=&quot;&quot; name=&quot;OLE_LINK1&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;beforeSend: &lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; color: blue; line-height: 115%; padding: 0in;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt; ()
{ &amp;nbsp;// This Executes before calling the Ajax Request&lt;br /&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;border: 1pt none windowtext; color: #a31515; line-height: 115%; padding: 0in;&quot;&gt;&quot;#uploadProgress&quot;&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;).show(); &amp;nbsp; // Here I am showing Uploader image&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;complete: &lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; color: blue; line-height: 115%; padding: 0in;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt; ()
{&lt;br /&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;border: 1pt none windowtext; color: #a31515; line-height: 115%; padding: 0in;&quot;&gt;&quot;#uploadProgress&quot;&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;).html(&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; color: #a31515; line-height: 115%; padding: 0in;&quot;&gt;&quot;Upload
completed&quot;&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;);&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Helvetica Neue, Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Executes on Ajax request complete&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; success: &lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; color: blue; line-height: 115%; padding: 0in;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;
(msg) {&lt;br /&gt;
&lt;br /&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;border: 1pt none windowtext; color: blue; line-height: 115%; padding: 0in;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt; (msg == &lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; color: #a31515; line-height: 115%; padding: 0in;&quot;&gt;&quot;ok&quot;&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&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; $(&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; color: #a31515; line-height: 115%; padding: 0in;&quot;&gt;&quot;#uploadProgress&quot;&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;).hide(); &amp;nbsp;// hiding the uploader image on successs&lt;br /&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;border: 1pt none windowtext; color: blue; line-height: 115%; padding: 0in;&quot;&gt;else&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&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;
alert(&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; color: #a31515; line-height: 115%; padding: 0in;&quot;&gt;&quot;Error while
uploading&quot;&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;border: 1pt none windowtext; line-height: 115%; padding: 0in;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&amp;nbsp; });&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://sudarsandash.blogspot.com/feeds/937940570346825333/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sudarsandash.blogspot.com/2013/04/ajax-method-of-calling-action-method-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/937940570346825333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3190935115660981173/posts/default/937940570346825333'/><link rel='alternate' type='text/html' href='http://sudarsandash.blogspot.com/2013/04/ajax-method-of-calling-action-method-of.html' title='Ajax method of calling Action method of a controller:'/><author><name>Sudarsan&#39;s C#, Azure IPASS</name><uri>http://www.blogger.com/profile/05398342241002046998</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>