<?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-8222837713253542135</id><updated>2024-09-05T15:13:42.839-07:00</updated><category term="C#"/><category term="MVC3"/><category term="SQL"/><category term="ASP.NET"/><category term="Java"/><category term="Javascript"/><category term=".NET"/><title type='text'>IT Zone</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>28</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-5721610777910762501</id><published>2013-03-29T02:43:00.000-07:00</published><updated>2013-08-24T04:56:58.032-07:00</updated><title type='text'> Asp.Net MVC 4 ?</title><content type='html'>&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;Past three years I have been working with ASP.NET MVC3 and it is
very good frame work to develop web application .Now Microsoft&amp;nbsp;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;has released ASP.NET MVC4 Framework
.So let see what they introduce for us.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;Mobile Application&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;ASP.NET MVC4 introduces new project
template for build mobile web application .It has same structure of the ASP.NET
MVC and a lot of handful CSS and JavaScript files are now inside, including
jQuery Mobile. So we can develop mobile browser compatible applications easily
&amp;nbsp;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;u1:p&gt;&lt;/u1:p&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;Display Modes&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;One new features of ASP.NET MVC 4 is support for display modes.
This means that you can conditionally show different output to different user
agents like desktop and mobile browsers&lt;b&gt;.&amp;nbsp;&lt;/b&gt;So we can develop two
version of the same page.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;For example, if a desktop browser requests
the Home page, the application might use the Views\Home\Index.cshtml template.
If a mobile browser requests the Home page, the application might return the
Views\Home\Index.mobile.cshtml template.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;Web API&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;ASP.NET Web API is a framework for
building and consuming HTTP services that can reach a broad range of clients
including browsers, phones and tablets. We &amp;nbsp;can use XML or JSON or
something else with your API. JSON is nice for mobile apps with slow connections,
for example. You can call an API from jQuery and better utilize the client&#39;s
machine and browser.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;Bundling and Minification&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;The new bundling feature in ASP.NET
&amp;nbsp;packs a set of JS or CSS files into a single element, and reduces its
size by minifying the content (i.e. removing not required blank spaces,
removing comments, reducing identifiers). This can help to reduce the file size
and make the site perform faster.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;OAuth and OpenID&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;&amp;nbsp;ASP.NET MVC4 include library that
enables users to log in with credentials from an external provider, such as
Facebook, Twitter, Microsoft, or Google, and then integrate some of the
functionality from those providers into your web application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;Enhanced support for Asynchronous methods&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;The .NET Framework 4 introduced an
asynchronous programming concept referred to as a&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.aspx&quot;&gt;Task&lt;/a&gt;&amp;nbsp;and
ASP.NET MVC 4 supports&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.aspx&quot;&gt;Task&lt;/a&gt;.
Tasks are represented by the&lt;b&gt;Task&lt;/b&gt;&amp;nbsp; type and related types in
the&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.threading.tasks.aspx&quot;&gt;System.Threading.Tasks&lt;/a&gt;&amp;nbsp;namespace.
The .NET Framework 4.5 builds on this asynchronous support with&amp;nbsp; the&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/hh156528(VS.110).aspx&quot;&gt;await&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/hh156513(VS.110).aspx&quot;&gt;async&lt;/a&gt;&amp;nbsp;keywords
that make working with&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.aspx&quot;&gt;Task&lt;/a&gt;&amp;nbsp;objects
much less complex than previous asynchronous approaches.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;Add Controller to any project folder&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;You can now right click and
select&amp;nbsp;Add Controller&amp;nbsp;from any folder in your MVC project. This gives
you more flexibility to organize your controllers however you want, including
keeping your MVC and Web API controllers in separate folders.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;Database Migrations&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 13.5pt; margin-bottom: .0001pt; margin: 0in;&quot;&gt;
&lt;span style=&quot;font-size: 12.5pt;&quot;&gt;ASP.NET MVC 4 projects now include Entity
Framework 5. One of the great features in Entity Framework 5 is support for
database migrations. This feature enables you to easily evolve your database
schema using a code-focused migration while preserving the data in the database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin: 0in 0in 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;u1:p&gt;&lt;/u1:p&gt;









&lt;u1:p&gt;&lt;/u1:p&gt;





&lt;u1:p&gt;&lt;/u1:p&gt;



&lt;u1:p&gt;&lt;/u1:p&gt;





&lt;u1:p&gt;&lt;/u1:p&gt;





&lt;u1:p&gt;&lt;/u1:p&gt;





&lt;u1:p&gt;&lt;/u1:p&gt;





&lt;u1:p&gt;&lt;/u1:p&gt;





&lt;u1:p&gt;&lt;/u1:p&gt;





&lt;u1:p&gt;&lt;/u1:p&gt;





&lt;u1:p&gt;&lt;/u1:p&gt;





&lt;u1:p&gt;&lt;/u1:p&gt;





&lt;u1:p&gt;&lt;/u1:p&gt;





&lt;u1:p&gt;&lt;/u1:p&gt;





&lt;u1:p&gt;&lt;/u1:p&gt;





&lt;u1:p&gt;&lt;/u1:p&gt;



