<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Tech Manthan &#187; .Net Manthan</title>
	<atom:link href="http://techmanthan.wordpress.com/category/net-manthan/feed/" rel="self" type="application/rss+xml" />
	<link>http://techmanthan.wordpress.com</link>
	<description>"Lets share knowledge..."</description>
	<lastBuildDate>Wed, 02 Jan 2008 06:37:41 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='techmanthan.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/286b941bd3e6f31615e9e18190d2cc58?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Tech Manthan &#187; .Net Manthan</title>
		<link>http://techmanthan.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://techmanthan.wordpress.com/osd.xml" title="Tech Manthan" />
		<item>
		<title>C# 3.0 New Features</title>
		<link>http://techmanthan.wordpress.com/2007/07/13/c-30/</link>
		<comments>http://techmanthan.wordpress.com/2007/07/13/c-30/#comments</comments>
		<pubDate>Fri, 13 Jul 2007 09:08:31 +0000</pubDate>
		<dc:creator>Himanshu Poddar</dc:creator>
				<category><![CDATA[.Net Manthan]]></category>

		<guid isPermaLink="false">http://techmanthan.wordpress.com/2007/07/13/c-30/</guid>
		<description><![CDATA[
What&#8217;s New in C# 3.0

By: Himanshu Poddar
Even though C# 3.0 is not even standardized yet, Microsoft provided a preview release at its Professional Developers Conference (PDC) in September so eager developers could try out some of the expected features. This article discusses the following major new enhancements expected in C# 3.0:

Implicitly typed local variables 
Anonymous [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techmanthan.wordpress.com&blog=1042563&post=27&subd=techmanthan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong><span style="font-size:16pt;font-family:Arial;"><u></u></span></strong><strong><span style="font-size:16pt;font-family:Arial;"><u></p>
<p align="center">What&#8217;s New in C# 3.0</p>
<p></u></span></strong></p>
<p align="right"><u><strong><span style="font-size:11pt;font-family:Arial;">By: Himanshu Poddar</span></strong></u></p>
<p><span style="font-size:11pt;font-family:Arial;">Even though C# 3.0 is not even standardized yet, Microsoft provided a preview release at its Professional Developers Conference (PDC) in September so eager developers could try out some of the expected features. This article discusses the following major new enhancements expected in C# 3.0:</span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></p>
<ol>
<li class="MsoNormal"><strong><span style="font-size:11pt;font-family:Arial;">Implicitly typed local variables </span></strong></li>
<li class="MsoNormal"><strong><span style="font-size:11pt;font-family:Arial;">Anonymous types </span></strong></li>
<li class="MsoNormal"><strong><span style="font-size:11pt;font-family:Arial;">Extension methods </span></strong></li>
<li class="MsoNormal"><strong><span style="font-size:11pt;font-family:Arial;">Object and collection initializers </span></strong></li>
</ol>
<p><span><strong><span id="more-27"></span> </strong><strong><u>1. Implicitly Typed Local Variables<br />
</u></strong><span style="font-size:11pt;font-family:Arial;"> </span></span><br />
<span><span style="font-size:11pt;font-family:Arial;"></span></span></p>
<p><span><span style="font-size:11pt;font-family:Arial;"></span></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">C# 3.0 introduces a new keyword called &#8220;var&#8221;. Var allows you to declare a new variable, whose type is implicitly inferred from the expression used to initialize the variable. In other words, the following is valid syntax in C# 3.0:</span></p>
<p><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">var i = 1;</span><span style="font-size:11pt;font-family:Arial;"> </span></p>
<p><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">The preceding line initializes the variable i to value 1 and gives it the type of integer. Note that &#8220;i&#8221; is strongly typed to an integer—it is not an object or a VB6 variant, nor does it carry the overhead of an object or a variant.</span><span style="font-size:11pt;font-family:Arial;"> </span><span style="font-size:11pt;font-family:Arial;">To ensure the strongly typed nature of the variable that is declared with the var keyword, C# 3.0 requires that you put the assignment (initializer) on the same line as the declaration (declarator). Also, the initializer has to be an expression, not an object or collection initializer, and it cannot be null. If multiple declarators exist on the same variable, they must all evaluate to the same type at compile time. Implicitly typed arrays, on the other hand, are possible using a slightly different syntax, as shown below:</span></p>
<p><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">var intArr = new[] {1,2,3,4} ;</span><span style="font-size:11pt;font-family:Arial;"> </span></p>
<p><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">The above line of code would end up declaring intArr as int[].</span><span style="font-size:11pt;font-family:Arial;"> </span> <span style="font-size:11pt;font-family:Arial;"><!--more--><br />
 <strong><u>2. Anonymous Types</u></strong></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><strong><u></u></strong></span></p>
<p><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">C# 3.0 gives you the flexibility to create an instance of a class without having to write code for the class beforehand. So, you now can write code as shown below:</span><span style="font-size:11pt;font-family:Arial;"> </span></p>
<p><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">new {hair=&#8221;black&#8221;, skin=&#8221;green&#8221;, teethCount=64}</span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"> </span><span style="font-size:11pt;font-family:Arial;">The preceding line of code, with the help of the &#8220;new&#8221; keyword, gives you a new type that has three properties: </span><span style="font-size:11pt;font-family:Arial;">hair, skin, and teethCount. Behind the scenes, the C# compiler would create a class that looks as follows:</span><span style="font-size:11pt;font-family:Arial;"> </span></p>
<p><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;">class __Anonymous1</span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">{</span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"><span>   </span>private string _hair = &#8220;black&#8221;;</span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"><span>   </span>private string _skin = &#8220;green&#8221;;</span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"><span>   </span>private int _teeth<span>   </span>= 64;</span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"> public string hair {get { return _hair;</span></span><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"> }</span></span><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;">set { _hair = value; }}</span><span style="font-size:11pt;font-family:Arial;"><span>   </span></span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"><span></span> public string skin {get { return _skin; } set { _skin = value; }}</span><span style="font-size:11pt;font-family:Arial;"><span>   </span></span></span></p>
<p></span><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"><span></span> public int teeth {get { return _teeth; } set { _teeth = value; }}</span></span><span style="font-size:11pt;font-family:Arial;"> </span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></p>
<p align="left"><span style="font-size:11pt;font-family:Arial;">}</span></p>
<p><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"> </span><span style="font-size:11pt;font-family:Arial;">In fact, if another anonymous type that specified the same sequence of names and types were created, the compiler would be smart enough to create only a single anonymous type for both instances to use. </span><span style="font-size:11pt;font-family:Arial;"> </span><span style="font-size:11pt;font-family:Arial;">Now you have a class, but you still need something to hold an instance of the above class. This is where the &#8220;var&#8221; keyword comes in handy; it lets you hold a statically typed instance of the above instance of the anonymous type. Here is a rather simple and easy use of an anonymous type:</span></p>
<p><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">var frankenstein = new {hair=&#8221;black&#8221;, skin=&#8221;green&#8221;, teethCount=64}</span><span style="font-size:11pt;font-family:Arial;"> </span> <span style="font-size:11pt;font-family:Arial;"><!--more--><br />
 <strong><u>3. Extension Methods</u></strong></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><strong><u></u></strong></span></p>
<p><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">Extension methods enable you to extend various types with additional static methods. However, they are quite limited and should be used as a last resort—only where instance methods are insufficient. Extension methods can be declared only in static classes and are identified by the keyword &#8220;this&#8221; as a modifier on the first parameter of the method. The following is an example of a valid extension method:</span><span style="font-size:11pt;font-family:Arial;"> </span></p>
<p><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;">public static int ToInt32(this string s)</span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">{</span><span style="font-size:11pt;font-family:Arial;"><span>   </span></span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"><span></span>return Convert.ToInt32(s) ;</span><span style="font-size:11pt;font-family:Arial;">                       </span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;">}</span><span style="font-size:11pt;font-family:Arial;"></span></span></p>
<p><span style="font-size:11pt;font-family:Arial;">If the static class that contains the above method is imported using the &#8220;using&#8221; keyword, the ToInt32 method will appear in existing types (albeit in lower precedence to existing instance methods), and you will be able to compile and execute code that looks as follows:</span></p>
<p><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">string s = &#8220;1&#8243;;</span><span style="font-size:11pt;font-family:Arial;">int i<span>    </span>= s.ToInt32();</span></p>
<p><span style="font-size:11pt;font-family:Arial;">This allows you to take advantage of the extensible nature of various built-in or defined types and add newer methods to them.</span><span style="font-size:11pt;font-family:Arial;"> </span> <span style="font-size:11pt;font-family:Arial;"><!--more--><strong><u><br />
4. Object and Collection Initializers</u></strong></span></p>
<p><span style="font-size:11pt;font-family:Arial;"></span></p>
<p><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">C# 3.0 is expected to allow you to include an initializer that specifies the initial values of the members of a newly created object or collection. This enables you to combine declaration and initialization in one step.</span><span style="font-size:11pt;font-family:Arial;">For instance, if you defined a CoOrdinate class as follows:</span><span style="font-size:11pt;font-family:Arial;"> </span></p>
<p><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;">public class CoOrdinate</span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">{</span><span style="font-size:11pt;font-family:Arial;"><span>   </span></span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"><span></span>public int x ;</span><span style="font-size:11pt;font-family:Arial;"><span>   </span></span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"><span></span>public int y;</span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">}</span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">You then could declare and initialize a CoOrdinate object using an object initializer, like this:</span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"></span></span><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">var myCoOrd = new CoOrdinate{ x = 0, y= 0} ;</span><span style="font-size:11pt;font-family:Arial;"> </span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">The above code may have made you raise your eyebrows and ask, &#8220;Why not just write the following:</span></span></p>
<p></span><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">&#8220;</span><span style="font-size:11pt;font-family:Arial;">var myCoOrd = new CoOrdinate(0, 0) ;</span><span style="font-size:11pt;font-family:Arial;"> </span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">Similarly, you should easily be able to give values to collections in a rather concise and compact manner in C# 3.0. For instance, the following C# 2.0 code:</span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;">List&lt;string&gt; animals = new List&lt;string&gt;();</span></span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">animals.Add(&#8220;monkey&#8221;);</span><span style="font-size:11pt;font-family:Arial;">animals.Add(&#8220;donkey&#8221;);</span></span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">animals.Add(&#8220;cow&#8221;);</span><span style="font-size:11pt;font-family:Arial;">animals.Add(&#8220;dog&#8221;);</span></span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">animals.Add(&#8220;cat&#8221;);</span></span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">Now can be shortened to simply:</span></span></span></p>
<p><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"><span style="font-size:11pt;font-family:Arial;"></span><span style="font-size:11pt;font-family:Arial;">List&lt;string&gt; animals = new List&lt;string&gt; {</span><span style="font-size:11pt;font-family:Arial;"><span>   </span>&#8220;monkey&#8221;, &#8220;donkey&#8221;, &#8220;cow&#8221;, &#8220;dog&#8221;, &#8220;cat&#8221; } ;</span></span></span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/techmanthan.wordpress.com/27/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/techmanthan.wordpress.com/27/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techmanthan.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techmanthan.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techmanthan.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techmanthan.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techmanthan.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techmanthan.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techmanthan.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techmanthan.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techmanthan.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techmanthan.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techmanthan.wordpress.com&blog=1042563&post=27&subd=techmanthan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techmanthan.wordpress.com/2007/07/13/c-30/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/07021cfbc8ac633d7fcaad18ee1821b2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Himanshu Poddar</media:title>
		</media:content>
	</item>
		<item>
		<title>AJAX Implemetation</title>
		<link>http://techmanthan.wordpress.com/2007/05/29/ajax-implemetation/</link>
		<comments>http://techmanthan.wordpress.com/2007/05/29/ajax-implemetation/#comments</comments>
		<pubDate>Tue, 29 May 2007 10:07:51 +0000</pubDate>
		<dc:creator>sandipdavda</dc:creator>
				<category><![CDATA[.Net Manthan]]></category>

		<guid isPermaLink="false">http://techmanthan.wordpress.com/2007/05/29/ajax-implemetation/</guid>
		<description><![CDATA[AJAX(ASP.Net) Implemetation
By Priyank Rach
In previous article on Ajax http://techmanthan.wordpress.com/2007/05/07/ajax/, Himanshu had discussed about the Ajax web application model, how it differs from classic web application model, Advantages &#38; disadvantages of Ajax. In this article we will see how to start with Ajax in ASP.Net.
First you will have to download ASP.Net Ajax Extension. It can be [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techmanthan.wordpress.com&blog=1042563&post=23&subd=techmanthan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p align="center" style="text-indent:0.5in;" class="MsoNormal"><strong><span style="font-size:14pt;font-family:Verdana;">AJAX(ASP.Net) Implemetation</span></strong></p>
<p align="right" style="text-indent:0.5in;" class="MsoNormal"><span style="font-size:12pt;font-family:Verdana;"><u><strong>By Priyank Rach</strong></u></span></p>
<p align="justify" style="text-indent:0.5in;" class="MsoNormal"><span style="font-size:8pt;font-family:Arial;">In previous article on Ajax <a href="http://techmanthan.wordpress.com/2007/05/07/ajax/">http://techmanthan.wordpress.com/2007/05/07/ajax/</a>, Himanshu had discussed about the Ajax web application model, how it differs from classic web application model, Advantages &amp; disadvantages of Ajax. In this article we will see how to start with Ajax in ASP.Net.</span></p>
<p align="justify" style="text-indent:0.5in;" class="MsoNormal"><span style="font-size:10pt;font-family:Arial;">First you will have to download <strong>ASP.Net Ajax Extension</strong>. It can be free download from web. Now go for its installation. After the successful installation of it, you will able to see a new template in wizard of creating a new web site. It would be named as <strong>“ASP.Net Ajax Enabled Website”</strong>. </span></p>
<p><img src="http://techmanthan.files.wordpress.com/2007/05/template2.jpg" alt="template2.jpg" /></p>
<p align="justify" style="text-indent:0.5in;" class="MsoNormal"><span style="font-size:10pt;font-family:Arial;">In this web site you will be able to see <strong>“Ajax Extensions”</strong> in toolbar. It has the controls like script manager, Update panel which gives Ajax benefits to your web application.</span></p>
<p style="text-align:center;"><img src="http://techmanthan.files.wordpress.com/2007/05/toolbar2.jpg" alt="toolbar2.jpg" /></p>
<p align="justify" style="text-indent:0.5in;" class="MsoNormal"><span style="font-size:10pt;font-family:Arial;">As you will be able to see there form is default loaded with <strong>script manager</strong>. It loads all necessary scripts for Ajax controls.<span> </span>Now you can drag the <strong>Update Panel</strong>. Update panel is the control which allows asynchronous post back to your application. Means you can refresh the controls inside the panel without refreshing the whole page. </span></p>
<p align="justify" style="text-indent:0.5in;" class="MsoNormal"><span style="font-size:10pt;font-family:Arial;">Now as this indicate, controls within the update panel can refresh the portion covered by the panel. Similarly you can refresh the panel by control which is outside of that panel also.<span> </span>These can be gained using “<strong>Triggers</strong>”. In trigger also you can have the option to partially refresh the page or our convential refresh (whole page). Trigger can be fired on various events like Button click, dropdown selected index change or radio button state change etc.</span></p>
<p align="justify" style="text-indent:0.5in;" class="MsoNormal"><span style="font-size:10pt;font-family:Arial;">This was related to creating a new Ajax enabled web site, but if you already have a web application and if you want to have Ajax features in it then you may need to create a dummy Ajax enabled application through template and copy the web.config file to your web application’s web.config file. You may need to copy only the Ajax related portion from your web.config file. </span></p>
<p align="justify" class="MsoNormal"><span style="font-size:10pt;font-family:Arial;">Let us know how useful you find this article…</span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/techmanthan.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/techmanthan.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techmanthan.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techmanthan.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techmanthan.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techmanthan.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techmanthan.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techmanthan.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techmanthan.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techmanthan.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techmanthan.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techmanthan.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techmanthan.wordpress.com&blog=1042563&post=23&subd=techmanthan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techmanthan.wordpress.com/2007/05/29/ajax-implemetation/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f5f019e0ba792084a81a84fae9f55f1a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Sandip Davda</media:title>
		</media:content>

		<media:content url="http://techmanthan.files.wordpress.com/2007/05/template2.jpg" medium="image">
			<media:title type="html">template2.jpg</media:title>
		</media:content>

		<media:content url="http://techmanthan.files.wordpress.com/2007/05/toolbar2.jpg" medium="image">
			<media:title type="html">toolbar2.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>Silverlight &#8211; Microsoft Changing the Web World Over Night?</title>
		<link>http://techmanthan.wordpress.com/2007/05/01/silverlight-cross-browser-cross-platform-plug-in/</link>
		<comments>http://techmanthan.wordpress.com/2007/05/01/silverlight-cross-browser-cross-platform-plug-in/#comments</comments>
		<pubDate>Tue, 01 May 2007 13:24:17 +0000</pubDate>
		<dc:creator>Himanshu Poddar</dc:creator>
				<category><![CDATA[.Net Manthan]]></category>

		<guid isPermaLink="false">http://techmanthan.wordpress.com/2007/05/01/silverlight-cross-browser-cross-platform-plug-in/</guid>
		<description><![CDATA[Silverlight &#8211; Cross-Browser, Cross-Platform Plug-In
By: Himanshu Poddar 
Silverlight is a cross-browser, cross-platform plug-in for delivering the next generation of Microsoft .NET–based media experiences and rich interactive applications for the Web. Yes, Microsoft will make the Silverlight browser plug-in freely available for all supported platforms. AJAX, Visual Basic .NET, C#, Python, and Ruby and integrates with existing Web [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techmanthan.wordpress.com&blog=1042563&post=11&subd=techmanthan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p align="center"><strong><u><span style="font-size:11pt;font-family:Arial;">Silverlight &#8211; Cross-Browser, Cross-Platform Plug-In</span></u></strong></p>
<p align="right"><strong><u><span style="font-size:11pt;font-family:Arial;"></span></u></strong><strong><u><span style="font-size:10pt;font-family:Arial;">By: Himanshu Poddar</span></u></strong><strong><u><span style="font-size:10pt;font-family:Arial;"><span style="text-decoration:none;"> </span></span></u></strong></p>
<p align="justify"><span style="font-size:10pt;font-family:Arial;"><span style="text-decoration:none;"></span></span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;">Silverlight is a cross-browser, cross-platform plug-in for delivering the next generation of Microsoft .NET–based media experiences and rich interactive applications for the Web.</span><span style="font-size:10pt;font-family:Arial;"> </span></span><span><span style="font-size:10pt;font-family:Arial;">Yes, Microsoft will make the <strong>Silverlight browser plug-in freely available</strong> for all supported platforms.</span></span><span></span><span> <span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;">AJAX, Visual Basic .NET, C#, Python, and Ruby and integrates with existing Web applications. Silverlight media capabilities include fast, cost-effective delivery of high-quality audio and video to all major browsers including Mozilla Firefox, Apple Safari, and Windows Internet Explorer running on Mac OS or Microsoft Windows. By using Microsoft Expression Studio and Microsoft Visual Studio, designers and developers can collaborate more effectively using the skills they have today to light up the Web of tomorrow.</span><span style="font-size:10pt;font-family:Arial;"> </span></span></span></p>
<p><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span><strong><span style="font-size:10pt;font-family:Arial;">Key benefits of Silverlight include:</span></strong><strong><span style="font-size:10pt;font-family:Arial;"> </span></strong></span></span></p>
<p><span><span style="font-size:10pt;font-family:Arial;"><strong><span style="font-size:10pt;font-family:Arial;"></span></strong></span><span style="font-size:10pt;font-family:Arial;"><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"><strong>1<u>. Compelling cross-platform user experiences</u></strong></span></span></span></span></span><span><span style="font-size:10pt;font-family:Arial;"> </span></span></p>
<p align="justify"><span><span style="font-size:10pt;font-family:Arial;"></span></span><span><span style="font-size:10pt;font-family:Arial;"></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span><span style="font-size:10pt;font-family:Arial;">Deliver media experiences and rich interactive applications (RIA) for the Web that incorporate video, animation, interactivity, and stunning user interfaces (UIs). </span><span style="font-size:10pt;font-family:Arial;">Seamless, fast installation for users, thanks to a small, on-demand, easy-to-install plug-in that is under 2 megabyte (MB) in size and works with all leading browsers. </span><span style="font-size:10pt;font-family:Arial;">Consistent experiences on Windows and on Mac OS without any additional installation requirements. </span><span style="font-size:10pt;font-family:Arial;"> </span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"> </span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;">Create richer, more compelling Web experiences that take greater advantage of the client for increased performance. Stunning vector-based graphics, media, text, animation, and overlays enable seamless integration of graphics and effects into any existing Web application. </span><span style="font-size:10pt;font-family:Arial;"> </span></span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;">Enhance existing standards/AJAX-based applications with richer graphics and media and improve their performance and capabilities by using Silverlight. </span></span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"> </span></span></span></p>
<p><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"><u><span style="font-size:10pt;font-family:Arial;"><strong>2. Flexible Programming Model with Collaboration Tools</strong></span></u></span></span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"> </span></span></span></p>
<p><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"><u><span style="font-size:10pt;font-family:Arial;"></span></u></span><span style="font-size:10pt;font-family:Arial;"><u><span style="font-size:10pt;font-family:Arial;"></span></u><span style="font-size:10pt;font-family:Arial;">Based on the Microsoft .NET Framework, Silverlight enables developers and designers to easily use existing skills and tools to deliver media experiences and RIAs for the Web. </span><span style="font-size:10pt;font-family:Arial;">Choice of programming languages such as AJAX, Visual Basic .NET, C#, Python, and Ruby offers developers and designers the flexibility to use their existing skills without the need to learn a new language. </span><span style="font-size:10pt;font-family:Arial;"> </span></span></span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"> </span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;">Simple integration with existing Web technologies and assets means Silverlight works with any back-end Web platform or technology. No &#8220;rip and replace&#8221; required. Silverlight integrates with your existing infrastructure and applications, including Apache and PHP, as well as with JavaScript and XHTML on the client. </span><span style="font-size:10pt;font-family:Arial;"> </span><span style="font-size:10pt;font-family:Arial;"> </span><span style="font-size:10pt;font-family:Arial;">Role-specific tools for both designers and developers that take advantage of Web standards and the breadth of the Microsoft .NET-connected software features. </span><span style="font-size:10pt;font-family:Arial;">Designers will like that Expression Studio creates interactive UIs and media rich experiences, prepares media for encoding and distribution, and creates World Wide Web Consortium (W3C) standards-compliant sites by using modern XHTML, XML, XSLT, CSS, and Microsoft ASP.NET.</span></span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"> </span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span></span></span><span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></p>
<p align="justify"><span style="font-size:10pt;font-family:Arial;"></span><span style="font-size:10pt;font-family:Arial;"><u><span style="font-size:10pt;font-family:Arial;"><strong>3. High-quality media, low-cost delivery</strong></span></u></span></p>
<p></span></p>
<p align="justify"><span style="font-size:10pt;font-family:Arial;"><u><span style="font-size:10pt;font-family:Arial;"></span></u></span><span style="font-size:10pt;font-family:Arial;"></span><span style="font-size:10pt;font-family:Arial;"><u><span style="font-size:10pt;font-family:Arial;"></span></u><span style="font-size:10pt;font-family:Arial;">Unified media format scales from high definition (HD) to mobile with Windows Media Video (WMV), the Microsoft implementation of the Society of Motion Picture and Television Engineers (SMPTE) VC-1 video standard, as well as support for Windows Media Audio (WMA) and MP3 audio. </span><span style="font-size:10pt;font-family:Arial;"> </span><span style="font-size:10pt;font-family:Arial;"> </span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;">Add vector-based graphics and overlays to media with support for integration of graphics that scale to any size and broadcast-style overlays for tickers and closed captioning. </span><span style="font-size:10pt;font-family:Arial;"> </span><span style="font-size:10pt;font-family:Arial;"></span><span style="font-size:10pt;font-family:Arial;">Flexible ad-insertion solutions with video and animation including the ability to deliver fluid, broadcast-style video or animated advertisements without any loss of visual fidelity or motion quality. </span><span style="font-size:10pt;font-family:Arial;"> </span><span style="font-size:10pt;font-family:Arial;"> </span></span></span></p>
<p><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span></span></span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span></span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span><span style="font-size:10pt;font-family:Arial;"><u><span style="font-size:10pt;font-family:Arial;"><strong>4. Connected to data, servers, and services</strong></span></u></span><span style="font-size:10pt;font-family:Arial;"> </span></span></p>
<p></span></span></p>
<p align="justify"><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span></span><span style="font-size:10pt;font-family:Arial;"></span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span><span style="font-size:10pt;font-family:Arial;"><u><span style="font-size:10pt;font-family:Arial;"></span></u><span style="font-size:10pt;font-family:Arial;">Create mash-ups by incorporating data and services from anywhere on the Web by using Silverlight support for LINQ and LINQ-to-XML. Access data with common protocols like JSON, RSS, POX, and REST. </span><span style="font-size:10pt;font-family:Arial;">Increase discoverability of RIA content that can be indexed and searched, thanks to the Silverlight text-based XAML format. </span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"> </span><span style="font-size:10pt;font-family:Arial;"> </span></span></span></span></p>
<p align="justify"><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;">Download Silverlight from: <a href="http://www.microsoft.com/silverlight/downloads.aspx">http://www.microsoft.com/silverlight/downloads.aspx</a></span></span></span></span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/techmanthan.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/techmanthan.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techmanthan.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techmanthan.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techmanthan.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techmanthan.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techmanthan.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techmanthan.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techmanthan.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techmanthan.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techmanthan.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techmanthan.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techmanthan.wordpress.com&blog=1042563&post=11&subd=techmanthan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techmanthan.wordpress.com/2007/05/01/silverlight-cross-browser-cross-platform-plug-in/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/07021cfbc8ac633d7fcaad18ee1821b2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Himanshu Poddar</media:title>
		</media:content>
	</item>
		<item>
		<title>How to Use Embedded JavaScript Files in ASP.NET AJAX</title>
		<link>http://techmanthan.wordpress.com/2007/05/01/how-to-use-embedded-javascript-files-in-aspnet-ajax/</link>
		<comments>http://techmanthan.wordpress.com/2007/05/01/how-to-use-embedded-javascript-files-in-aspnet-ajax/#comments</comments>
		<pubDate>Tue, 01 May 2007 13:14:30 +0000</pubDate>
		<dc:creator>Himanshu Poddar</dc:creator>
				<category><![CDATA[.Net Manthan]]></category>

		<guid isPermaLink="false">http://techmanthan.wordpress.com/2007/05/01/how-to-use-embedded-javascript-files-in-aspnet-ajax/</guid>
		<description><![CDATA[How to Use Embedded JavaScript Files in ASP.NET AJAX
By: Himanshu Poddar  
It&#8217;s pretty easy to setup a .js file in your web project with some code in it. Sometimes though the code in said file is associated with say a custom client control (something that inherits from Sys.UI.Control) that is in its own assembly (not your [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techmanthan.wordpress.com&blog=1042563&post=10&subd=techmanthan&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p align="center"><strong><span style="font-size:10pt;font-family:Arial;"><span><span style="font-size:11pt;font-family:Arial;"><u>How to Use Embedded JavaScript Files in ASP.NET AJAX</u></span></span></span></strong></p>
<p align="right"><strong><span style="font-size:10pt;font-family:Arial;"><span></span><u>By: Himanshu Poddar</u></span></strong><span style="font-size:10pt;font-family:Arial;"> </span><span style="font-size:10pt;font-family:Arial;"> </span></p>
<p><span style="font-size:10pt;font-family:Arial;"></span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;">It&#8217;s pretty easy to setup a <strong>.js</strong> file in your web project with some code in it. Sometimes though the code in said file is associated with say a custom client control (something that inherits from <a href="http://ajax.asp.net/docs/ClientReference/Sys.UI/ControlClass/default.aspx"><span style="color:#2b91af;">Sys.UI.Control</span></a>) that is in its own assembly (not your web project). This is how our controls are setup for our platform.</span><span style="font-size:10pt;font-family:Arial;"> </span></span><span style="font-size:10pt;font-family:Arial;"> </span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;">The problem is now that we have code in <strong>js</strong> files, they have to be replicated across all our web projects and that&#8217;s just no fun.  So instead we moved to having the <strong>js</strong> files embedded in our main class library.  The server controls register these files and they are then pulled out of the assembly and sent down to the client and cached.  </span><span style="font-size:10pt;font-family:Arial;"> </span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;">Here&#8217;s how to set this up yourself&#8230;</span><span style="font-size:10pt;font-family:Arial;">Add the following line as the last line in your <strong>js</strong> file:</span><span style="font-size:10pt;color:#993300;font-family:Arial;">if (Sys != undefined) Sys.Application.notifyScriptLoaded();</span><span style="font-size:10pt;font-family:Arial;"> </span></span></span><span style="font-size:10pt;font-family:Arial;"> </span><span style="font-size:10pt;font-family:Arial;"></span><span style="font-size:10pt;font-family:Arial;"></span><span style="font-size:10pt;font-family:Arial;"></p>
<p align="justify"><span style="font-size:10pt;font-family:Arial;">This tells ASP.NET AJAX that the file is done loading.  This is needed because all embedded <strong>js</strong> files stream down in the same &#8220;file&#8221; so the end of the file isn&#8217;t necessarily the end of what&#8217;s streamed down to the client.  Unlike when you just like to a <strong>js</strong> file regularly.</span><span style="font-size:10pt;font-family:Arial;"> </span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;">Now, in Visual Studio go to the properties window while your <strong>js</strong> file is selected.  Change the <strong><span style="color:#2b91af;font-family:Arial;">Build Action</span></strong> to <em><strong><span style="color:#2b91af;font-family:Arial;">Embedded Resource</span></strong></em>.  This will compile the file into the assembly as a resource.  If you open up reflector and venture through, you&#8217;ll find the <strong>js</strong> file.  Now in your server control, add this line so ASP.NET knows about the resource (and what mime type to send it down as): </span><span style="font-size:10pt;color:#993300;font-family:Arial;">[assembly: WebResource("EvNet.Web.Templates.Scripts.Toolbar.js", "text/javascript")]</span><span style="font-size:10pt;font-family:Arial;"> </span></span><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;">Now anytime you add a <em><strong><span style="color:#2b91af;font-family:Arial;">ScriptReference</span></strong></em><strong> </strong>to a <strong><span style="color:#2b91af;font-family:Arial;">ScriptManager</span></strong>, your file will be streamed down to the client.  Just specify the resource name (This is the physical file path down to the file starting at the root of your class library with slashes replaced by periods) and the assembly the resource is in and you&#8217;re done.  No need to worry about where the file is anymore. </span><span style="font-size:10pt;font-family:Arial;"> </span><span style="font-size:10pt;font-family:Arial;"> </span><span style="font-size:10pt;font-family:Arial;">This of course works when implementing <span style="color:#ff6600;">IScriptControl.GetScriptReferences</span> in your server control too:</span></span></p>
<p></span></p>
<p align="justify"><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;"></span><span style="font-size:10pt;color:#993300;font-family:Arial;">public IEnumerable&lt;ScriptReference&gt; GetScriptReferences()<br />
{<br />
     return new ScriptReference[] </span><span style="font-size:10pt;color:#993300;font-family:Arial;">{ </span><span style="font-size:10pt;color:#993300;font-family:Arial;">new ScriptReference(&#8220;EvNet.Web.Templates.Scripts.Toolbar.js&#8221;, &#8220;EvNet&#8221;) </span><span style="font-size:10pt;color:#993300;font-family:Arial;">};<br />
}</span><span style="font-size:10pt;color:#993300;font-family:Arial;"> </span></span></p>
<p align="justify"><span style="font-size:10pt;font-family:Arial;"><span style="font-size:10pt;color:#993300;font-family:Arial;"></span><span style="font-size:10pt;color:#993300;font-family:Arial;"><span style="font-size:10pt;font-family:Arial;">Enjoy!</span></span></span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/techmanthan.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/techmanthan.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techmanthan.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techmanthan.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techmanthan.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techmanthan.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techmanthan.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techmanthan.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techmanthan.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techmanthan.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techmanthan.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techmanthan.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techmanthan.wordpress.com&blog=1042563&post=10&subd=techmanthan&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techmanthan.wordpress.com/2007/05/01/how-to-use-embedded-javascript-files-in-aspnet-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/07021cfbc8ac633d7fcaad18ee1821b2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Himanshu Poddar</media:title>
		</media:content>
	</item>
	</channel>
</rss>