Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

Question On WebParts

$
0
0

Hi.  I'm trying to make a change to an existing web application.  I have a fair handle on C#, but my knowledge of jscript and asp is minimal, so please forgive the ignorance.  :)

I have a webpart that is a checkbox.  On the menu bar I see "minimize, close, edit and connect".

From my research so far, I guess these are called verbs?  Anyway, in a specific condition, I don't want the zoneeditor to show up for a specific field.  So I searched and found code where I added the if statement:

CurrentWebPart.AllowClose = false;
CurrentWebPart.AllowMinimize = false;

if (somecondition)
  CurrentWebPart.AllowEdit = false;

The way this was treated was an empty ZoneEditor.  What I want is to intercept the event and not show anything when the condition has been met.  Basically, when the "Edit" verb is clicked I want it to fall thru and act like it wasn't clicked on.  I figure if I find the event, I could put some code like "if (condition) then exit".  How do I locate the C# or jscript event that's triggered by clicking the edit verb? 


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>