&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/5721610777910762501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2013/03/aspnet-mvc-4-whats-new.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/5721610777910762501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/5721610777910762501'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2013/03/aspnet-mvc-4-whats-new.html' title=' Asp.Net MVC 4 ?'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-8698815669086840259</id><published>2013-02-25T17:23:00.003-08:00</published><updated>2013-02-25T17:34:42.396-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Java script online editors/web playground </title><content type='html'>Today I’m going to share information regarding tools which I use for test my Javascript/HTML/CSS &amp;nbsp;functionality.&lt;br /&gt;
&lt;br /&gt;
&lt;h1&gt;
jsfiddle(&lt;a href=&quot;http://jsfiddle.net/&quot; target=&quot;_blank&quot;&gt;http://jsfiddle.net&lt;/a&gt;)&lt;/h1&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
This is very useful web playground which can be used to simulate/test our javascript function .&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;iframe allowfullscreen=&quot;allowfullscreen&quot; frameborder=&quot;0&quot; src=&quot;http://jsfiddle.net/dunuke/Ynvgr/1/embedded/&quot; style=&quot;height: 100px; width: 100%;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h1&gt;
jsbin(&lt;a href=&quot;http://jsbin.com/&quot; target=&quot;_blank&quot;&gt;jsbin.com&lt;/a&gt;)&lt;/h1&gt;
&lt;div&gt;
This is also &amp;nbsp;web playground which can be used to simulate/test our javascript function .&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/8698815669086840259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2013/02/java-script-online-editorsweb-playground.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/8698815669086840259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/8698815669086840259'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2013/02/java-script-online-editorsweb-playground.html' title='Java script online editors/web playground '/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-8465444214588715783</id><published>2013-02-21T17:36:00.000-08:00</published><updated>2013-02-25T17:24:19.543-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>Why should we learn advanced Java Script? </title><content type='html'>Although, JavaScript introduces as web scripting language in 1995 by Brendan Eich (employee of Netscape), JavaScript is not only a web scripting language further; it can be used as server side programming language (node.js), Client Application development language (windows 8)

&lt;br /&gt;
&lt;h4&gt;
Some Characterizes of Javascript&lt;/h4&gt;
&lt;b&gt;Prototype-based-&lt;/b&gt;( not as Object Oriented Language)&lt;br /&gt;
&lt;b&gt;Dynamic &lt;/b&gt;(can be drop property in any time in the cycle)&lt;br /&gt;
&lt;b&gt;Weekly Type -&lt;/b&gt;(every type variable declare as var and function can&amp;nbsp;receive&amp;nbsp;any type variable)

&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
JavaScript Basic&lt;/h3&gt;
&lt;h4&gt;
Declaring array:&lt;/h4&gt;
&lt;pre&gt;var myArray= []
&lt;/pre&gt;
&lt;h4&gt;
Creating empty Object:&lt;/h4&gt;
&lt;pre&gt;var myStudentObject={};
var myStudentObject=new Object();
var myStudentObject=Object.create(null);
&lt;/pre&gt;
&lt;h4&gt;
Initialization object&lt;/h4&gt;
&lt;pre&gt;myStudentObject.name=”Dinesh”;
or
var myStudentObject= {name:”Dinesh”}

&lt;/pre&gt;
&lt;h4&gt;
Functions&lt;/h4&gt;
&lt;h4&gt;
How to declared function&lt;/h4&gt;
&lt;pre&gt;function firstFunction (){
}
or
var secondFunction=function(){
}
&lt;/pre&gt;
&lt;h4&gt;
arguments –Key word&lt;/h4&gt;
We can pass any arguments to function without declare and we can use arguments key word which inherit for every function to retrieve those arguments.

&lt;br /&gt;
&lt;br /&gt;
Ex:
&lt;br /&gt;
&lt;pre&gt;function addNumber (){
var answer=arguments[0]+ arguments[1];
return answer;
}
&lt;/pre&gt;
Then we can call it as 
&lt;br /&gt;
&lt;pre&gt;firstFunction(1,2);&lt;/pre&gt;
&lt;h4&gt;
Method&lt;/h4&gt;
&lt;pre&gt;var Operation={
add: function addNumber (){
var answer=arguments[0]+ arguments[1];
return answer;
}
};

//call it
var x= Operation.add(2,3)

&lt;/pre&gt;
&lt;h4&gt;
Immediate Function&lt;/h4&gt;
These function execute immediately .
&lt;br /&gt;
&lt;pre&gt;(function(){
}())
Or
(function(){})();

Passing parameters to immediate  function
(function(a,b){
}(1,2))


&lt;/pre&gt;
&lt;h4&gt;
DOM Selector&lt;/h4&gt;
&lt;pre&gt;var a=documents.getElementsById(“pic”);//
 var q=documents.quarySelector(“h2”);//get first element
var list=documents.quarySelectorAll(“h2”);//get all elements
&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/8465444214588715783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2013/02/why-should-we-learn-advanced-java-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/8465444214588715783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/8465444214588715783'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2013/02/why-should-we-learn-advanced-java-script.html' title='Why should we learn advanced Java Script? '/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-3144436693783168293</id><published>2011-07-11T11:19:00.000-07:00</published><updated>2011-07-11T11:19:06.441-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MVC3"/><title type='text'>MVC3 TryUpdateModel() -Update Model for Edit</title><content type='html'>When we want to update model with edited values we can use &lt;i&gt;TryUpdateModel(&lt;/i&gt;)  method.&lt;br /&gt;
&lt;br /&gt;
example&lt;br /&gt;
&lt;pre&gt;[Httppost]
public ActionResult edit(int id)
{
    var user= UserRepository.GetUser(id);

    if (TryUpdateModel(user))
    {
        UserRepository.save();
    }

    return view()
}

&lt;/pre&gt;&lt;br /&gt;
But some times when we use &lt;i&gt;TryUpdateModel() &lt;/i&gt; the model does not update that mean the method return false.So in that case we need to find out the error so we can do that as flowing it will return the list of errors and their corresponding properties.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;[Httppost]
public ActionResult edit(int id)
{
    var user= UserRepository.GetUser(id);

    if (TryUpdateModel(user))
    {
        UserRepository.save();
    }
else{
//the tru update method return false
    
    var errors = ModelState
    .Where(m =&amp;gt; m.Value.Errors.Count &amp;gt; 0)
    .Select(m =&amp;gt; new { m.Key, m.Value.Errors })
    .ToArray();

}

    return view()
}
&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;Why TryUpdateModel() return false ?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Most of the time the &lt;i&gt;TryUpdateModel()&lt;/i&gt; method return false when we have not add editable field or hidden filed for all the required fields to view  page.&lt;br /&gt;
so we can simply add hidden filed to the view which we don&#39;t need to  change  during the update method.&lt;br /&gt;
&lt;br /&gt;
so My user Model&lt;br /&gt;
&lt;pre&gt;Public Class User{
[Requried]
public int UserId{get;set}
[Requried]
public string UserName {get;set}
[Requried]
pubic string UserCode{get;set}

pubic string Description{get;set}

public string Address{get;set}

}
&lt;/pre&gt;&lt;br /&gt;
So if&amp;nbsp; I want to update UserDescription in my edit page&lt;br /&gt;
I have to put UserId,UserName and UserCode as  Hidden filed&lt;br /&gt;
&lt;br /&gt;
But if our model content large number of fields and we only need to update few of fields in that case we can do it by specify the fields which we need to update as following&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;TryUpdateModel(model, new [] {&quot;Description&quot;, &quot;Address&quot;}); // In this case the TryUpdate() only  check vaidation &quot;Description&quot;,&quot;Address&quot;


&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
And&lt;iframe align=&quot;left&quot; frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=it0d7-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=bpl&amp;amp;asins=1430234016&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;&quot;&gt;&lt;/iframe&gt; also we can do it as fallowing by mentioning the field which should not update&lt;br /&gt;
&lt;pre&gt;TryUpdateModel(model, null, null, new [] {&quot;UserId&quot;,&quot;UserName &quot;,&quot;UserCode&quot;});//In this case the TryUpdate() ignore &quot;UserId&quot;,&quot;UserName&quot; and &quot;Usercode&quot; vaidation

&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/3144436693783168293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2011/07/mvc3-tryupdatemodel-update-model-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/3144436693783168293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/3144436693783168293'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2011/07/mvc3-tryupdatemodel-update-model-for.html' title='MVC3 TryUpdateModel() -Update Model for Edit'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-2466204438760207568</id><published>2011-07-04T00:07:00.000-07:00</published><updated>2011-07-08T22:44:13.109-07:00</updated><title type='text'>Remove Validation Error messege  when click Reset Button in MVC3 Razor</title><content type='html'>The reset button d&lt;i&gt;oes not clear validation message in mvc3 &lt;/i&gt;by default so&amp;nbsp; we need to do this with jQuery.The fallowing function clear validation messages in MVC3 pages.&lt;br /&gt;
.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;jQuery(document).ready(function () {

            $(&quot;input:reset&quot;).click(function () {
                $(&#39;.field-validation-error&#39;)
               .removeClass(&#39;field-validation-error&#39;)
                .addClass(&#39;field-validation-valid&#39;);

                $(&#39;.input-validation-error&#39;)
                .removeClass(&#39;input-validation-error&#39;)
                 .addClass(&#39;valid&#39;);
            });

  });
&lt;/pre&gt;&lt;div&gt;&lt;a imageanchor=&quot;1&quot; target=&quot;_blank&quot;  href=&quot;http://www.amazon.com/Professional-ASP-NET-MVC-Jon-Galloway/dp/1118076583?ie=UTF8&amp;tag=it0d7-20&amp;link_code=bil&amp;camp=213689&amp;creative=392969&quot;&gt;&lt;img alt=&quot;Professional ASP.NET MVC 3&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;ServiceVersion=20070822&amp;ID=AsinImage&amp;WS=1&amp;Format=_SL160_&amp;ASIN=1118076583&amp;tag=it0d7-20&quot; /&gt;&lt;/a&gt;&lt;img src=&quot;http://www.assoc-amazon.com/e/ir?t=it0d7-20&amp;l=bil&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=1118076583&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important; padding: 0px !important&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/2466204438760207568/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2011/07/remove-validation-error-messege-when.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/2466204438760207568'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/2466204438760207568'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2011/07/remove-validation-error-messege-when.html' title='Remove Validation Error messege  when click Reset Button in MVC3 Razor'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-4616125662014116453</id><published>2011-06-27T01:46:00.000-07:00</published><updated>2011-07-08T22:40:12.249-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MVC3"/><title type='text'>MVC 3 Razor TextBox max length</title><content type='html'>&lt;pre&gt;@Html.TextBoxFor(model =&amp;gt; model.Organization.OrganizationName, new { maxlength = 50 }) 

&lt;/pre&gt;&lt;a imageanchor=&quot;1&quot; target=&quot;_blank&quot;  href=&quot;http://www.amazon.com/Applied-ASP-NET-MVC-Context-Pro/dp/1430234016?ie=UTF8&amp;tag=it0d7-20&amp;link_code=bil&amp;camp=213689&amp;creative=392969&quot;&gt;&lt;img alt=&quot;Applied ASP.NET MVC 3 in Context (Pro)&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;ServiceVersion=20070822&amp;ID=AsinImage&amp;WS=1&amp;Format=_SL160_&amp;ASIN=1430234016&amp;tag=it0d7-20&quot; /&gt;&lt;/a&gt;&lt;img src=&quot;http://www.assoc-amazon.com/e/ir?t=it0d7-20&amp;l=bil&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=1430234016&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important; padding: 0px !important&quot; /&gt;</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/4616125662014116453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2011/06/mvc-3-razor-textbox-max-length.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/4616125662014116453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/4616125662014116453'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2011/06/mvc-3-razor-textbox-max-length.html' title='MVC 3 Razor TextBox max length'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-6488810730812510850</id><published>2011-06-12T21:32:00.001-07:00</published><updated>2011-06-15T00:09:22.263-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MVC3"/><title type='text'>MVC 3 Razor Editor Template</title><content type='html'>&lt;b&gt;Editor Template&lt;/b&gt; is very useful future in Asp.net &lt;i&gt;MVC3 Framework&lt;/i&gt;.With Editor Template we can create template for model and&amp;nbsp; It&amp;nbsp; can be access easily in the application (like user controller in asp.net).&lt;br /&gt;
So I&#39;m going to create Editor Template for Book Model in my application.&lt;br /&gt;
&lt;u&gt;Book.cs&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;public class Book
{
public int BookId { get; set; }
public string BookName { get; set; }
public string Description { get; set; }
}
&lt;/pre&gt;Then I&#39;m going to create folder&amp;nbsp; as&lt;b&gt; EditorTemplates &lt;/b&gt;in &lt;b&gt;Shared&lt;/b&gt; folder&amp;nbsp; and add new view &lt;b&gt;Book.cshtml&lt;/b&gt; as following.&lt;b&gt;(The Name of the Template should be same as Class Name)&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&amp;nbsp;&lt;/b&gt;.&lt;br /&gt;
&lt;pre&gt;@model MySimpleEditorTemplate.Models.Book

&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;@Html.DisplayFor(p =&amp;gt; p.BookId)  &lt;/td&gt;&lt;td&gt;@Html.EditorFor(p =&amp;gt; p.BookId)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;@Html.DisplayFor(p =&amp;gt; p.BookName)&lt;/td&gt;&lt;td&gt;@Html.EditorFor(p =&amp;gt; p.BookName)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;@Html.DisplayFor(p =&amp;gt; p.Description)&lt;/td&gt;&lt;td&gt;@Html.EditorFor(p =&amp;gt; p.Description)&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/pre&gt;&lt;br /&gt;
Then in view page simply we can add editor for book as &lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;@Html.EditorFor(model =&amp;gt; model.Book)&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;then it will display above block</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/6488810730812510850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2011/06/mvc-3-razor-editor-template.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/6488810730812510850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/6488810730812510850'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2011/06/mvc-3-razor-editor-template.html' title='MVC 3 Razor Editor Template'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-3321231192357891930</id><published>2010-10-06T10:02:00.000-07:00</published><updated>2010-10-10T02:29:42.935-07:00</updated><title type='text'>Accsess The Magento Core API With Dot net technologies</title><content type='html'>&lt;a href=&quot;http://www.magentocommerce.com/&quot; target=&quot;_blank&quot;&gt;Magento&lt;/a&gt; is one of the most popular e-commerce platforms.which based&amp;nbsp; on PHP and Mysql.Magento Core API supports both SOAP and XML RPC protocols. The API is permission based and allows access to the Customer, Catalog and Order modules of Magento. Please reference the &lt;a href=&quot;http://www.magentocommerce.com/support/magento_core_api&quot;&gt;documentation &lt;/a&gt;for more information.&lt;br /&gt;
This article I am going to explaining &lt;b&gt;How to access magento web service from Dot net Technologies .&lt;/b&gt;&lt;br /&gt;
we can access magento soap api with following url.&lt;b&gt; &lt;/b&gt;&lt;br /&gt;
http://mymagento.com/api/v2_soap?wsdl (You can see wsdl definition by typing this url in web browser)&lt;b&gt;.&lt;/b&gt;&lt;br /&gt;
So let see how to display Magento customer list in my WindowsFormsApplication project.&lt;br /&gt;
To consume to the magento web service in our application we should add web Reference by rigth click on solution .&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5iiNJrpN_mG51JkEOBPnDuJHtCRqWBCuwKomRvZ_IQtzA9jHd5C74loAjvlahrpEx3vKQ8IlBwFxGI-Rk66tyjLpe9Md_7JbYJVxnnpgOIFuLrHz2efC8NxmagW7ICmBxM-yZLasZsM6W/s1600/magento1.bmp&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/AVvXsEg5iiNJrpN_mG51JkEOBPnDuJHtCRqWBCuwKomRvZ_IQtzA9jHd5C74loAjvlahrpEx3vKQ8IlBwFxGI-Rk66tyjLpe9Md_7JbYJVxnnpgOIFuLrHz2efC8NxmagW7ICmBxM-yZLasZsM6W/s1600/magento1.bmp&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
In the web reference dialog box type the magento web service URL (http://mymagento.com/api/v2_soap?wsdl) and click Go button then available service method display as following screen.&lt;br /&gt;
Then we can change the web service name and click Add Refference button.&lt;br /&gt;
&lt;b&gt; &lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcx9rOjOnz7-gvooeLxO2L9x03rKBt4s3OnhouMQMDRnMjhb6a_fwgA14xjzzDv3Qyx-2zlMa0_ju0J9DKMdS8zy4IekGEiCJlASZgBOMg6gh2PCVo8RfOFK2ESiUgAXuxAF62_b7WDNRZ/s1600/magento2.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;283&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcx9rOjOnz7-gvooeLxO2L9x03rKBt4s3OnhouMQMDRnMjhb6a_fwgA14xjzzDv3Qyx-2zlMa0_ju0J9DKMdS8zy4IekGEiCJlASZgBOMg6gh2PCVo8RfOFK2ESiUgAXuxAF62_b7WDNRZ/s400/magento2.bmp&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;By doing above steps,we can generate&amp;nbsp; the web service proxy &lt;b&gt;.&lt;/b&gt;&lt;br /&gt;
C# code to retrieve&amp;nbsp; customer list.&lt;br /&gt;
&lt;pre&gt;&amp;nbsp;using Magento.com.mymagento

public void&amp;nbsp; showCustomrs(){
&amp;nbsp;&amp;nbsp; MagentoService ms = new MagentoService();
&amp;nbsp;&amp;nbsp; string sesion= ms.login(&quot;Dinesh&quot;, &quot;123456&quot;);
&amp;nbsp;&amp;nbsp; filters myfilter=new filters();//filter criteriya
&amp;nbsp;&amp;nbsp; customerCustomerEntity[] cusls= ms.customerCustomerList(sesion,myfilter);//get customers
&amp;nbsp;&amp;nbsp; dgCutomer.ItemsSource = cusls;&lt;b&gt; //&lt;/b&gt;display in grid&lt;b&gt;&lt;/b&gt;
&lt;b&gt;}
&lt;/b&gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/3321231192357891930/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2010/10/accsess-magento-core-api-with-dot-net.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/3321231192357891930'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/3321231192357891930'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2010/10/accsess-magento-core-api-with-dot-net.html' title='Accsess The Magento Core API With Dot net technologies'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5iiNJrpN_mG51JkEOBPnDuJHtCRqWBCuwKomRvZ_IQtzA9jHd5C74loAjvlahrpEx3vKQ8IlBwFxGI-Rk66tyjLpe9Md_7JbYJVxnnpgOIFuLrHz2efC8NxmagW7ICmBxM-yZLasZsM6W/s72-c/magento1.bmp" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-6021732397551526287</id><published>2010-08-07T06:12:00.000-07:00</published><updated>2010-08-07T06:34:06.440-07:00</updated><title type='text'>How to Create WCF Application</title><content type='html'>Select WCF Service Application from New Project window in Visual Studio and name the project as MyWCFService&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/AVvXsEgd39AqwazwEMgQ8-BmqTow0pPAROps1kTUFM-8pZFvdVVJgS1YzB06xlKf4af8joQWsE_-e66dmGcQCCSem4VOqLs36YpCIaukclIEx0oKXqI6oAwVk7Ap2Ph6JoIF91IS-TnqVGtqHhc/s1600/WCF1.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;290&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd39AqwazwEMgQ8-BmqTow0pPAROps1kTUFM-8pZFvdVVJgS1YzB06xlKf4af8joQWsE_-e66dmGcQCCSem4VOqLs36YpCIaukclIEx0oKXqI6oAwVk7Ap2Ph6JoIF91IS-TnqVGtqHhc/s400/WCF1.bmp&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Add WCF Service to the “MyWCFService” project and named as Myservice.svc&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/AVvXsEiA4Nl0PvcwkeVwtwT1ENaV44IeHv4a8HbSeWmi_erfKeebHeBqNY8HQSZZgZg3mRXXqxrRvMIKtvaQ_-MM3XvC_CxtVAyzO3EnXFnuJodM6Dgq5XuvizEO-6GRg_zQgUTItitrWQzYA-s/s1600/wcf2.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;247&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiA4Nl0PvcwkeVwtwT1ENaV44IeHv4a8HbSeWmi_erfKeebHeBqNY8HQSZZgZg3mRXXqxrRvMIKtvaQ_-MM3XvC_CxtVAyzO3EnXFnuJodM6Dgq5XuvizEO-6GRg_zQgUTItitrWQzYA-s/s400/wcf2.bmp&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;What is Service Contracts ?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt;&quot;&gt;Describe which operations the client can perform on the service. There are two types of Service Contracts. &lt;br /&gt;
&lt;b&gt;ServiceContract&lt;/b&gt; - This attribute is used to define the Interface. &lt;br /&gt;
&lt;b&gt;OperationContract&lt;/b&gt; - This attribute is used to define the method inside Interface.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt;&quot;&gt;IMyService.cs&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt;&quot;&gt;using System;

using System.Collections.Generic;

using System.Linq;

using System.Runtime.Serialization;

using System.ServiceModel;

using System.Text;


[ServiceContract]

public interface IService

{

&amp;nbsp;&amp;nbsp;&amp;nbsp; [OperationContract]

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Employeee GetEmployee(int id);// service method

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 

}
&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt;&quot;&gt;&lt;br /&gt;
Then we can implement above interface&lt;br /&gt;
&lt;br /&gt;
MyService.cs&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt;&quot;&gt;using System;

using System.Collections.Generic;

using System.Linq;

using System.Runtime.Serialization;

using System.ServiceModel;

using System.Text;

using Common;

&amp;nbsp;&amp;nbsp;&amp;nbsp; public class MyService: IMyService

&amp;nbsp;&amp;nbsp;&amp;nbsp; {


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #region MyService Members


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public Employeee GetEmployee(int id)//service method implimentation

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {

&amp;nbsp;Employeee emp = new Employeee { EmpId = Guid.NewGuid(),Name=&quot;Dinesh&quot;,Type=EmployeeTypesEnum.Accounter };

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return emp;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #endregion

&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;What is Data contracts?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Define which data types are passed to and from the service. WCF defines implicit contracts for built-in types such as int and string, but we can easily define explicit opt-in data contracts for custom types.&lt;br /&gt;
&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ms731923.aspx&quot;&gt;Types Supported by the Data Contract Serializer&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
There are two types of Data Contracts.&lt;br /&gt;
DataContract - attribute used to define the class&lt;br /&gt;
DataMember - attribute used to define the properties&lt;br /&gt;
&lt;br /&gt;
Add Class Employee to the solution&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt;&quot;&gt;using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Runtime.Serialization;

using System.ServiceModel;


&amp;nbsp;&amp;nbsp;&amp;nbsp; [DataContract]

&amp;nbsp;&amp;nbsp;&amp;nbsp; public class Employeee

&amp;nbsp;&amp;nbsp;&amp;nbsp; {

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [DataMember]

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public Guid EmpId { get; set; }

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [DataMember]

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string Name { get; set; }

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [DataMember]

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public EmployeeTypesEnum Type { set; get; }

&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;How To Pass Enum with WCF services?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
To pass Enum the Data contracts should be define with EnumMember() attributes.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt;&quot;&gt;using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Runtime.Serialization;


&amp;nbsp;[DataContract]

&amp;nbsp;&amp;nbsp; public enum EmployeeTypesEnum

&amp;nbsp;&amp;nbsp;&amp;nbsp; {

&amp;nbsp;&amp;nbsp;&amp;nbsp; [EnumMember()]


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Administrator = 0,


&amp;nbsp;&amp;nbsp;&amp;nbsp; [EnumMember()]


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Manager = 1,


&amp;nbsp;&amp;nbsp;&amp;nbsp; [EnumMember()]


&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Accounter = 2


}
&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt;&quot;&gt; &lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;How to Test WCF application ?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
WCF service can test with WCF Test Client (WcfTestClient.exe) by&amp;nbsp; execute WcfTestClient.exe commond in Visual Studio Command prompt .&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/6021732397551526287/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2010/08/how-to-create-wcf-application.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/6021732397551526287'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/6021732397551526287'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2010/08/how-to-create-wcf-application.html' title='How to Create WCF Application'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgd39AqwazwEMgQ8-BmqTow0pPAROps1kTUFM-8pZFvdVVJgS1YzB06xlKf4af8joQWsE_-e66dmGcQCCSem4VOqLs36YpCIaukclIEx0oKXqI6oAwVk7Ap2Ph6JoIF91IS-TnqVGtqHhc/s72-c/WCF1.bmp" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-885738572483401551</id><published>2010-04-10T08:13:00.000-07:00</published><updated>2010-04-10T08:14:44.830-07:00</updated><title type='text'>VS 2008 service pack offline version</title><content type='html'>With fallowing link we can download VS2008 SP1 offline version and it is a .iso file so we need  to burn it in to DVD and install with DVD ROM.&lt;br /&gt;
&lt;a href=&quot; http://www.microsoft.com/downloads/en/confirmation.aspx?familyId=27673c47-b3b5-4c67-bd99-84e525b5ce61&amp;displayLang=en&quot;&gt;VS 2008 SP1&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/885738572483401551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2010/04/vs-2008-service-pack-offline-version.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/885738572483401551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/885738572483401551'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2010/04/vs-2008-service-pack-offline-version.html' title='VS 2008 service pack offline version'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-4165137919274295948</id><published>2010-03-11T10:11:00.000-08:00</published><updated>2010-03-17T09:21:24.052-07:00</updated><title type='text'>COPY EXCELL SHEET DATA TO  MS SQL DATA BASE WITH C#.NET</title><content type='html'>&lt;pre&gt;using System.Data.SqlClient;
using System.Data;
using System.Data.OleDb;

public class CopyExcellToMSSql
{
string _sourceConnectionString=;
string _destinationConnectionString;

public CopyExcellToMSSql(string sourceConnectionString,
string destinationConnectionString)
{
_sourceConnectionString =
sourceConnectionString;
_destinationConnectionString =
destinationConnectionString;
}

public void CopyTable(string Ftable,string Ttable)
{
using (OleDbConnection source =
new OleDbConnection(_sourceConnectionString))
{
string sql = string.Format(&quot;SELECT * FROM [{0}]&quot;,
Ftable);

OleDbCommand command = new OleDbCommand(sql, source);

source.Open();
IDataReader dr = command.ExecuteReader();

using (SqlBulkCopy copy =
new SqlBulkCopy(_destinationConnectionString))
{
copy.DestinationTableName = Ttable;
copy.WriteToServer(dr);
}
}
}
}
&lt;/pre&gt;&lt;br /&gt;
Calling above method&lt;br /&gt;
&lt;pre&gt;
public void CopyData{
string excelConnectionString = @&quot;Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\\Documents and Settings\\Dinesh\\Desktop\\D-Garment\\work detailes.xls; Extended Properties=&quot;&quot;Excel 8.0;HDR=Yes&quot;&quot;;&quot;;

string sqlConnectionString =&quot;Data Source=KIT\MYSERVER; Initial Catalog=EMS;User ID=ems; Password=ems123&quot;;

CopyExcellToMSSql cpLogic = new CopyExcellToMSSql(excelConnectionString, sqlConnectionString);
cpLogic.CopyTable(&quot;Employee$&quot;, &quot;TempEMPLOYEE&quot;);// Employee is work sheet and &quot;TempEMPLOYEE&quot; is table
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/4165137919274295948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2010/03/copy-excell-sheet-data-to-ms-sql-data.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/4165137919274295948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/4165137919274295948'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2010/03/copy-excell-sheet-data-to-ms-sql-data.html' title='COPY EXCELL SHEET DATA TO  MS SQL DATA BASE WITH C#.NET'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-1365385235564164219</id><published>2010-02-17T21:49:00.000-08:00</published><updated>2010-02-17T21:51:01.326-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>Insert Multiple Rows to Table in SQL</title><content type='html'>&lt;pre&gt;INSERT INTO [tabale1]
([col1]
,[col2]
,[col3]
,[col4])

(SELECT &#39;11&#39;,&#39;1&#39;,&#39;1&#39;,&#39;1&#39; UNION ALL 
SELECT &#39;22&#39;,&#39;2&#39;,&#39;2&#39;,&#39;2&#39;)
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/1365385235564164219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2010/02/insert-multiple-rows-to-table-in-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/1365385235564164219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/1365385235564164219'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2010/02/insert-multiple-rows-to-table-in-sql.html' title='Insert Multiple Rows to Table in SQL'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-1803609995134848442</id><published>2009-11-02T22:16:00.000-08:00</published><updated>2009-12-26T03:44:56.339-08:00</updated><title type='text'>How to call Dynamic Javascript Function from Gridview - Asp.Net</title><content type='html'>We can call dynamic java script&lt;iframe src=&quot;http://rcm.amazon.com/e/cm?t=it0d7-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=0072227907&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr&quot; style=&quot;align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;&quot; align=&quot;left&quot; scrolling=&quot;no&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt; function from grid view as fallow.say we need to call following  java script function dynamically from gride view then we need to create java script function in .aspx page.&lt;br /&gt;
&lt;pre&gt;&amp;lt;script type=&quot;text/jscript&quot;&amp;gt;
function funcShow(id)
{
aleart(id);
}
&amp;lt;/script&amp;gt;
&lt;/pre&gt;After that we have to add  Template filed with Hyperlink  filed to Grdeview  as fallowing &lt;pre&gt;&amp;lt;asp:GridView ID=&quot;dg1&quot; runat=&quot;server&quot;                      
&amp;lt;Columns&amp;gt;
&amp;lt;asp:BoundField DataField=&quot;FileName&quot; HeaderText=&quot;Description&quot;&amp;gt;
&amp;lt;/asp:BoundField&amp;gt;
&amp;lt;asp:TemplateField&amp;gt;
&amp;lt;ItemTemplate&amp;gt;
&amp;lt;asp:HyperLink ID=&quot;HyperLink3&quot; runat=&quot;server&quot; NavigateUrl=&#39;&amp;lt;%# RetrunClick(Eval(&quot;ID&quot;))%&amp;gt;&#39;&amp;gt;Click&amp;lt;/asp:HyperLink&amp;gt;
&amp;lt;/ItemTemplate&amp;gt;
&amp;lt;/asp:TemplateField&amp;gt;
&amp;lt;/Columns&amp;gt;
&amp;lt;/asp:GridView&amp;gt;
&lt;/pre&gt;Then we need to add following function to the code behind page that will call the java script function .&lt;br /&gt;
&lt;pre&gt;public string RetrunClick(object obj)
{
string str = string.Empty;
if (obj != null)
{
str = &quot;javascript:funcShow(&#39;&quot; + obj.ToString() + &quot;&#39;)&quot;;
}
return str;
}
&lt;/pre&gt;&lt;iframe src=&quot;http://rcm.amazon.com/e/cm?t=it0d7-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=0596527748&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr&quot; style=&quot;align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;&quot; align=&quot;left&quot; scrolling=&quot;no&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;&lt;iframe src=&quot;http://rcm.amazon.com/e/cm?t=it0d7-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=1590599454&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr&quot; style=&quot;align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;&quot; align=&quot;left&quot; scrolling=&quot;no&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;&lt;a imageanchor=&quot;1&quot; target=&quot;_blank&quot;  href=&quot;http://www.amazon.com/JavaScript-Bible-Fifth-Danny-Goodman/dp/0764557432?ie=UTF8&amp;tag=it0d7-20&amp;link_code=bil&amp;camp=213689&amp;creative=392969&quot;&gt;&lt;img alt=&quot;JavaScript Bible, Fifth Edition&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;ServiceVersion=20070822&amp;ID=AsinImage&amp;WS=1&amp;Format=_SL160_&amp;ASIN=0764557432&amp;tag=it0d7-20&quot; /&gt;&lt;/a&gt;&lt;img src=&quot;http://www.assoc-amazon.com/e/ir?t=it0d7-20&amp;l=bil&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=0764557432&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;&lt;a imageanchor=&quot;1&quot; target=&quot;_blank&quot;  href=&quot;http://www.amazon.com/JavaScript-Bible-Danny-Goodman/dp/0470069163?ie=UTF8&amp;tag=it0d7-20&amp;link_code=bil&amp;camp=213689&amp;creative=392969&quot;&gt;&lt;img alt=&quot;JavaScript Bible&quot; src=&quot;http://ws.amazon.com/widgets/q?MarketPlace=US&amp;ServiceVersion=20070822&amp;ID=AsinImage&amp;WS=1&amp;Format=_SL160_&amp;ASIN=0470069163&amp;tag=it0d7-20&quot; /&gt;&lt;/a&gt;&lt;img src=&quot;http://www.assoc-amazon.com/e/ir?t=it0d7-20&amp;l=bil&amp;camp=213689&amp;creative=392969&amp;o=1&amp;a=0470069163&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot; alt=&quot;&quot; style=&quot;border:none !important; margin:0px !important;&quot; /&gt;</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/1803609995134848442/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2009/11/how-to-call-dynamic-javascript-function.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/1803609995134848442'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/1803609995134848442'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2009/11/how-to-call-dynamic-javascript-function.html' title='How to call Dynamic Javascript Function from Gridview - Asp.Net'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-4546265106718640635</id><published>2009-10-14T04:19:00.000-07:00</published><updated>2009-12-26T03:55:10.198-08:00</updated><title type='text'>Calculate Running Sum of the Texboxses in the ASP.NET with Javascript</title><content type='html'>If we need to get running total of the text boxes in asp.net page while allowing automatically calculate the sum when changed the any text box .&lt;br /&gt;
Ex:&lt;br /&gt;
we have 3 Text Boxes as &quot;txtCallCharges&quot;,&quot;txtRentTaxies&quot;,&quot;txtTotalAmount&quot; and we need to get sum of the entered values to the &quot;txtTotalAmount&quot; text box .and also It should be allowed to automatically get total when text changed in nay text box.&lt;br /&gt;
Solution:&lt;br /&gt;
Add following code to the  Code behind page.&lt;br /&gt;
&lt;pre&gt;protected override void OnLoad(EventArgs e)
{
txtCallCharges.Attributes.Add(&quot;onblur&quot;, &quot;javascript:calculateTotal();&quot;);
txtRentTaxies.Attributes.Add(&quot;onblur&quot;, &quot;javascript:calculateTotal();&quot;);
}
&lt;/pre&gt;&lt;br /&gt;
Then add following javascript to  .aspx page&lt;br /&gt;
&lt;pre&gt;function calculateTotal()
{
var ctrl1 = null;
var ctrl2=null;
var ctrl3=null;          
ctrl1= document.getElementById(&quot;&lt;%=txtCallCharges.ClientID %&gt;&quot;);
ctrl2= document.getElementById(&quot;&lt;%=txtRentTaxies.ClientID %&gt;&quot;);
ctrl3= document.getElementById(&quot;&lt;%=txtTotalAmount.ClientID %&gt;&quot;);
var total =null;
if(ctrl1.value != &quot;&quot;)
{
total=total+parseFloat(ctrl1.value);
}
if(ctrl2.value != &quot;&quot;)
{
total=total+parseFloat(ctrl2.value);
}
ctrl3.value= total;
}&lt;/pre&gt;&lt;iframe src=&quot;http://rcm.amazon.com/e/cm?t=it0d7-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=0596527748&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr&quot; style=&quot;align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;&quot; align=&quot;left&quot; scrolling=&quot;no&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;&lt;iframe src=&quot;http://rcm.amazon.com/e/cm?t=it0d7-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=1590597273&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr&quot; style=&quot;align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;&quot; align=&quot;left&quot; scrolling=&quot;no&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;&lt;iframe src=&quot;http://rcm.amazon.com/e/cm?t=it0d7-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=047018759X&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr&quot; style=&quot;align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;&quot; align=&quot;left&quot; scrolling=&quot;no&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;&lt;iframe src=&quot;http://rcm.amazon.com/e/cm?t=it0d7-20&amp;o=1&amp;p=8&amp;l=bpl&amp;asins=1590598911&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr&quot; style=&quot;align:left;padding-top:5px;width:131px;height:245px;padding-right:10px;&quot; align=&quot;left&quot; scrolling=&quot;no&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/4546265106718640635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2009/10/calculate-running-sum-of-texboxses-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/4546265106718640635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/4546265106718640635'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2009/10/calculate-running-sum-of-texboxses-in.html' title='Calculate Running Sum of the Texboxses in the ASP.NET with Javascript'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-7036360916964250029</id><published>2009-10-08T03:38:00.000-07:00</published><updated>2009-10-15T22:38:55.872-07:00</updated><title type='text'>Update multiple columns of one table from another table- SQL</title><content type='html'>UPDATE [tableA]&lt;br /&gt;SET   &lt;br /&gt;    A1 = B.B1+B.B2,&lt;br /&gt;       A2=B.B3&lt;br /&gt;FROM tableA, tableB as B WHERE tableA.ID = B.ID</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/7036360916964250029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2009/10/update-multiple-columns-of-one-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/7036360916964250029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/7036360916964250029'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2009/10/update-multiple-columns-of-one-table.html' title='Update multiple columns of one table from another table- SQL'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-7068084306974164008</id><published>2009-06-18T03:17:00.000-07:00</published><updated>2009-10-15T22:38:55.921-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><title type='text'>Refresh a content page without refreshing master page Vs  Avoid flicker when click on the link</title><content type='html'>The master page class derives from the UserControl class. When the application is executing, the master page just like a child control. So we can say the master page is not a true page. “.And, when the page loads, we can notice the navigationURL of the Browser address bar  is the content page&#39;s, but not the master page&#39;s.Because of that we cannot refresh a content page without refreshing master page .But we can avoid flickering with fallowing code by put one  &amp;lt;HEAD&amp;gt; tag in the master page.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(102, 102, 204);&quot;&gt;&amp;lt;meta http-equiv=&quot;Page-Enter&quot; content=&quot;blendTrans(Duration=0)&quot;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(102, 102, 204);&quot;&gt;&amp;lt;meta http-equiv=&quot;Page-Exit&quot; content=&quot;blendTrans(Duration=0)&quot;/&amp;gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/7068084306974164008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2009/06/refresh-content-page-without-refreshing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/7068084306974164008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/7068084306974164008'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2009/06/refresh-content-page-without-refreshing.html' title='Refresh a content page without refreshing master page Vs  Avoid flicker when click on the link'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-6424316875606718733</id><published>2009-06-05T03:16:00.000-07:00</published><updated>2009-10-15T22:38:55.932-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><title type='text'>ASP.NET Master page Set Background Image to Table</title><content type='html'>&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Problem &lt;/span&gt;:When we set ASP Net - Master Page background image it only visible from pages in root directory&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Solution&lt;/span&gt; &lt;/span&gt;: &lt;span&gt;The images which are used in Masterpage should be &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;set  in the code behind file as fallow .&lt;br /&gt;The runat=&#39;Server&quot; attribute should be added to the controller which are going to set background image and ID should be set to that controller.&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 153);font-size:100%;&quot; &gt;&amp;lt;td runat=&quot;server&quot;  id=&quot;tb1&quot;&amp;gt;set back ground image with code&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;br /&gt;&lt;br /&gt;In the code behind page    image should be set using ResolveClientUrl() method&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;protected void Page_Load(object sender, EventArgs e)&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;    {&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;        tb1.Style[HtmlTextWriterStyle.BackgroundImage] = ResolveClientUrl(&quot;~/App_Themes/Images/1-sri-lanka.JPG&quot;);&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;    }&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;!-- google_ad_section_start --&gt;&lt;h1 style=&quot;font-weight: bold;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/h1&gt;</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/6424316875606718733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2009/06/aspnet-master-page-set-background-image.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/6424316875606718733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/6424316875606718733'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2009/06/aspnet-master-page-set-background-image.html' title='ASP.NET Master page Set Background Image to Table'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-5882530917155782499</id><published>2009-06-02T02:39:00.000-07:00</published><updated>2009-10-15T22:38:55.910-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>Sql Date Time  Formatting</title><content type='html'>&lt;span style=&quot;font-weight: bold;&quot;&gt;Remove Time Part From DateTime &lt;/span&gt;&lt;br /&gt;---------------------------------&lt;br /&gt;SELECT GETDATE() /// &lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;2009-06-25 12:03:56.640&lt;/span&gt;&lt;br /&gt;Declare @mydate DATETIME&lt;br /&gt;SET @mydate=GETDATE()&lt;br /&gt;&lt;br /&gt;------------------------------------- &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;1.Get Out put as Type of DateTime with zero time&lt;/span&gt;&lt;br /&gt;SELECT DATEADD(day, DATEDIFF(day, &#39;20000101&#39;,@mydate), &#39;20000101&#39;)&lt;br /&gt;or&lt;br /&gt;SELECT DATEADD(DAY, 0, DATEDIFF(DAY,0,@mydate))&lt;br /&gt;or&lt;br /&gt;SELECT DATEADD(dd, DATEDIFF(dd, 0, @mydate), 0)&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;out put :2009-06-25 00:00:00.000&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;2.Get Out put as Type of Varchar without time&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;SELECT  CONVERT(VARCHAR(10),@mydate, 103)&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 153);&quot;&gt;out put :25/06/2009&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Or&lt;br /&gt;SELECT CONVERT(VARCHAR(10), @mydate, 120)&lt;br /&gt;&lt;span style=&quot;color: rgb(51, 51, 153);&quot;&gt;out put :2009-06-25&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/5882530917155782499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2009/06/sql-date-time-formatting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/5882530917155782499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/5882530917155782499'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2009/06/sql-date-time-formatting.html' title='Sql Date Time  Formatting'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-7257864774164032904</id><published>2009-05-10T22:23:00.000-07:00</published><updated>2009-10-15T22:38:55.976-07:00</updated><title type='text'>Unique Identifier In .Net  &amp;amp; SQL</title><content type='html'>A GUID (Globally Unique Identifiers) is a 128-bit integer (16 bytes) that can be used across all computers and networks wherever a unique identifier is required. Such an identifier has a very low probability of being duplicated. In the .NET framework the System.Guid.NewGuid method is used to generate the unique identifiers.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(153, 153, 255);font-size:85%;&quot; &gt;System.Guid desiredGuid = System.Guid.NewGuid();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This desiredGuid can be directly save to DB. The data type of the filed should be  “uniqueidentifier” or we can cast it as string …. And also we can store GUID in “System.Guid” data type variable(C#).&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;convert &lt;/span&gt;&lt;span style=&quot;font-weight: bold;font-size:85%;&quot; &gt;GUID to Sting &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(102, 102, 204);font-size:85%;&quot; &gt; System.Guid  desiredGuid = System.Guid.NewGuid();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(102, 102, 204);&quot;&gt; string a=&lt;/span&gt;&lt;span style=&quot;color: rgb(102, 102, 204);font-size:85%;&quot; &gt;desiredGuid.ToString();&lt;/span&gt; &lt;p&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;convert a string to a GUID&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: rgb(153, 153, 255);font-size:85%;&quot; &gt;Guid MyGuid = &lt;span class=&quot;operators&quot;&gt;new&lt;/span&gt; Guid(stringValue);&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;In SQL Server, the “uniqueidentifier” data type is used to store the GUIDs and newid() function will generate GUID.</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/7257864774164032904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2009/05/unique-identifier-in-net-sql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/7257864774164032904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/7257864774164032904'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2009/05/unique-identifier-in-net-sql.html' title='Unique Identifier In .Net  &amp;amp; SQL'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-4326312294478693698</id><published>2009-03-19T22:59:00.000-07:00</published><updated>2009-11-02T22:57:07.121-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><title type='text'>TypeForwardedTo (.NET)</title><content type='html'>We can use this class to move type from one assembly to another while not disrupting the callers compile against the original assembly .&lt;br /&gt;Example : we have a source library (say lib.dll)  which included lot of classes and we have use that class library for our application development. After some period of time the we refastening the source library (lib.dll) and it splits in to two source library to (say lib.dll and lib1.dll) .Then what happen to our application will it work? No because our application point to the lib.dll but some of the classes have move to lib1.dll to. So our application will generate error .To prevent this we can use “TypeForwardedTo”&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Following 2 classes define in lib.dll&lt;/span&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Text;&lt;br /&gt;namespace lib&lt;br /&gt;{&lt;br /&gt;  public class car&lt;br /&gt;  {&lt;br /&gt;      public static void Do()&lt;br /&gt;      {&lt;br /&gt;          System.Console.WriteLine(&quot;car&quot;);&lt;br /&gt;&lt;br /&gt;      }&lt;br /&gt;  }&lt;br /&gt;      public class van&lt;br /&gt;      {&lt;br /&gt;      public static void Do()&lt;br /&gt;       {&lt;br /&gt;          System.Console.WriteLine(&quot;van&quot;);       &lt;br /&gt;       }&lt;br /&gt;      }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then the develop application using above lib.dll as following&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Text;&lt;br /&gt;using lib;&lt;br /&gt;&lt;br /&gt;namespace ConsoleApplication3&lt;br /&gt;{&lt;br /&gt;  class Program&lt;br /&gt;  {&lt;br /&gt;      static void Main(string[] args)&lt;br /&gt;      {&lt;br /&gt;          car.Do();&lt;br /&gt;          van.Do();&lt;br /&gt;          Console.ReadLine();&lt;br /&gt;        &lt;br /&gt;      }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;The Out put is :&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;car&lt;br /&gt;van&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Now we split above lib.dll to 2 dll to as following&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;lib.dll&lt;/span&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Text;&lt;br /&gt;namespace lib&lt;br /&gt;{&lt;br /&gt;  public class car&lt;br /&gt;  {&lt;br /&gt;      public static void Do()&lt;br /&gt;      {&lt;br /&gt;          System.Console.WriteLine(&quot;car&quot;);&lt;br /&gt;&lt;br /&gt;      }&lt;br /&gt;  }     &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;lib1.dll&lt;/span&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Text;&lt;br /&gt;namespace lib1&lt;br /&gt;{&lt;br /&gt;  public class van&lt;br /&gt;  {&lt;br /&gt;      public static void Do()&lt;br /&gt;      {&lt;br /&gt;          System.Console.WriteLine(&quot;van&quot;);&lt;br /&gt;&lt;br /&gt;      }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then replace the above lib.dll with new two dlls. Now what happen, the van class can’t find in new lib.dll so it generate and error.&lt;br /&gt;So prevent such a error we ca use&lt;br /&gt;“System.Runtime.CompilerServices.TypeForwardedTo” as following&lt;br /&gt;Open the lib project and Open the AssemblyInfo.cs file and add the following line right after the assembly directives.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;[assembly: TypeForwardedTo(typeof(lib1.van))] &lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;now build projecj.&lt;br /&gt;Now we have 2dlls, lib.dll and lib1.dll but we can still run oure previouse application without any error .....</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/4326312294478693698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2009/03/typeforwardedto-net.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/4326312294478693698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/4326312294478693698'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2009/03/typeforwardedto-net.html' title='TypeForwardedTo (.NET)'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-6932692816691095096</id><published>2009-02-11T20:40:00.000-08:00</published><updated>2009-10-15T22:38:55.953-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>SQL Select First and Last 100 Record</title><content type='html'>&lt;u&gt;Select first 100 Records&lt;/u&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;SELECT RecordId&lt;br /&gt;FROM Table&lt;br /&gt;LIMIT 100&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;u&gt;Select Last 100 Records&lt;/u&gt;&lt;br /&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;SELECT RecordId&lt;br /&gt;FROM Table&lt;br /&gt;ORDER BY RecordId DESC&lt;br /&gt;LIMIT 100&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/6932692816691095096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2009/02/sql-select-first-and-last-100-record.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/6932692816691095096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/6932692816691095096'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2009/02/sql-select-first-and-last-100-record.html' title='SQL Select First and Last 100 Record'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-7773278252664154546</id><published>2008-07-03T04:56:00.000-07:00</published><updated>2009-11-02T22:59:00.495-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>Event and Delegates -Capture Master Page Events in Content Pages</title><content type='html'>In This article, I explain how to use event and delegate to capture Master page event at content page.&lt;br /&gt;Case :The master page (MasterPage.master.cs) Content drop down list .When The dropdown selected index change the selected value must be display in content page labels.&lt;br /&gt;How to Do:&lt;br /&gt;1. we develop master page as usual .Then top of code behind page of the master page, we have to declare Delegate and also have to declare public event in the class which type of previous delegate .Next step is declaring virtual method that used to handle the event ,Then we have to call the above method at the event of controller(drop down list ).&lt;br /&gt;2.Develop content page and put following code at the top of .aspx page&lt;br /&gt;3. In the code behind file of content page we have to write method capture to the master page event and in the page load event we have to add event handaler to call .&lt;br /&gt;MasterPage.master.cs&lt;br /&gt;This is Master Page with content Drop down list&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;%@ Master Language=&quot;C#&quot; AutoEventWireup=&quot;true&quot; CodeFile=&quot;MasterPage.master.cs&quot; Inherits=&quot;MasterPage&quot; %&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;&lt;br /&gt;&amp;lt;html xmlns= &quot; http://www.w3.org/1999/xhtml&quot; &amp;gt;&lt;br /&gt;&amp;lt;head runat=&quot;server&quot;&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;Master test&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt;&lt;br /&gt;&amp;lt;div style=&quot;width: 158px; height: 414px; background-color: gray&quot;&amp;gt;&lt;br /&gt;&amp;lt;asp:DropDownList ID=&quot;DropDownList1&quot; runat=&quot;server&quot; AutoPostBack=&quot;True&quot; OnSelectedIndexChanged=&quot;DropDownList1_SelectedIndexChanged&quot; Width=&quot;150px&quot;&amp;gt;&lt;br /&gt;&amp;lt;asp:ListItem Value=&quot;a&quot;&amp;gt;&amp;lt;/asp:ListItem&amp;gt;&lt;br /&gt;&amp;lt;asp:ListItem&amp;gt;b&amp;lt;/asp:ListItem&amp;gt;&lt;br /&gt;&amp;lt;asp:ListItem&amp;gt;c&amp;lt;/asp:ListItem&amp;gt;&lt;br /&gt;&amp;lt;/asp:DropDownList&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div style=&quot;left: 168px; width: 638px; position: absolute; top: 17px; height: 410px&quot;&amp;gt;&lt;br /&gt;&amp;lt;asp:contentplaceholder id=&quot;ContentPlaceHolder1&quot; runat=&quot;server&quot;&amp;gt;&lt;br /&gt;&amp;lt;/asp:contentplaceholder&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;class MasterPage&lt;br /&gt;Then Put following codes in page behined file of the master page&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Configuration;&lt;br /&gt;using System.Collections;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.Security;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;using System.Web.UI.WebControls;&lt;br /&gt;using System.Web.UI.WebControls.WebParts;&lt;br /&gt;using System.Web.UI.HtmlControls;&lt;br /&gt;//declare delegates for Master Page Events&lt;br /&gt;public delegate void mstDelegate(object sender, System.EventArgs e);&lt;br /&gt;public partial class MasterPage : System.Web.UI.MasterPage&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;private string slectedValue;&lt;br /&gt;public string SlectedValue&lt;br /&gt;{&lt;br /&gt;get { return slectedValue; }&lt;br /&gt;set { slectedValue = value; }&lt;br /&gt;}&lt;br /&gt;// declare Public Events type of above delegate&lt;br /&gt;public event mstDelegate DropDownEvent;&lt;br /&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;// impliment virtual method to handel above event&lt;br /&gt;protected virtual void OnDropDownClick(EventArgs e)&lt;br /&gt;{&lt;br /&gt;if (DropDownEvent != null)&lt;br /&gt;{&lt;br /&gt;//Invokes the delegates.&lt;br /&gt;DropDownEvent(this, e);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;// DropDownList1_SelectedIndexChanged event&lt;br /&gt;protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;SlectedValue = DropDownList1.SelectedValue;&lt;br /&gt;OnDropDownClick(e);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Create Test page&lt;br /&gt;testevent.aspx&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;%@ MasterType virtualPath=&quot;~/MasterPage.master&quot;%&amp;gt;&lt;br /&gt;&amp;lt;%@ Page Language=&quot;C#&quot; MasterPageFile=&quot;~/MasterPage.master&quot; AutoEventWireup=&quot;true&quot; CodeFile=&quot;testevent.aspx.cs&quot; Inherits=&quot;testevent&quot; Title=&quot;test Page&quot; %&amp;gt;&lt;br /&gt;&amp;lt;asp:Content ID=&quot;Content1&quot; ContentPlaceHolderID=&quot;ContentPlaceHolder1&quot; Runat=&quot;Server&quot;&amp;gt;&lt;br /&gt;&amp;lt;asp:Label ID=&quot;lblOutput&quot; runat=&quot;server&quot; Text=&quot;Label&quot; Width=&quot;244px&quot;&amp;gt;&amp;lt;/asp:Label&amp;gt;&lt;br /&gt;&amp;lt;/asp:Content&amp;gt;&lt;br /&gt;Code behind file of test page&lt;br /&gt;Testevent.cs&lt;br /&gt;using System;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Configuration;&lt;br /&gt;using System.Collections;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.Security;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;using System.Web.UI.WebControls;&lt;br /&gt;using System.Web.UI.WebControls.WebParts;&lt;br /&gt;using System.Web.UI.HtmlControls;&lt;br /&gt;public partial class testevent : System.Web.UI.Page&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;// create instant of Master event&lt;br /&gt;Master.DropDownEvent += new mstDelegate(mstDDLClick);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;/// method for catch Master Page menu click event&lt;br /&gt;void mstDDLClick(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;lblOutput.Text = Master.SlectedValue;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/7773278252664154546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2008/07/event-and-delegates-capture-master-page.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/7773278252664154546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/7773278252664154546'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2008/07/event-and-delegates-capture-master-page.html' title='Event and Delegates -Capture Master Page Events in Content Pages'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-5658005490098695304</id><published>2008-06-02T05:11:00.000-07:00</published><updated>2009-10-15T22:38:56.002-07:00</updated><title type='text'>Set a Date Format In GridView Using ASP.NET</title><content type='html'>&lt;span style=&quot;font-weight:bold;&quot;&gt;Following code explain How to format date in ASP.Net Gride view &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt; asp :GridView ID=“GridView1″ runat=“server”  &gt;&lt;br /&gt;&lt; columns  &gt;&lt;br /&gt;  &lt;  asp :BoundField DataField=“CreationDate”  &lt;br /&gt;     DataFormatString=“{0:dd-MM-yyyy}”  &lt;br /&gt;     HtmlEncode=“false”&lt;br /&gt;     HeaderText=“CreationDate”       /&gt;&lt;br /&gt;&lt;  /columns  &gt;&lt;br /&gt;&lt;  /asp  &gt;</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/5658005490098695304/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2008/06/set-date-format-in-gridview-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/5658005490098695304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/5658005490098695304'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2008/06/set-date-format-in-gridview-using.html' title='Set a Date Format In GridView Using ASP.NET'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-9047796785030967179</id><published>2008-04-21T05:48:00.000-07:00</published><updated>2009-10-15T22:38:56.047-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#"/><title type='text'>Passing Parameters to Crystal Reports</title><content type='html'>It is seam to be passing parameters to crystal reports (without prompting Enter to parameter values) programmatically some what confusing. So in this article I’ll explain Step by step “how to pass parameters to crystal reports”. We need to import following namespace.&lt;br /&gt;using CrystalDecisions.CrystalReports.Engine;&lt;br /&gt;&lt;br /&gt;Then following code pass the parameter value to crystal reports.&lt;br /&gt;&lt;br /&gt;protected void Page_Load(object sender, EventArgs e){&lt;br /&gt;        this.CrystalReportViewer1.ParameterFieldInfo.Clear();&lt;br /&gt;        ParameterDiscreteValue desValue1= new ParameterDiscreteValue();&lt;br /&gt;        desValue1.Value = &quot;Testing&quot;;// set value for parameter&lt;br /&gt;        ParameterField  paraFld = new ParameterField();&lt;br /&gt;        paraFld.Name = &quot;User&quot;;// this is parameter name &lt;br /&gt;        paraFld.CurrentValues.Add(desValue1);&lt;br /&gt;        paraFld.HasCurrentValue = true;       &lt;br /&gt;        this.CrystalReportViewer1.ParameterFieldInfo.Add(paraFld);&lt;br /&gt;        this.CrystalReportViewer1.ShowFirstPage(); &lt;br /&gt;}   &lt;br /&gt;&lt;br /&gt;If we have more than two parameters it is bit difficult .So we can write common Method to passé parameters to crystal report as follow.&lt;br /&gt;&lt;br /&gt;  Public Void SetParameter(string ParaName ,string ParaValue)&lt;br /&gt;{&lt;br /&gt;       ParameterDiscreteValue desValue= new ParameterDiscreteValue();&lt;br /&gt;      desValue. Value= ParaValue;&lt;br /&gt;      ParameterField  paraFld = new ParameterField();&lt;br /&gt;      paraFld.Name = ParaName;&lt;br /&gt;      paraFld.CurrentValues.Add(desValue);&lt;br /&gt;      paraFld.HasCurrentValue = true;    &lt;br /&gt;      CrystalReportViewer1.ParameterFieldInfo.Add(paraFld);&lt;br /&gt;   &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;By using above method we can pass any number of parameters very easily.&lt;br /&gt;As following (Think, ReportName and Createdby are two parameters which we defined in crystal reports) Then &lt;br /&gt;&lt;br /&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;            this.CrystalReportViewer1.ParameterFieldInfo.Clear();&lt;br /&gt;SetParameter(“ReportName”,”My First Report”);//               SetParameter(“Createdby”,”Dinesh”);&lt;br /&gt;        this.CrystalReportViewer1.ShowFirstPage(); &lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;  &lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/9047796785030967179/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2008/04/passing-parameters-to-crystal-reports.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/9047796785030967179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/9047796785030967179'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2008/04/passing-parameters-to-crystal-reports.html' title='Passing Parameters to Crystal Reports'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8222837713253542135.post-3460875590592185610</id><published>2008-01-12T02:10:00.000-08:00</published><updated>2009-10-15T22:38:56.059-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><title type='text'>Log4j</title><content type='html'>Inserting log statements into your code is a low-tech method for debugging it. It may also be the only way because debuggers are not always available or applicable. This is often the case for distributed applications.&lt;br /&gt;&lt;br /&gt;With log4j it is possible to enable logging at runtime without modifying the application binary. The log4j package is designed so that these statements can remain in shipped code without incurring a heavy performance cost. Logging behavior can be controlled by editing a configuration file, without touching the application binary.&lt;br /&gt;so first we need to download log 4j jar file  and put it into lib directory .&lt;br /&gt;http://logging.apache.org/log4j/1.2/download.html&quot; &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Configure Log4j with Xml file &lt;/span&gt;&lt;br /&gt;To configure log4j only we  need to copy following log4j.xml file to  &lt;span style=&quot;font-weight: bold;&quot;&gt;src &lt;/span&gt;folder of project. And edit the location which the log message should be write as &lt;br /&gt;&lt;span style=&quot;font-style:italic;&quot;&gt;&lt; param name=&quot;File&quot; value=&quot;../webapps/myporject/info.log &gt;&lt;/span&gt;   in the log4j.xml file .&lt;br /&gt;&lt;br /&gt;log4j.xml&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&lt; ? xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;&lt;br /&gt;&lt; !DOCTYPE log4j:configuration SYSTEM &quot;log4j.dtd&quot;&gt;&lt;br /&gt;&lt; log4j:configuration xmlns:log4j=&#39;http://jakarta.apache.org/log4j / &#39; &gt;&lt;br /&gt;&lt;br /&gt;  &lt; appender name=&quot;STDOUT&quot; class=&quot;org.apache.log4j.ConsoleAppender&quot; &gt;&lt;br /&gt;    &lt; layout class=&quot;org.apache.log4j.PatternLayout&quot;&gt;&lt;br /&gt;          &lt; param name=&quot;ConversionPattern&quot; value=&quot;%p-- %c %d{ISO8601}-- %m%n&quot; / &gt;&lt;br /&gt;    &lt; /layout&gt;&lt;br /&gt;  &lt; /appender&gt;&lt;br /&gt;&lt;br /&gt;  &lt; appender name=&quot;INFO&quot; class=&quot;org.apache.log4j.RollingFileAppender&quot;&gt;&lt;br /&gt;     &lt; param name=&quot;File&quot; value=&quot;../&lt;span style=&quot;font-style:italic;&quot;&gt;webapps/myporject/info.log&lt;/span&gt;&quot;/&gt; // the location and file name&lt;br /&gt;     &lt; param name=&quot;Append&quot; value=&quot;true&quot; / &gt;&lt;br /&gt;     &lt; param name=&quot;MaxFileSize&quot; value=&quot;5000KB&quot; / &gt;&lt;br /&gt;     &lt; param name=&quot;MaxBackupIndex&quot; value=&quot;2&quot;/&gt;&lt;br /&gt;    &lt; layout class=&quot;org.apache.log4j.PatternLayout&quot;&gt;&lt;br /&gt;          &lt; param name=&quot;ConversionPattern&quot; value=&quot; %p --%c-- %d{ISO8601} -- %m%n&quot; / &gt;&lt;br /&gt;    &lt; /layout&gt;&lt;br /&gt;    &lt; filter class=&quot;org.apache.log4j.varia.LevelRangeFilter&quot; &gt;&lt;br /&gt;      &lt; param name=&quot;LevelMin&quot; value=&quot;INFO&quot;  / &gt;&lt;br /&gt;    &lt; /filter&gt;&lt;br /&gt;  &lt; /appender&gt;&lt;br /&gt;&lt;br /&gt;  &lt; appender name=&quot;DEBUG&quot; class=&quot;org.apache.log4j.RollingFileAppender &gt;&lt;br /&gt;     &lt;span style=&quot;font-style:italic;&quot;&gt;&lt; param name=&quot;File&quot; value=&quot; value=&quot;../webapps/myporject/logs/debug.log&quot;/ &gt;&lt;/span&gt;&lt;br /&gt;     &lt; param name=&quot;Append&quot; value=&quot;true&quot;/&gt;&lt;br /&gt;     &lt; param name=&quot;MaxFileSize&quot; value=&quot;5000KB&quot;/ &gt;&lt;br /&gt;     &lt; param name=&quot;MaxBackupIndex&quot; value=&quot;2&quot;/  &gt;&lt;br /&gt;    &lt; layout class=&quot;org.apache.log4j.PatternLayout&quot;  &gt;&lt;br /&gt;          &lt; param name=&quot;ConversionPattern&quot; value=&quot; %p--%c %d{ISO8601} -- %m%n&quot;/  &gt;&lt;br /&gt;    &lt; /layout&gt;&lt;br /&gt;    &lt; filter class=&quot;org.apache.log4j.varia.LevelRangeFilter&quot;  &gt;&lt;br /&gt;      &lt; param name=&quot;LevelMin&quot; value=&quot;DEBUG&quot; /  &gt;&lt;br /&gt;    &lt; /filter&gt;&lt;br /&gt;  &lt; /appender&gt;&lt;br /&gt;&lt;br /&gt;  &lt; appender name=&quot;FATAL&quot; class=&quot;org.apache.log4j.RollingFileAppender&quot;  &gt;&lt;br /&gt;    &lt;span style=&quot;font-style:italic;&quot;&gt; &lt; param name=&quot;File&quot; value=&quot; value=&quot;../webapps/myporject/logs/fatal.log&quot;/  &gt;&lt;/span&gt;&lt;br /&gt;     &lt; param name=&quot;Append&quot; value=&quot;true&quot;/  &gt;&lt;br /&gt;     &lt; param name=&quot;MaxFileSize&quot; value=&quot;5000KB&quot;/  &gt;&lt;br /&gt;     &lt; param name=&quot;MaxBackupIndex&quot; value=&quot;2&quot;/  &gt;&lt;br /&gt;    &lt; layout class=&quot;org.apache.log4j.PatternLayout&quot;&gt;&lt;br /&gt;          &lt; param name=&quot;ConversionPattern&quot; value=&quot; %p--%c %d{ISO8601} -- %m%n&quot;/  &gt;&lt;br /&gt;    &lt; /layout&gt;&lt;br /&gt;    &lt; filter class=&quot;org.apache.log4j.varia.LevelRangeFilter&quot;  &gt;&lt;br /&gt;      &lt; param name=&quot;LevelMin&quot; value=&quot;FATAL&quot; / &gt;&lt;br /&gt;    &lt; /filter&gt;&lt;br /&gt;  &lt; /appender&gt;&lt;br /&gt;&lt;br /&gt;  &lt; appender name=&quot;WARN&quot; class=&quot;org.apache.log4j.RollingFileAppender&quot; &gt;&lt;br /&gt;    &lt;span style=&quot;font-style:italic;&quot;&gt; &lt; param name=&quot;File&quot; value=&quot;../webapps/myporject/logs/warn.log&quot;/ &gt;&lt;/span&gt;&lt;br /&gt;     &lt; param name=&quot;Append&quot; value=&quot;true&quot;/ &gt;&lt;br /&gt;     &lt; param name=&quot;MaxFileSize&quot; value=&quot;5000KB&quot;/ &gt;&lt;br /&gt;     &lt; param name=&quot;MaxBackupIndex&quot; value=&quot;2&quot;/&gt;&lt;br /&gt;    &lt; layout class=&quot;org.apache.log4j.PatternLayout&quot; &gt;&lt;br /&gt;          &lt; param name=&quot;ConversionPattern&quot; value=&quot; %p--%c %d{ISO8601}  -- %m%n&quot;/ &gt;&lt;br /&gt;    &lt; /layout&gt;&lt;br /&gt;    &lt; filter class=&quot;org.apache.log4j.varia.LevelRangeFilter&quot; &gt;&lt;br /&gt;      &lt; param name=&quot;LevelMin&quot; value=&quot;WARN&quot; /&gt;&lt;br /&gt;    &lt; /filter&gt;&lt;br /&gt;  &lt; /appender&gt;&lt;br /&gt;&lt;br /&gt;  &lt; appender name=&quot;ERROR&quot; class=&quot;org.apache.log4j.RollingFileAppender&quot;  &gt;&lt;br /&gt;   &lt;span style=&quot;font-style:italic;&quot;&gt;  &lt; param name=&quot;File&quot; value=&quot;../webapps/myporject/logs/error.log&quot;/  &gt;&lt;/span&gt;&lt;br /&gt;     &lt; param name=&quot;Append&quot; value=&quot;true&quot;/ &gt;&lt;br /&gt;     &lt; param name=&quot;MaxFileSize&quot; value=&quot;5000KB&quot;/ &gt;&lt;br /&gt;     &lt; param name=&quot;MaxBackupIndex&quot; value=&quot;2&quot;/ &gt;&lt;br /&gt;    &lt; layout class=&quot;org.apache.log4j.PatternLayout&quot;&gt;&lt;br /&gt;          &lt; param name=&quot;ConversionPattern&quot; value=&quot;%p--%c %d{ISO8601} -- %m%n&quot;/  &gt;&lt;br /&gt;    &lt; /layout&gt;&lt;br /&gt;    &lt; filter class=&quot;org.apache.log4j.varia.LevelRangeFilter&quot;&gt;&lt;br /&gt;      &lt; param name=&quot;LevelMin&quot; value=&quot;ERROR&quot; / &gt;&lt;br /&gt;    &lt; /filter&gt;&lt;br /&gt;  &lt; /appender&gt;&lt;br /&gt;&lt;br /&gt;  &lt; root&gt;&lt;br /&gt;    &lt; priority value=&quot;ALL&quot;/&gt;&lt;br /&gt;    &lt; appender-ref ref=&quot;DEBUG&quot;/&gt;&lt;br /&gt;    &lt; appender-ref ref=&quot;FATAL&quot;/&gt;&lt;br /&gt;    &lt; appender-ref ref=&quot;INFO&quot;/&gt;&lt;br /&gt;    &lt; appender-ref ref=&quot;WARN&quot;/&gt;&lt;br /&gt;    &lt; appender-ref ref=&quot;ERROR&quot;/&gt;&lt;br /&gt;  &lt; /root&gt;&lt;br /&gt;&lt;br /&gt;&lt; /log4j:configuration&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Put log messages in the Class&lt;/span&gt;&lt;br /&gt;After put above file to src folder in the project.Then we can use log4j as  following code in the progrmme.&lt;br /&gt;&lt;br /&gt;import org.apache.log4j.Logger;&lt;br /&gt;&lt;br /&gt;class testlog()&lt;br /&gt;{&lt;br /&gt;Logger log=new Logger(testlog.class);&lt;br /&gt;log.Infor(&quot;&lt;&lt;Log masagee&gt;&gt;&gt;&gt;&quot;);// this simply print in specify&lt;br /&gt;                                //locationwebapps/myporject/info.log&lt;br /&gt;}</content><link rel='replies' type='application/atom+xml' href='http://dineshkumara.blogspot.com/feeds/3460875590592185610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dineshkumara.blogspot.com/2008/01/log4j.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/3460875590592185610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8222837713253542135/posts/default/3460875590592185610'/><link rel='alternate' type='text/html' href='http://dineshkumara.blogspot.com/2008/01/log4j.html' title='Log4j'/><author><name>Dinesh Kumara(B.Sc, BIT,MCP)</name><uri>http://www.blogger.com/profile/15425028365108486835</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7XKvN825PIOLKk82iaf5hglle7ybaZ6Hk7aZQj7uvJhadChTlA9SdB6-rm7fRH-twoYF5bIDM917VaF8ptXf7Ugv1bYAn8tO_gwzJiR1qN5HjErINIgPZsJ-ljrCxQDA/s220/DSC05232.jpg'/></author><thr:total>0</thr:total></entry></feed>