<?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>Suman Chakrabarti - SharePoint and ASP.NET blog : How do I</title><link>http://blogs.msdn.com/sumanc/archive/tags/How+do+I/default.aspx</link><description>Tags: How do I</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>'How do I' get redirected to the default Error or Success layouts pages?</title><link>http://blogs.msdn.com/sumanc/archive/2009/01/25/how-do-i-get-redirected-to-the-default-error-or-success-layouts-pages.aspx</link><pubDate>Sun, 25 Jan 2009 23:32:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9375251</guid><dc:creator>Suman Chakrabarti</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/sumanc/comments/9375251.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sumanc/commentrss.aspx?PostID=9375251</wfw:commentRss><wfw:comment>http://blogs.msdn.com/sumanc/rsscomments.aspx?PostID=9375251</wfw:comment><description>&lt;p&gt;You just want the error message to be displayed on the default SharePoint error page. Is this an easy&lt;/p&gt; &lt;p&gt;In Microsoft.SharePoint.Utilities.SPUtility there are 2 functions:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;SPUtility.TransferToErrorPage - this transfers the user to the administrative layouts page for error messages  &lt;li&gt;SPUtility.TransferToSuccessPage - this transfers the user to the page one would see after something such as a long running transaction&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;There are a few overloads for each and they come in handy when developing custom admin pages or custom lists.&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9375251" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sumanc/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/sumanc/archive/tags/How+do+I/default.aspx">How do I</category></item><item><title>'How do I' create a layouts page</title><link>http://blogs.msdn.com/sumanc/archive/2009/01/25/how-do-i-create-an-admin-layouts-page.aspx</link><pubDate>Sun, 25 Jan 2009 22:42:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9375213</guid><dc:creator>Suman Chakrabarti</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/sumanc/comments/9375213.aspx</comments><wfw:commentRss>http://blogs.msdn.com/sumanc/commentrss.aspx?PostID=9375213</wfw:commentRss><wfw:comment>http://blogs.msdn.com/sumanc/rsscomments.aspx?PostID=9375213</wfw:comment><description>&lt;p&gt;Following the lead of &lt;a href="http://blogs.msdn.com/SaraFord/" target="_blank"&gt;Sara Ford&lt;/a&gt;, I think I want to do a 'How do I' piece for SharePoint developers. I don't know how long this will last, but this is the first post.&lt;/p&gt;  &lt;p&gt;First off, layout pages require the following directives. Try as I may, I have never been able to get around whatever permission demand is blocking layout pages from inheriting a specific class.&lt;/p&gt;  &lt;p class="code"&gt;&lt;code&gt;&amp;lt;%@ Assembly Name=&amp;quot;Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot; %&amp;gt;      &lt;br /&gt;&amp;lt;%@ Page language=&amp;quot;C#&amp;quot; MasterPageFile=&amp;quot;~/_layouts/application.master&amp;quot; inherits=&amp;quot;Microsoft.SharePoint.WebControls.LayoutsPageBase, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot; %&amp;gt;&lt;/code&gt;&lt;/p&gt;  &lt;p&gt;The files must be placed in the %12-hive%\Template\Layouts directory-I usually create a custom folder underneath based on my specific feature to separate my custom code from SharePoint code. Incidentally, I recommend putting stylesheets, JavaScripts, and generic HTTP handlers here as well (the HttpHandler does allow you to create a code behind compile and deploy to this directory, which is cool). On your layouts pages you can add any web parts and custom controls you wish, you just have to add them manually as you don't have web part zones or personalization.&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;Note: By putting pages in the layouts directory, you may be breaching your security for the application as layouts pages are available to any authenticated user (not in a publishing scenario, though). Ensure that your pages are secured using controls such as the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spsecuritytrimmedcontrol.aspx"&gt;SPSecurityTrimmedControl.&lt;/a&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9375213" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/sumanc/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/sumanc/archive/tags/How+do+I/default.aspx">How do I</category></item></channel></rss>