<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Tips &amp; Tricks for ASP.NET, IIS, and Visual Web Developer : Development</title><link>http://blogs.msdn.com/webdevelopertips/archive/tags/Development/default.aspx</link><description>Tags: Development</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Tip#63: Did you know…How to specify a fixed port for Visual Studio Development Server while using WAPs?</title><link>http://blogs.msdn.com/webdevelopertips/archive/2009/05/19/tip-63-did-you-know-how-to-specify-a-fixed-port-for-visual-studio-development-server-while-using-waps.aspx</link><pubDate>Wed, 20 May 2009 00:59:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9629829</guid><dc:creator>WebDevTools</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/webdevelopertips/comments/9629829.aspx</comments><wfw:commentRss>http://blogs.msdn.com/webdevelopertips/commentrss.aspx?PostID=9629829</wfw:commentRss><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;In Tip#21 we showed you how to set a fixed port for the Developer Web Server in Web Sites. &lt;/p&gt;  &lt;p&gt;Here is how you will be able to configure this for Web Application Projects. &lt;/p&gt;  &lt;p&gt;1. Go to the properties page of WAP. Right Click on your Web Application and click on Properties in context menu. This will take you to the &lt;strong&gt;Properties page&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/71f004a708d4_D4A8/PropertiesWAP_2.jpg"&gt;&lt;img title="PropertiesWAP" height="480" alt="PropertiesWAP" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/71f004a708d4_D4A8/PropertiesWAP_thumb.jpg" width="252" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;2. Select &lt;strong&gt;Web Tab&lt;/strong&gt; in this page.&lt;/p&gt;  &lt;p&gt;3. Under &lt;strong&gt;Servers&lt;/strong&gt; section, select the &lt;strong&gt;Use Visual Studio Development Server&lt;/strong&gt; option. Then select &lt;strong&gt;Specific Port&lt;/strong&gt; and enter the port on which you want your App to run.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/71f004a708d4_D4A8/WAP_PropertiesPage_2.jpg"&gt;&lt;img title="WAP_PropertiesPage" height="221" alt="WAP_PropertiesPage" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/71f004a708d4_D4A8/WAP_PropertiesPage_thumb.jpg" width="513" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;4. View your page in browser and you will see that Visual studio has assigned the port you configured for your Development Server.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/71f004a708d4_D4A8/SpecificPort_2.jpg"&gt;&lt;img title="SpecificPort" height="240" alt="SpecificPort" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/71f004a708d4_D4A8/SpecificPort_thumb.jpg" width="508" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Reshmi Mangalore&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SDET, Visual Web Developer&lt;/strong&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9629829" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/Development/default.aspx">Development</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/VWD/default.aspx">VWD</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/tips+and+tricks/default.aspx">tips and tricks</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/WAP/default.aspx">WAP</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/VSTS/default.aspx">VSTS</category></item><item><title>Tip #26: Did you know... How to have C# and VB.NET files inside your App_Code directory?</title><link>http://blogs.msdn.com/webdevelopertips/archive/2008/11/21/tip-26-did-you-know-how-to-have-c-and-vb-net-files-inside-your-app-code-directory.aspx</link><pubDate>Fri, 21 Nov 2008 14:13:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9132090</guid><dc:creator>WebDevTools</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/webdevelopertips/comments/9132090.aspx</comments><wfw:commentRss>http://blogs.msdn.com/webdevelopertips/commentrss.aspx?PostID=9132090</wfw:commentRss><description>&lt;p&gt;If you are taking advantage of the App_Code folder to develop an ASP.NET WebSite some times you need to use code files that are written in different .NET languages. For example, you may want to use C# files and VB.NET files in the same web site:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip2.NETfilesinsideyourApp_Codedirectory_8AE5/image_2.png"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="242" alt="image" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip2.NETfilesinsideyourApp_Codedirectory_8AE5/image_thumb.png" width="240" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;To be able to do this you can use a feature of the compilation section in web.config to configure sub folders inside App_Code to be compiled separately.&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;compilation &lt;/span&gt;&lt;span style="color: red"&gt;debug&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;true&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;&amp;gt;
    &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;codeSubDirectories&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
        &amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;add &lt;/span&gt;&lt;span style="color: red"&gt;directoryName&lt;/span&gt;&lt;span style="color: blue"&gt;=&lt;/span&gt;&amp;quot;&lt;span style="color: blue"&gt;VBFiles&lt;/span&gt;&amp;quot; &lt;span style="color: blue"&gt;/&amp;gt;
    &amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;codeSubDirectories&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;compilation&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;

&lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&lt;/span&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Federico Silva Armas&amp;#160; &lt;br /&gt;&lt;/strong&gt;SDET, &lt;a href="http://weblogs.asp.net/asptest/"&gt;ASP.NET QA Team&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9132090" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/Development/default.aspx">Development</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/VS2008/default.aspx">VS2008</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/VWD/default.aspx">VWD</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/tips+and+tricks/default.aspx">tips and tricks</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/VSTS/default.aspx">VSTS</category></item><item><title>Tip #15: Did you know... How to use tracing with ASP.NET Ajax?</title><link>http://blogs.msdn.com/webdevelopertips/archive/2008/10/19/tip-15-did-you-know-how-to-use-tracing-with-asp-net-ajax.aspx</link><pubDate>Sun, 19 Oct 2008 23:15:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9006818</guid><dc:creator>WebDevTools</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/webdevelopertips/comments/9006818.aspx</comments><wfw:commentRss>http://blogs.msdn.com/webdevelopertips/commentrss.aspx?PostID=9006818</wfw:commentRss><description>&lt;p&gt;If you are using ASP.NET Ajax and you are having problems with a web page one quick and dirty way to debug it is to add tracing statements. You do this by using the &amp;quot;Sys.Debug.trace&amp;quot; function. For example:&lt;/p&gt;  &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; background-color: #f4f4f4"&gt;   &lt;div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;     &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;script&lt;/span&gt; &lt;span style="color: #ff0000"&gt;language&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;javascript&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   1:&lt;/span&gt;&amp;#160; &lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   2:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;function&lt;/span&gt; PositionDiv() {&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   3:&lt;/span&gt;         Sys.Debug.trace(&lt;span style="color: #006080"&gt;&amp;quot;Entering PositionDiv Function&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   4:&lt;/span&gt;         &lt;span style="color: #008000"&gt;//some other code&lt;/span&gt;&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   5:&lt;/span&gt;         Sys.Debug.trace(&lt;span style="color: #006080"&gt;&amp;quot;Exiting PositionDiv Function&amp;quot;&lt;/span&gt;);&lt;/pre&gt;&lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #606060"&gt;   6:&lt;/span&gt;     }&lt;/pre&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;script&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;In order to see the trace output you need to add a TextArea tag into the page and give it an id of &amp;quot;TraceConsole&amp;quot;. This limits the usability of tracing, since once the application is deployed it would mean that the TextArea must be manually added to see the output. However, traces are also written to the Output window of VisualStudio when debugging a web site as well as the FireFox's output console, which is definitely more useful.&lt;/p&gt;

&lt;p&gt;One of the nice things about trace is that you can leave the trace calls in your debug scripts, so that if a problem occurs in a production server you can flip to debug scripts and analyze the trace output.&lt;/p&gt;

&lt;p&gt;The Sys.Debug class has a lot of other nice methods, for example:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;assert&lt;/em&gt;: If the condition being tested is false, a message box will be used to display a message.&lt;/li&gt;

  &lt;li&gt;&lt;em&gt;fail&lt;/em&gt;: Causes the program to stop execution and break into the debugger.&lt;/li&gt;

  &lt;li&gt;&lt;em&gt;traceDump&lt;/em&gt;: Output an object's data in a readable format.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Federico Silva Armas&lt;/strong&gt;

  &lt;br /&gt;SDET, &lt;a href="http://weblogs.asp.net/asptest/"&gt;ASP.NET QA Team&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9006818" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/Development/default.aspx">Development</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Tip #14: Did you know…How to enable debugging of your Web Site?</title><link>http://blogs.msdn.com/webdevelopertips/archive/2008/10/16/tip-14-did-you-know-how-to-enable-debugging-of-your-web-site.aspx</link><pubDate>Thu, 16 Oct 2008 03:09:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9001234</guid><dc:creator>WebDevTools</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/webdevelopertips/comments/9001234.aspx</comments><wfw:commentRss>http://blogs.msdn.com/webdevelopertips/commentrss.aspx?PostID=9001234</wfw:commentRss><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;To run a page in Debug mode you will have to choose &lt;strong&gt;Debug –&amp;gt; Start Debugging &lt;/strong&gt;or just press &lt;strong&gt;F5&lt;/strong&gt;. &lt;/p&gt;  &lt;p&gt;Debugging support is not enabled by default and if you have not run the debugger before on this web site, you will need to configure it. This is internally driven by a setting in Web.cong file. By default, debug is set to ”false” in compilation section of&amp;#160; web.config file.&lt;/p&gt; &lt;span style="color: #0000ff"&gt;   &lt;p&gt;&lt;/p&gt;    &lt;pre&gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &amp;lt;&lt;/span&gt;&lt;span style="color: #ff0000"&gt;compilation&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #000000"&gt;debug&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;false&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #000000"&gt;strict&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;false&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #000000"&gt;explicit&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;

 &amp;lt;/&lt;/span&gt;&lt;span style="color: #ff0000"&gt;compilation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;&lt;/span&gt;&lt;font face="Tahoma" color="#000000" size="2"&gt;When you hit F5 for the first time, you will see the Debugging not enabled message box as &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="Tahoma" color="#000000" size="2"&gt;shown &lt;/font&gt;&lt;font face="Tahoma" color="#000000" size="2"&gt;below.&lt;/font&gt;&lt;/p&gt;&lt;/pre&gt;

  &lt;p&gt;&lt;/p&gt;

  &lt;p&gt;&lt;/p&gt;

  &lt;pre&gt;&lt;p&gt;&lt;a href="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip14DidyouknowHowtoenabledebuggingofyou_BD35/EnablingDebugging_2.jpg"&gt;&lt;img title="EnablingDebugging" height="288" alt="EnablingDebugging" src="http://blogs.msdn.com/blogfiles/webdevelopertips/WindowsLiveWriter/Tip14DidyouknowHowtoenabledebuggingofyou_BD35/EnablingDebugging_thumb.jpg" width="520" /&gt;&lt;/a&gt; &lt;/span&gt;&lt;/p&gt;&lt;/pre&gt;

  &lt;p&gt;&lt;/p&gt;

  &lt;p&gt;If you click OK, Visual Web Developer will modify web.config to show debug=”true” as shown below.&lt;/p&gt;

  &lt;p&gt;&lt;/p&gt;

  &lt;pre&gt;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #ff0000"&gt;compilation&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;strong&gt;&lt;span style="color: #000000"&gt;debug&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&lt;/strong&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #000000"&gt;strict&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;false&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt; &lt;/span&gt;&lt;span style="color: #000000"&gt;explicit&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;true&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;
