<?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 Parts and Personalization</title><link>http://forums.asp.net/145.aspx</link><description>Discussions of the new ASP.NET 2.0 portal framework.  &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=167&amp;c=30" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Disable Verbs</title><link>http://forums.asp.net/thread/1613142.aspx</link><pubDate>Fri, 09 Mar 2007 11:47:33 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1613142</guid><dc:creator>Arjun Tiwari</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1613142.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=145&amp;PostID=1613142</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I was just trying to find out some help but I didn't find anything to disable verbs. &lt;/p&gt;
&lt;p&gt;I did some rnd at my own end and got the result. Please find the below js that will solve the problem. Please let me know your input. &lt;/p&gt;
&lt;p&gt;&lt;font size=2&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=#0000ff size=2&gt;&amp;lt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;script&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#ff0000 size=2&gt;type&lt;/font&gt;&lt;font color=#0000ff size=2&gt;="text/javascript"&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;font size=2&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;function&lt;/font&gt;&lt;font size=2&gt; HideWebpartLevelMenu(ctrlID,showMenu)
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;/*
&lt;p&gt;Arjun Tiwari&lt;/p&gt;
&lt;p&gt;Hide edit or delete or any webpart menu that has not permission on&lt;/p&gt;
&lt;p&gt;LTrim, RTrim and trim function is required as supporting function to trim the spaces&lt;/p&gt;
&lt;p&gt;09032007&lt;/p&gt;
&lt;p&gt;*/&lt;/p&gt;&lt;/font&gt;&lt;font size=2&gt; 
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;/*WebPart_wp786936923VerbsMenu
&lt;p&gt;syntax Prefix = WebPart_&lt;/p&gt;
&lt;p&gt;controls part.UniqueID&lt;/p&gt;
&lt;p&gt;suffix VerbsMenu &lt;/p&gt;
&lt;p&gt;LTrim(temp[menucounter].innerText.toString().toLowerCase())&lt;/p&gt;
&lt;p&gt;get the webpart name, possiblity is $ sign and : sign so filter it mgr1$gwpt1&lt;/p&gt;
&lt;p&gt;--PARAMETER INFORMATION&lt;/p&gt;
&lt;p&gt;ctrlID is the controlID and showMenu will contain 'false,true' type string that mean&lt;/p&gt;
&lt;p&gt;first string will be treated for edit menu and last string will be treated for delete menu&lt;/p&gt;
&lt;p&gt;*/&lt;/p&gt;&lt;/font&gt;&lt;font size=2&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;if&lt;/font&gt;&lt;font size=2&gt;(ctrlID!=&lt;/font&gt;&lt;font color=#0000ff size=2&gt;null&lt;/font&gt;&lt;font size=2&gt;)
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;//if there is $ sign with the controls unique id&lt;/font&gt;&lt;font size=2&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;if&lt;/font&gt;&lt;font size=2&gt;(ctrlID.indexOf(&lt;/font&gt;&lt;font color=#800000 size=2&gt;'$'&lt;/font&gt;&lt;font size=2&gt;)&amp;gt;0)
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;ctrlID=ctrlID.substring(ctrlID.indexOf(&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;'$'&lt;/font&gt;&lt;font size=2&gt;)+1,ctrlID.length);
&lt;p&gt;} &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;//if there is : sign with the controls unique id&lt;/font&gt;&lt;font size=2&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;if&lt;/font&gt;&lt;font size=2&gt;(ctrlID.indexOf(&lt;/font&gt;&lt;font color=#800000 size=2&gt;':'&lt;/font&gt;&lt;font size=2&gt;)&amp;gt;0)
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;ctrlID=ctrlID.substring(ctrlID.indexOf(&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;':'&lt;/font&gt;&lt;font size=2&gt;)+1,ctrlID.length);
&lt;p&gt;} &lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;var&lt;/font&gt;&lt;font size=2&gt; doc=document.getElementById(&lt;/font&gt;&lt;font color=#800000 size=2&gt;"WebPart_"&lt;/font&gt;&lt;font size=2&gt; + ctrlID + &lt;/font&gt;&lt;font color=#800000 size=2&gt;"VerbsMenu"&lt;/font&gt;&lt;font size=2&gt;);
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;if&lt;/font&gt;&lt;font size=2&gt;(doc==&lt;/font&gt;&lt;font color=#0000ff size=2&gt;null&lt;/font&gt;&lt;font size=2&gt; || doc==&lt;/font&gt;&lt;font color=#800000 size=2&gt;"undefined"&lt;/font&gt;&lt;font size=2&gt;)
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;return&lt;/font&gt;&lt;font size=2&gt;;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;var&lt;/font&gt;&lt;font size=2&gt; arr_showMenu=showMenu.split(&lt;/font&gt;&lt;font color=#800000 size=2&gt;","&lt;/font&gt;&lt;font size=2&gt;); 
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;var&lt;/font&gt;&lt;font size=2&gt; temp=doc.getElementsByTagName(&lt;/font&gt;&lt;font color=#800000 size=2&gt;"a"&lt;/font&gt;&lt;font size=2&gt;); 
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;for&lt;/font&gt;&lt;font size=2&gt;(menucounter=0;menucounter&amp;lt;temp.length; menucounter++)
&lt;p&gt;{ &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;//var menuLinkText=trim(temp[menucounter].innerText).toString().toLowerCase(); &lt;/font&gt;&lt;font size=2&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;var&lt;/font&gt;&lt;font size=2&gt; menuLinkText=trim(temp[menucounter].title).toString().toLowerCase();
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;if&lt;/font&gt;&lt;font size=2&gt;(menuLinkText.substring(0,4)==&lt;/font&gt;&lt;font color=#800000 size=2&gt;'edit'&lt;/font&gt;&lt;font size=2&gt; &amp;amp;&amp;amp; !ToggleMenu(arr_showMenu[0]))
&lt;p&gt;{ &lt;/p&gt;
&lt;p&gt;temp[menucounter].style.display=&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;"none"&lt;/font&gt;&lt;font size=2&gt;;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;if&lt;/font&gt;&lt;font size=2&gt;(menuLinkText.substring(0,6)==&lt;/font&gt;&lt;font color=#800000 size=2&gt;'delete'&lt;/font&gt;&lt;font size=2&gt; &amp;amp;&amp;amp; !ToggleMenu(arr_showMenu[1]))
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;temp[menucounter].style.display=&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;"none"&lt;/font&gt;&lt;font size=2&gt;;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;function&lt;/font&gt;&lt;font size=2&gt; ToggleMenu(showMenu)
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;if&lt;/font&gt;&lt;font size=2&gt;(showMenu!=&lt;/font&gt;&lt;font color=#0000ff size=2&gt;null&lt;/font&gt;&lt;font size=2&gt;)
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;if&lt;/font&gt;&lt;font size=2&gt;(showMenu==&lt;/font&gt;&lt;font color=#800000 size=2&gt;"false"&lt;/font&gt;&lt;font size=2&gt;)
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;return&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;false&lt;/font&gt;&lt;font size=2&gt;;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;return&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;true&lt;/font&gt;&lt;font size=2&gt;;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;// Removes leading whitespaces&lt;/font&gt;&lt;font size=2&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;function&lt;/font&gt;&lt;font size=2&gt; LTrim( value ) { 
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;var&lt;/font&gt;&lt;font size=2&gt; re = /\s*((\S+\s*)*)/;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;return&lt;/font&gt;&lt;font size=2&gt; value.replace(re, &lt;/font&gt;&lt;font color=#800000 size=2&gt;"$1"&lt;/font&gt;&lt;font size=2&gt;); 
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;// Removes ending whitespaces&lt;/font&gt;&lt;font size=2&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;function&lt;/font&gt;&lt;font size=2&gt; RTrim( value ) { 
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;var&lt;/font&gt;&lt;font size=2&gt; re = /((\s*\S+)*)\s*/;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;return&lt;/font&gt;&lt;font size=2&gt; value.replace(re, &lt;/font&gt;&lt;font color=#800000 size=2&gt;"$1"&lt;/font&gt;&lt;font size=2&gt;); 
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;// Removes leading and ending whitespaces&lt;/font&gt;&lt;font size=2&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;function&lt;/font&gt;&lt;font size=2&gt; trim( value ) { 
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;return&lt;/font&gt;&lt;font size=2&gt; LTrim(RTrim(value)); 
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&amp;lt;/&lt;/font&gt;&lt;font color=#800000 size=2&gt;script&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&amp;gt;&lt;/font&gt;
&lt;p&gt;&lt;font color=#0000ff size=2&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font color=#0000ff size=2&gt;Regards,&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color=#0000ff size=2&gt;Arjun&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Re: Disable Verbs</title><link>http://forums.asp.net/thread/1373232.aspx</link><pubDate>Thu, 17 Aug 2006 10:19:25 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1373232</guid><dc:creator>TeunD</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1373232.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=145&amp;PostID=1373232</wfw:commentRss><description>&lt;p&gt;I did a &lt;a href="http://www.teuntostring.net/blog/2006/08/disable-edit-verb-on-web-part.html"&gt;short write-up&lt;/a&gt; of my attempts to achieve what Zal asked for (which sounded perfectly reasonable to me). I would really appreciate it when someone from the ASP.NET team (Mike?) could respond to this. &lt;/p&gt;
&lt;p&gt;Maybe I tried to solve this the wrong way, maybe there is a perfectly good reason for the observed behavior. I would really like to know.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Teun&lt;br /&gt;&lt;a href="http://www.teuntostring.net/blog/"&gt;http://www.teuntostring.net/blog/&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: Disable Verbs</title><link>http://forums.asp.net/thread/1371370.aspx</link><pubDate>Tue, 15 Aug 2006 16:01:54 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1371370</guid><dc:creator>Zalihe</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1371370.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=145&amp;PostID=1371370</wfw:commentRss><description>Hey TeunD,&lt;br /&gt;&lt;br /&gt;Thanxz for all your help.&amp;nbsp; ive come to the conclusion that i dont like sweb parts. :(&lt;br /&gt;&lt;br /&gt;havent really got time to customize my own classes.&amp;nbsp; so instead i have assigned the editable verb to all the web parts and they all are able to update the title of the web part in the menu section.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;isnt wonderful, but is ok as a user can now call it my forums rather han forums.&lt;br /&gt;&lt;br /&gt;Zal&lt;br /&gt;&lt;br /&gt;if anyone reading this does manage to come up wityh some sort of soultion please post it, as im pretty sure that i am not the only person in the world who wishes to do this.&lt;br /&gt;&lt;br /&gt;"A man who asks a question is a fool for five minutes a man who never asks a question is a fool forever" - Chinese Proverb.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: Disable Verbs</title><link>http://forums.asp.net/thread/1370958.aspx</link><pubDate>Tue, 15 Aug 2006 07:22:26 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1370958</guid><dc:creator>TeunD</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1370958.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=145&amp;PostID=1370958</wfw:commentRss><description>&lt;p&gt;Zal,&lt;/p&gt;
&lt;p&gt;My apologies; thisturns out to be a lot harder than I initially thought. &lt;/p&gt;
&lt;p&gt;Setting the AllowEdit property of your part to False will prevent your part from being edited. You can just set the AllowEdit="False" property on your user control (VS.NET will put squigglies under it, but never mind). When you try to edit this part, the Edit zone will show, but will have no ToolParts loaded.&lt;/p&gt;
&lt;p&gt;This is not what you want: you want the verb to disappear. This turns out to be hard. Adding custom verbs to a part is easy, but removing them is not. The snippet below gives you an example of how to create acustom zone with acustom WebPartChrome that will make your verbs disabled where Editing is not allowed. Setting Visible to false will turn of the verb for other web parts in the same zone as well (or rather: all parts after the one with AllowEdit=false).&lt;/p&gt;
&lt;p&gt; &lt;pre&gt;    public class HideEditZone : WebPartZone
    {
        public HideEditZone()
        {

        }
        protected override WebPartChrome CreateWebPartChrome()
        {
            return new MyChrome(this, this.WebPartManager);
        }

    }
    public class MyChrome : WebPartChrome
    {
        public MyChrome(WebPartZoneBase zone, WebPartManager mgr)
            :
            base(zone, mgr)
        { }

        protected override WebPartVerbCollection FilterWebPartVerbs(WebPartVerbCollection verbs, WebPart webPart)
        {
            WebPartVerbCollection defaultResult = base.FilterWebPartVerbs(verbs, webPart);
            foreach (WebPartVerb verb in defaultResult)
            {
                if (verb == this.Zone.EditVerb)
                {
                    verb.Enabled = webPart.AllowEdit;
                }
            }
            return defaultResult;
        }
    }

&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;&lt;/p&gt;</description></item><item><title>Re: Disable Verbs</title><link>http://forums.asp.net/thread/1370207.aspx</link><pubDate>Mon, 14 Aug 2006 15:05:16 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1370207</guid><dc:creator>Zalihe</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1370207.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=145&amp;PostID=1370207</wfw:commentRss><description>&lt;strong&gt;TeunD,&lt;br /&gt;Thanxz for your advise, i opted for option 1, but im stil stuck maybe you can further help me or maybe someone else out there can shed some light.&lt;br /&gt;&lt;br /&gt;I have disabled the edit-enable attribute from the webpart.&lt;br /&gt;i then went into my user control for foerumns and further added a readonly property called verbs as the webpartverbscollection and created a new verb and on the address of directed to a protected sub called EditClicks.&amp;nbsp; the problem now that i dont know exactly what to write in this sub.&lt;br /&gt;&lt;br /&gt;ive tried declareing an instance of the currentwebpartmanager and also declaring a varible set ot the editdisplaymode, but it doestn like the editMode.IsEnabled = true or my me.allowEdit = true&lt;br /&gt;&lt;br /&gt;HELP!!!!!!!!&lt;br /&gt;&lt;br /&gt;Zal&lt;br /&gt;&lt;br /&gt;I am trying very hard but these wb parts are not my thing, and the silly thing is i dsuggested them. :)&lt;br /&gt;&lt;/strong&gt;</description></item><item><title>Re: Disable Verbs</title><link>http://forums.asp.net/thread/1369991.aspx</link><pubDate>Mon, 14 Aug 2006 11:20:59 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1369991</guid><dc:creator>TeunD</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1369991.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=145&amp;PostID=1369991</wfw:commentRss><description>&lt;p&gt;This is typically one of those things that you can modify in a web server control that derives from System.Web.UI.WebParts.WebPart, but not from a UserControl.&lt;/p&gt;
&lt;p&gt;However, there are some possible workarounds:&lt;/p&gt;
&lt;p&gt;1. Implement the IWebActionable interface on the user controls code behind, return &lt;a title=System.Web.UI.WebControls.WebParts.WebPartVerbCollection href="http://www.aisto.com/roeder/dotnet/Default.aspx?Object=6"&gt;&lt;font color=#006018&gt;WebPartVerbCollection&lt;/font&gt;&lt;/a&gt;.&lt;a title="WebPartVerbCollection System.Web.UI.WebControls.WebParts.WebPartVerbCollection.Empty;" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Object=7"&gt;&lt;font color=#006018&gt;Empty&lt;/font&gt;&lt;/a&gt;&amp;nbsp;from it, but keep a reference. At PreRender, Disable the Edit Verb in the collection (which will be added by the Zone)&lt;/p&gt;
&lt;p&gt;2. Make a custom Zone, that recognizes your control and sets AllowEdit to false on the GenericWebPart wrapper&lt;/p&gt;
&lt;p&gt;3. Create a derived version of GenericWebPart that knows your control and create a custom webPartManager that reurns your wrapper instead of GenericWebPart from CreateWebPart()... nope, don't go there&lt;/p&gt;
&lt;p&gt;Advice: go for option 1.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Disable Verbs</title><link>http://forums.asp.net/thread/1368444.aspx</link><pubDate>Fri, 11 Aug 2006 15:31:31 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1368444</guid><dc:creator>Zalihe</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1368444.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=145&amp;PostID=1368444</wfw:commentRss><description>&amp;nbsp;&amp;nbsp;&amp;nbsp; Hi,&lt;br /&gt;&lt;br /&gt;im very desperate here, my hair is comingo uti n chunks&lt;br /&gt;&lt;br /&gt;ive looked everyehere, and on these forums are as well but its not making sense,&amp;nbsp; im very dippy.&lt;br /&gt;&lt;br /&gt;any way the problem:&lt;br /&gt;&lt;br /&gt;I have a aspx page where the outline of my webpartmanger control sits.&lt;br /&gt;&lt;br /&gt;also on the paghe i have one webpartzone as well as an editor zone&lt;br /&gt;&lt;br /&gt;within this one webpartzone, i have a zone template and within this tempalte i have two usercontrols.&lt;br /&gt;one usercontrol is my webpart called useful links, and the other usercontrol is called my forums.&amp;nbsp; &lt;br /&gt;on my forums user control i have three panels doc formuns, ad forums and latestest posts formuns,&amp;nbsp; in my editor i have three checkboxes which when ticked can personal the page according to user.&lt;br /&gt;&lt;br /&gt;the problem is i do not want the Edit verb to appear on the useful links web part but it is.&amp;nbsp; How do i disable this?&lt;br /&gt;Maybe some of my code can make things clearer!&lt;br /&gt;&lt;br /&gt;&amp;lt;!--DEFAULT.aspx--&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:WebPartZone ID="WPRightPanel" runat="server" HeaderText="Your Sections" EmptyZoneText="" EditVerb-Visible="true" CloseVerb-Text="X" MinimizeVerb-Text="Min" RestoreVerb-Text="Max" Padding="2" &amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;MenuLabelStyle ForeColor="White" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;PartChromeStyle Font-Names="Verdana" ForeColor="White" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;MenuLabelHoverStyle ForeColor="#E2DED6" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;EmptyZoneTextStyle Font-Size="0.8em" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;MenuVerbHoverStyle BackColor="#F7F6F3" BorderColor="#CCCCCC" BorderStyle="Solid"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;BorderWidth="1px" ForeColor="#333333" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;HeaderStyle Font-Size="0.7em" ForeColor="#CCCCCC" HorizontalAlign="Center" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;MenuVerbStyle BorderColor="#5D7B9D" BorderStyle="Solid" BorderWidth="1px" ForeColor="White" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;PartStyle Font-Size="0.8em" ForeColor="#333333" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;TitleBarVerbStyle Font-Size="0.6em" Font-Underline="False" ForeColor="Black" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;MenuPopupStyle BackColor="#5D7B9D" BorderColor="#CCCCCC" BorderWidth="1px" Font-Names="Verdana"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;Font-Size="0.6em" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;PartTitleStyle BackColor="Gray" Font-Bold="True" Font-Size="0.8em" ForeColor="Black" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ZoneTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ucUsefulLinks:UsefulLinks ID="UsefulLinks1" runat="server" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ucForums:Forums ID="Forumns1" runat="server" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ZoneTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/asp:WebPartZone&amp;gt;&lt;br /&gt;&amp;lt;!--USefullinks.ascx--&amp;gt;&lt;br /&gt;&amp;lt;!--I tried the code in the prerender to see if it worked but nothing--&amp;gt;&lt;br /&gt;Imports System&lt;br /&gt;Imports System.Data&lt;br /&gt;Imports System.Configuration&lt;br /&gt;Imports System.Collections&lt;br /&gt;Imports System.Web&lt;br /&gt;Imports System.Web.Security&lt;br /&gt;Imports System.Web.UI&lt;br /&gt;Imports System.Web.UI.WebControls&lt;br /&gt;Imports System.Web.UI.WebControls.WebParts&lt;br /&gt;Imports System.Web.UI.HtmlControls&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Partial Class usefulLinks1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Inherits System.Web.UI.UserControl&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Implements System.Web.UI.WebControls.WebParts.IWebPart&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private _catalogImageUrl As String = String.Empty&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private _description As String = String.Empty&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private _subTitle As String = "[0]"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private _title As String = "Useful Links"&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Property CatalogIconImageUrl() As String Implements IWebPart.CatalogIconImageUrl&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Property Description() As String Implements IWebPart.Description&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public ReadOnly Property Subtitle() As String Implements IWebPart.Subtitle&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Property Title() As String Implements IWebPart.Title&lt;br /&gt;---&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Property TitleIconImageUrl() As String Implements IWebPart.TitleIconImageUrl&lt;br /&gt;---&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Property TitleUrl() As String Implements IWebPart.TitleUrl&lt;br /&gt;---&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Protected Overrides Sub OnPreRender(ByVal e As EventArgs)&lt;br /&gt;---&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Dim a As New System.Web.UI.WebControls.WebParts.WebPartZone&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; a.EditVerb.Visible = False&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; a.EditVerb.Enabled = False&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; a.EditVerb.Text = ""&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&amp;nbsp;&amp;nbsp;&amp;nbsp; 'OnPreRender&lt;br /&gt;End Class&lt;br /&gt;&amp;lt;!--Forumns.ascx--&amp;gt;&lt;br /&gt;Imports System&lt;br /&gt;Imports System.Data&lt;br /&gt;Imports System.Configuration&lt;br /&gt;Imports System.Collections&lt;br /&gt;Imports System.Web&lt;br /&gt;Imports System.Web.Security&lt;br /&gt;Imports System.Web.UI&lt;br /&gt;Imports System.Web.UI.WebControls&lt;br /&gt;Imports System.Web.UI.WebControls.WebParts&lt;br /&gt;Imports System.Web.UI.HtmlControls&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Partial Class forums1&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Inherits System.Web.UI.UserControl&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Implements System.Web.UI.WebControls.WebParts.IWebPart&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Protected _Forums As Boolean = True&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Protected _Posts As Boolean = True&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Protected _Ads As Boolean = True&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private _catalogImageUrl As String = String.Empty&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private _description As String = String.Empty&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private _subTitle As String = "[0]"&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Private _title As String = "Forums"&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Personalizable(PersonalizationScope.User), _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WebBrowsable(), _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WebDisplayName("Show Most Active Forums"), _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WebDescription("Use this property to show/hide Most Active Forums")&amp;gt; _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Property Forumns() As Boolean&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Personalizable(PersonalizationScope.User), _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;WebBrowsable(), _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;WebDisplayName("Show Latest Posts"), _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;WebDescription("Use this property to show/hide Latest Posts")&amp;gt; _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Property Posts() As Boolean&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Personalizable(PersonalizationScope.User), _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;WebBrowsable(), _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;WebDisplayName("Show Personal Ad's"), _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;WebDescription("Use this property to show/hide Personal Ad's")&amp;gt; _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Property Ads() As Boolean&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Property CatalogIconImageUrl() As String Implements IWebPart.CatalogIconImageUrl&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Property Description() As String Implements IWebPart.Description&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public ReadOnly Property Subtitle() As String Implements IWebPart.Subtitle&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Property Title() As String Implements IWebPart.Title&lt;br /&gt;&amp;nbsp;---&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Property TitleIconImageUrl() As String Implements IWebPart.TitleIconImageUrl&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Property TitleUrl() As String Implements IWebPart.TitleUrl&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Protected Overrides Sub OnPreRender(ByVal e As EventArgs)&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; If Forumns = True Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; pnlActiveForum.visible = True&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; pnlActiveForum.visible = False&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; If Posts = True Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; pnlPost.visible = True&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; pnlPost.visible = False&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; If Ads = True Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; pnlAd.visible = True&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; pnlAd.visible = False&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&amp;nbsp;&amp;nbsp;&amp;nbsp; 'OnPreRender&lt;br /&gt;End Class&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I do hope soemone can help me soon.&lt;br /&gt;&lt;br /&gt;Many thanxz in advance.&lt;br /&gt;&lt;br /&gt;Zal&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description></item></channel></rss>