<?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>Web Forms</title><link>http://forums.asp.net/18.aspx</link><description>All about building ASP.NET Pages - server controls, events, validation, etc.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Calling Static methods on Code Behind class of WebForm</title><link>http://forums.asp.net/thread/1673916.aspx</link><pubDate>Fri, 20 Apr 2007 00:50:43 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1673916</guid><dc:creator>skysailor</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1673916.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=1673916</wfw:commentRss><description>I found that if I put a &amp;lt;%@ Reference Page="rrrr.aspx" %&amp;gt; driective in one page then I can refer to the other page class file directly from the first page using the ASP namespace. That is exactly what I wanted. However it can't be used from app_code classes. And the killer - it can't be used if you Publish your web site!! So close. I have to publish/compile my web site.</description></item><item><title>Re: Calling Static methods on Code Behind class of WebForm</title><link>http://forums.asp.net/thread/1673905.aspx</link><pubDate>Fri, 20 Apr 2007 00:36:33 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1673905</guid><dc:creator>mbanavige</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1673905.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=1673905</wfw:commentRss><description>&lt;blockquote&gt;&lt;div&gt;&lt;img src="http://forums.asp.net/Themes/default/images/icon-quote.gif" /&gt; &lt;strong&gt;skysailor:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;Thanks for that reply. I didn't know about Web Application Project. But that is not an option for me. The project is well under way in standard ASP.NET 2.0 Web Site structure.&lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt; 
&lt;p&gt;a conversion capability exists: &lt;a href="http://west-wind.com/WebLog/posts/13132.aspx"&gt;http://west-wind.com/WebLog/posts/13132.aspx&lt;/a&gt;&lt;br /&gt;bu sure to read the link to&amp;nbsp;Scott Guthries walk through.&lt;/p&gt;&lt;blockquote&gt;&lt;div&gt;&lt;img src="http://forums.asp.net/Themes/default/images/icon-quote.gif" /&gt; &lt;strong&gt;skysailor:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;I thought I would be able to crete a partial class in app_code and then extend it in each of my pages .cs files&amp;nbsp;to add the methods I want. But even that does not work. I assume that partial classes require all partial parts to be in the same assembly. &lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt; 
&lt;p&gt;a partial class is simply a way to create a single class from multiple source files.&amp;nbsp; it has no impact of references or how the class is ultimately compiled.&lt;/p&gt;&lt;blockquote&gt;&lt;div&gt;&lt;img src="http://forums.asp.net/Themes/default/images/icon-quote.gif" /&gt; &lt;strong&gt;skysailor:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;Is there anyway to turn off the seperate assembly for each page? And compile everything into one assembly? &lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt; 
&lt;p&gt;That is what a Web Application Project does.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Calling Static methods on Code Behind class of WebForm</title><link>http://forums.asp.net/thread/1673888.aspx</link><pubDate>Fri, 20 Apr 2007 00:11:24 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1673888</guid><dc:creator>skysailor</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1673888.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=1673888</wfw:commentRss><description>&lt;p&gt;Thanks for that reply. I didn't know about Web Application Project. But that is not an option for me. The project is well under way in standard ASP.NET 2.0 Web Site structure.&lt;/p&gt;
&lt;p&gt;I thought I would be able to crete a partial class in app_code and then extend it in each of my pages .cs files&amp;nbsp;to add the methods I want. But even that does not work. I assume that partial classes require all partial parts to be in the same assembly. Is there anyway to turn off the seperate assembly for each page? And compile everything into one assembly? Is the name of the assembly for a page known? Can you refer to it somehow?&lt;/p&gt;</description></item><item><title>Re: Calling Static methods on Code Behind class of WebForm</title><link>http://forums.asp.net/thread/1672696.aspx</link><pubDate>Thu, 19 Apr 2007 11:24:17 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1672696</guid><dc:creator>mbanavige</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1672696.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=1672696</wfw:commentRss><description>&lt;p&gt;The web compilation model in vs2005 has each page getting compiled into seperate assemblies.&amp;nbsp; beacause of this, you would not have a way to reference the codebehind of one page from another page or from an app_code class.&amp;nbsp; if you were using a Web Application Project (WAP), then it would use the compilation model of vs2003 and you could do what you are asking.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Calling Static methods on Code Behind class of WebForm</title><link>http://forums.asp.net/thread/1672232.aspx</link><pubDate>Thu, 19 Apr 2007 04:45:59 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1672232</guid><dc:creator>skysailor</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1672232.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=1672232</wfw:commentRss><description>&lt;p&gt;I don't want a method in another class. I have plenty od classes in app_code that I can call from anywhere.&lt;/p&gt;
&lt;p&gt;I want a method on the page that I can call from other classes. Specifically I want to have a method that returns the URL to redirect to that page. The method may have parameters that are translated into query string parameters on the URL. This is one example, there are others where I would want an actual static method on the page class.&lt;/p&gt;
&lt;p&gt;I tried creating a partial class with the same class name in a unit in app_code. That doesn't work either...&lt;/p&gt;</description></item><item><title>Re: Calling Static methods on Code Behind class of WebForm</title><link>http://forums.asp.net/thread/1672093.aspx</link><pubDate>Thu, 19 Apr 2007 02:27:46 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1672093</guid><dc:creator>mbanavige</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1672093.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=1672093</wfw:commentRss><description>&lt;p&gt;create a class/classes in your app_code folder for your site wide common methods.&lt;/p&gt;
&lt;p&gt;move your static method to the new class.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;classes in app_code are available to the entire app.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Calling Static methods on Code Behind class of WebForm</title><link>http://forums.asp.net/thread/1672072.aspx</link><pubDate>Thu, 19 Apr 2007 02:06:15 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1672072</guid><dc:creator>skysailor</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1672072.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=18&amp;PostID=1672072</wfw:commentRss><description>&lt;p&gt;How can you call a static method defined in one web form code behind class from another web form (or from a non-web form&amp;nbsp;class)?&lt;/p&gt;
&lt;p&gt;The class name does not seem to be visible in other parts of the web site. Are they in a different namespace? There seems to be a namespace prefix called ASP that can reference the current class and master page classes and global.asx. But you can't reference other web form classes.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>