<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.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>Sohail Sayed - All Comments</title><link>http://weblogs.asp.net/sohailsayed/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Debug Build: 20510.895)</generator><item><title>re: Calling methods in a codebehind function (PageMethods) from client side using ajax.net</title><link>http://weblogs.asp.net/sohailsayed/archive/2008/02/23/calling-methods-in-a-codebehind-function-pagemethods-from-client-side-using-ajax-net.aspx#7189609</link><pubDate>Wed, 02 Sep 2009 21:35:59 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7189609</guid><dc:creator>zorba</dc:creator><description>&lt;p&gt;Just define a button that points to a code behind click even, then get a javascript reference to it via the DOM, the execute its click even. Simple. &lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7189609" width="1" height="1"&gt;</description></item><item><title>re: Calling methods in a codebehind function (PageMethods) from client side using ajax.net</title><link>http://weblogs.asp.net/sohailsayed/archive/2008/02/23/calling-methods-in-a-codebehind-function-pagemethods-from-client-side-using-ajax-net.aspx#7167149</link><pubDate>Wed, 12 Aug 2009 05:11:52 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7167149</guid><dc:creator>catbaby</dc:creator><description>&lt;p&gt;I have tried all steps but I still get an &amp;quot;undefinded&amp;quot; value returned. &amp;nbsp;Any other ideas?&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7167149" width="1" height="1"&gt;</description></item><item><title>re: Calling methods in a codebehind function (PageMethods) from client side using ajax.net</title><link>http://weblogs.asp.net/sohailsayed/archive/2008/02/23/calling-methods-in-a-codebehind-function-pagemethods-from-client-side-using-ajax-net.aspx#7129796</link><pubDate>Fri, 19 Jun 2009 08:46:25 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7129796</guid><dc:creator>Shikha Gupta</dc:creator><description>&lt;p&gt;Hi Anamii,&lt;/p&gt;
&lt;p&gt;i followed all your steps but still i am getting the runtime error Pagemethods.somefunction() not defined.&lt;/p&gt;
&lt;p&gt;Control never reaches to the breakpoint set on the function.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7129796" width="1" height="1"&gt;</description></item><item><title>re: Calling methods in a codebehind function (PageMethods) from client side using ajax.net</title><link>http://weblogs.asp.net/sohailsayed/archive/2008/02/23/calling-methods-in-a-codebehind-function-pagemethods-from-client-side-using-ajax-net.aspx#7063295</link><pubDate>Tue, 28 Apr 2009 10:03:06 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7063295</guid><dc:creator>dechkotzar</dc:creator><description>&lt;p&gt;What if you store your page methods in codebehind of a user control that is dynamically loaded in Default.aspx, and JScript methods are in a separate file? Can this be done? I've tried it myself, but I always get: Microsoft JScript runtime error: 'PageMethods' is undefined&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7063295" width="1" height="1"&gt;</description></item><item><title>re: Calling methods in a codebehind function (PageMethods) from client side using ajax.net</title><link>http://weblogs.asp.net/sohailsayed/archive/2008/02/23/calling-methods-in-a-codebehind-function-pagemethods-from-client-side-using-ajax-net.aspx#7024878</link><pubDate>Fri, 03 Apr 2009 23:47:40 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7024878</guid><dc:creator>Praveena</dc:creator><description>&lt;p&gt;Did anybody get &amp;quot;Authentication failed&amp;quot; message?? the aspx.cs file and ABMain are in the same project, Does it require authentication??&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7024878" width="1" height="1"&gt;</description></item><item><title>re: Calling methods in a codebehind function (PageMethods) from client side using ajax.net</title><link>http://weblogs.asp.net/sohailsayed/archive/2008/02/23/calling-methods-in-a-codebehind-function-pagemethods-from-client-side-using-ajax-net.aspx#7024406</link><pubDate>Fri, 03 Apr 2009 15:21:31 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7024406</guid><dc:creator>Anamii</dc:creator><description>&lt;p&gt;I've managed to get PageMethods working. &amp;nbsp;I got the JScript error that calibur mentioned. &amp;nbsp;Just follow these steps.&lt;/p&gt;
&lt;p&gt;1. Ensure that the EnablePageMethods attribute is set to true on the ScriptManager&lt;/p&gt;
&lt;p&gt;2. Make sure your methods are in the base page (not Master) of your site. (The first contentplaceholder of your page) OR for this example's sake, in Default.aspx.cs&lt;/p&gt;
&lt;p&gt;3. Make sure your methods are public and static.&lt;/p&gt;
&lt;p&gt;4. Decorate the methods with both [WebMethod] and [ScriptMethod] attributes. &amp;nbsp;This gets rid of the blasted Jscript error...&lt;/p&gt;
&lt;p&gt;5. Run your app.&lt;/p&gt;
&lt;p&gt;If your methods raises any exceptions it won't be bubbled up. If you suspect that nothing is happening put a breakpoint on the first line of your method.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7024406" width="1" height="1"&gt;</description></item><item><title>re: Calling methods in a codebehind function (PageMethods) from client side using ajax.net</title><link>http://weblogs.asp.net/sohailsayed/archive/2008/02/23/calling-methods-in-a-codebehind-function-pagemethods-from-client-side-using-ajax-net.aspx#6970604</link><pubDate>Tue, 17 Mar 2009 15:24:15 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6970604</guid><dc:creator>Phani</dc:creator><description>&lt;p&gt;its not working same Pagemethods undefined&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6970604" width="1" height="1"&gt;</description></item><item><title>re: Calling methods in a codebehind function (PageMethods) from client side using ajax.net</title><link>http://weblogs.asp.net/sohailsayed/archive/2008/02/23/calling-methods-in-a-codebehind-function-pagemethods-from-client-side-using-ajax-net.aspx#6937680</link><pubDate>Wed, 04 Mar 2009 21:34:43 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6937680</guid><dc:creator>calibur</dc:creator><description>&lt;p&gt;Its not working for me - Microsoft JScript runtime error: 'PageMethods' is undefined ..... tried EVRYTHNG&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6937680" width="1" height="1"&gt;</description></item><item><title>re: Calling methods in a codebehind function (PageMethods) from client side using ajax.net</title><link>http://weblogs.asp.net/sohailsayed/archive/2008/02/23/calling-methods-in-a-codebehind-function-pagemethods-from-client-side-using-ajax-net.aspx#6851680</link><pubDate>Wed, 21 Jan 2009 18:10:33 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6851680</guid><dc:creator>tmelkumov</dc:creator><description>&lt;p&gt;Had a similar problem with the &amp;quot;PageMethods undefined&amp;quot; error. Was able to solve it by adding the EnablePageMethods=&amp;quot;true&amp;quot; attribute to the asp:ScriptManager tag. &lt;/p&gt;
&lt;p&gt;e.g.: &amp;lt;asp:ScriptManager ID=&amp;quot;ScriptManager1&amp;quot; EnablePageMethods=&amp;quot;true&amp;quot; runat=&amp;quot;server&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6851680" width="1" height="1"&gt;</description></item><item><title>re: Calling methods in a codebehind function (PageMethods) from client side using ajax.net</title><link>http://weblogs.asp.net/sohailsayed/archive/2008/02/23/calling-methods-in-a-codebehind-function-pagemethods-from-client-side-using-ajax-net.aspx#6839075</link><pubDate>Fri, 16 Jan 2009 12:21:15 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6839075</guid><dc:creator>Hari krishna</dc:creator><description>&lt;p&gt;i tried to place the script and server side web method in the master page. and it is showing pagemethod is undefined.&lt;/p&gt;
&lt;p&gt;it is working fine if we place javascript and serverside web method in the inherited page.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6839075" width="1" height="1"&gt;</description></item></channel></rss>