<?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 Networking and Web Services</title><link>http://forums.asp.net/1009.aspx</link><description>Discuss your issues with the client and server interaction in AJAX using web services and other transports used by AJAX</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>FAQ in ASP.NET AJAX Networking and Web Services</title><link>http://forums.asp.net/thread/2076926.aspx</link><pubDate>Wed, 26 Dec 2007 04:23:32 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2076926</guid><dc:creator>Raymond Wen - MSFT</dc:creator><author>Raymond Wen - MSFT</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2076926.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1009&amp;PostID=2076926</wfw:commentRss><description>&lt;p&gt;&lt;a class="" title="top" name="top"&gt;&lt;/a&gt;&lt;a href="http://forums.asp.net/t/1198029.aspx#faq01"&gt;1. Why can’t I access page controls in PageMethod?&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;b&gt;1. Why can’t I access page controls in PageMethod?&lt;/b&gt;&lt;a class="" title="faq01" name="faq01"&gt;&lt;/a&gt;&lt;br /&gt;PageMethod is invoked via Reflection. &lt;br /&gt;When the server receives a request for the PageMethod, it uses ProcessRequest(HttpContext context) method in System.Web.Script.Services.RestHandler class to serve it. Reflection is used internally to invoke PageMethod which is public and static.&lt;br /&gt;It’s not accessed via an instance of the page. Also, this request doesn’t go through the regular lifecycle of a normal request for .aspx page. Therefore, controls on the page can’t be accessed inside the PageMethod.&lt;br /&gt;</description></item></channel></rss>