&amp;lt;/&lt;/span&gt;&lt;span style="color: #ff0000"&gt;compilation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;Reshmi Mangalore&lt;/strong&gt; &lt;/font&gt;&lt;/p&gt;

  &lt;p&gt;&lt;font size="2"&gt;SDET, Web Development Tools&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9001234" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/Development/default.aspx">Development</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/Visual+Studio+2008/default.aspx">Visual Studio 2008</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/VS2008/default.aspx">VS2008</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/VWD/default.aspx">VWD</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/tips+and+tricks/default.aspx">tips and tricks</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/Visual+Studio/default.aspx">Visual Studio</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item><item><title>Tip #13: Did you know... How to get the browser agent using ASP.NET Ajax ?</title><link>http://blogs.msdn.com/webdevelopertips/archive/2008/10/10/tip-13-did-you-know-how-to-get-the-browser-agent-using-asp-net-ajax.aspx</link><pubDate>Fri, 10 Oct 2008 11:40:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8994535</guid><dc:creator>WebDevTools</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/webdevelopertips/comments/8994535.aspx</comments><wfw:commentRss>http://blogs.msdn.com/webdevelopertips/commentrss.aspx?PostID=8994535</wfw:commentRss><description>&lt;p&gt;When writing JavaScript for a web application, there may be times when you want to do something different depending on the browser that is requesting the page. ASP.NET Ajax has an easy way to this with the Sys.Browser object.&lt;/p&gt;  &lt;p&gt;For example, let's say you want to do something different if the requesting browser is Opera. The code snippet below shows how to do that:&lt;/p&gt;  &lt;pre class="code"&gt;&lt;span style="color: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515"&gt;script &lt;/span&gt;&lt;span style="color: red"&gt;language&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;javascript&amp;quot; &lt;/span&gt;&lt;span style="color: red"&gt;type&lt;/span&gt;&lt;span style="color: blue"&gt;=&amp;quot;text/javascript&amp;quot;&amp;gt;
function &lt;/span&gt;DoSomething() {
    &lt;span style="color: blue"&gt;if&lt;/span&gt;(Sys.Browser.agent === Sys.Browser.Opera)
    {
        &lt;span style="color: green"&gt;// opera specific code here
    &lt;/span&gt;}
}
&lt;span style="color: blue"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515"&gt;script&lt;/span&gt;&lt;span style="color: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;

&lt;p&gt;There are other useful properties of the Browser object. For example, &lt;em&gt;Sys.Browser.version.toString();&lt;/em&gt; will return the version of the browser, if you need further granularity when deciding what to do for each browser version.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Federico Silva Armas&lt;/strong&gt;

  &lt;br /&gt;SDET, &lt;a href="http://weblogs.asp.net/asptest/"&gt;ASP.NET QA Team&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8994535" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/Development/default.aspx">Development</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/tips+and+tricks/default.aspx">tips and tricks</category><category domain="http://blogs.msdn.com/webdevelopertips/archive/tags/ASP.NET/default.aspx">ASP.NET</category></item></channel></rss>