<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/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>ASP.NET AJAX UI</title><link>http://forums.asp.net/1008.aspx</link><description>Here you can discuss UI-related issues with AJAX such as controls and client-side functionality including Silverlight controls for ASP.NET</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Using javascript on pages that use a master page</title><link>http://forums.asp.net/thread/3544757.aspx</link><pubDate>Thu, 03 Dec 2009 00:43:31 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3544757</guid><dc:creator>OlivierStorm</dc:creator><author>OlivierStorm</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3544757.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=3544757</wfw:commentRss><description>&lt;p&gt;I &amp;nbsp;am adding a great link for any of you looking for solutions&amp;nbsp;&lt;/p&gt;&lt;p&gt;- masterpage &lt;/p&gt;&lt;p&gt;- contentplaceholder &lt;/p&gt;&lt;p&gt;- javascript &amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.dotnetcurry.com/ShowArticle.aspx?ID=273"&gt;http://www.dotnetcurry.com/ShowArticle.aspx?ID=273&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;All the merits for Mr Suprotim Agarwal&lt;/p&gt;&lt;p&gt;and I didn&amp;#39;t find his artikel over here....&lt;/p&gt;</description></item><item><title>Re: Using javascript on pages that use a master page</title><link>http://forums.asp.net/thread/2015011.aspx</link><pubDate>Mon, 19 Nov 2007 20:09:43 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2015011</guid><dc:creator>Kevin.McPhail</dc:creator><author>Kevin.McPhail</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2015011.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=2015011</wfw:commentRss><description>&lt;p&gt;Holy smokes! I feel like an idiot. Can&amp;#39;t believe i did not try that before posting.&lt;/p&gt;</description></item><item><title>Re: Using javascript on pages that use a master page</title><link>http://forums.asp.net/thread/2014640.aspx</link><pubDate>Mon, 19 Nov 2007 16:01:52 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2014640</guid><dc:creator>DisturbedBuddha</dc:creator><author>DisturbedBuddha</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2014640.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=2014640</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;Kevin.McPhail:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;and you can&amp;#39;t add a &amp;lt;script&amp;gt; &amp;lt;/script&amp;gt; to content pages. &lt;/div&gt;&lt;/BLOCKQUOTE&gt; 
&lt;p&gt;You most certainly can!&amp;nbsp; Typically I place it right after the &amp;lt;asp:Content&amp;gt; tag at the top of the page.&amp;nbsp; Just a few things to remember, if you are going to reference server controls in your javascript, use the client ID to reference the control such as: 
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&amp;#39;&amp;lt;%= MyControl.ClientID %&amp;gt;&amp;#39;).value 
&lt;p&gt;rather than 
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementByID(&amp;#39;MyControl&amp;#39;).value. 
&lt;p&gt;Because IDs get mangled/changed a bit by the master/content system.&amp;nbsp; Also, if you have a scriptmanager or scriptmanagerproxy on your content page, place your scripts after that.&lt;/p&gt;</description></item><item><title>Using javascript on pages that use a master page</title><link>http://forums.asp.net/thread/2014590.aspx</link><pubDate>Mon, 19 Nov 2007 15:37:36 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2014590</guid><dc:creator>Kevin.McPhail</dc:creator><author>Kevin.McPhail</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2014590.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=2014590</wfw:commentRss><description>&lt;p&gt;I was wondering if i could get any guidance on using javascript for pages that make use of a masterpage. To give a specific example i would like to implement the delay load described by Matt Berseth here: &lt;a href="http://mattberseth.com/blog/2007/07/delay_load_an_updatepanel.html"&gt;http://mattberseth.com/blog/2007/07/delay_load_an_updatepanel.html&lt;/a&gt;. In the example he implements a lot of javascript that is specific to the page so i don&amp;#39;t think it makes sense to add it to a script library. But how do i use it in a page inherited from a master page. The js is specific to the content of the page so i would not want to put it in the master page and you can&amp;#39;t add a &amp;lt;script&amp;gt; &amp;lt;/script&amp;gt; to content pages. It als seems tedious to use a stringbuilder and registerclientscriptblock from the code-behind (seems like i remember reading that this could be a problem with Ajax enabled pages anyway). So how are people managing ajax w/ custom js in content pages? Any pointers greatly appreciated. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Kevin&lt;/p&gt;</description></item></channel></rss>