ToolBox WepParts Control BehaviourEditorPart

BehaviourEditorPart Web Server Control

in ASP.NET environment,This article describes you how to work with BehaviourEditorPart Web Control.The mechanism of BehaviorEditorPart control is that provides an editor control that allows the end users to edit properties.and that affect the behavior of an associated WebPart or GenericWebPart control.

The following Properties of webpart control can be customized using BehaviourEditorPart control

  • HelpUrl -Specify the Help Link.
  • TitleIconImageUrl -Setting the Title Icon Image link.
  • Description -Specify the description text of the Web Part.
  • CatalogIconImageUrl -Setting the Catalog Icon Image link.
  • HelpMode -Specify the Help Mode.
  • ExportMode -Select the Export Mode.
  • AuthorizationFilter -Set the Authorization Filter.
  • AllowClose -Specify whether a Web part can be removed from the page.
  • AllowHide -Specify whether a Web part can be hidden.
  • AllowMinimize -Specify whether a Web part can be minimized.
  • TitleUrl -Specify the Title Link.

At the Following situations,The BehaviorEditorPart control is displayed on the page

  • When provided an authorized user permission to edit Web pages in shared personalization scope, which means that the user's changes are visible to all other users.
  • Along the run time,change the page from user-level to shared-level personalization programmatically .

At the Following situations,The BehaviorEditorPart control is not displayed on the page

  • When the IsShared property is set to true.
  • The page is in user personalization scope

the following code snippets demonstrates how to work with the BehaviorEditorPart Control

in .aspx.cs page,

protected void Page_Load(object sender, EventArgs e)
  {
    btn1.Visible = false;
    txt1.Visible = false;
    BulletedList1.DataBind();
  }

  protected void btn1_Click(object sender, EventArgs e)
  {
    BehaviorEditorPart1.Title = Server.HtmlEncode(txt1.Text);
  }

  protected void BehaviorEditorPart1_PreRender(object sender, 
    EventArgs e)
  {
    btn1.Visible = true;
    txt1.Visible = true;
  }

        

in .aspx page,

        
<%@ Register Src="~/displayModeMenuVB.ascx" 
  TagPrefix="uc1" 
  TagName="DisplayModeMenuVB" %>
                                        
<html  >
<head id="Head1" runat="server">
</head>
<body>
  <form id="form2" runat="server">
    <asp:SqlDataSource ID="ds1" runat="server" 
      connectionString="<%$ ConnectionStrings:conn %>" 
      SelectCommand="Select * From Table1"/>
    <asp:WebPartManager ID="wp1" runat="server" />
    <uc1:DisplayModeMenuCS id="menu1" runat="server" />
    <asp:WebPartZone ID="wz1" runat="server" Width="150" 
      style="z-index: 100; left: 10px; position: absolute; top: 90px" >
      <ZoneTemplate>
        <asp:Panel ID="panel1" runat="server" Title="Author List WebPart">
          <asp:Label ID="Label1" runat="server" 
            Text="Author Names" 
            Font-Bold="true" 
            Font-Size="120%"/>
          <asp:BulletedList ID="BulletedList1" runat="server" 
            DataSourceID="ds1" 
            DataTextField="au_lname" 
            DataValueField="au_id"/>
        </asp:Panel>
      </ZoneTemplate>
    </asp:WebPartZone>
    <asp:WebPartZone ID="WebPartZone2" runat="server" Width="150" 
      style="z-index: 101; left: 170px; position: absolute; top: 90px" />
    <asp:EditorZone ID="EditorZone1" runat="server" 
      style="z-index: 102; left: 340px; position: absolute; top: 90px" 
      Width="170px">
      <ZoneTemplate>
        <asp:BehaviorEditorPart ID="BehaviorEditorPart1" runat="server" 
          Title="My BehaviorEditorPart"  
          OnPreRender="BehaviorEditorPart1_PreRender" />
      </ZoneTemplate>
    </asp:EditorZone>
    <asp:Button ID="btn1" runat="server" Width="140" 
      Text="Update EditorPart Title" 
      style="left: 340px; position: absolute; top: 65px; z-index: 103;" 
      OnClick="btn1_Click" />
    <asp:TextBox ID="txt1" runat="server" 
      style="z-index: 105; left: 500px; position: absolute; top: 65px" />
  </form>
</body>
</html>        
 
Related Links

Posted by: Admin
Posted on: 9/17/2009 at 4:54 PM
Tags: , ,
Categories: Asp.net
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (11) | Post RSSRSS comment feed

Comments

Rapidshare United States

Friday, April 30, 2010 6:47 PM

Rapidshare

I\'m happy I found this blog, I couldnt discover any info on this subject matter prior to. I also run a site and if you want to ever serious in a little bit of guest writing for me if possible feel free to let me know, i\'m always look for people to check out my site. Please stop by and leave a comment sometime!

glassware Maldives

Wednesday, May 19, 2010 9:41 AM

glassware

AW,this was a really quality post.I am very happy to see your article.

Svitlana.Net.Ua United States

Wednesday, June 16, 2010 4:14 PM

Svitlana.Net.Ua

I would like to thank you for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now.

няня United States

Saturday, June 19, 2010 11:06 AM

няня

I would like to thank you for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now.
http://svitlana.net.ua/staff/category/3/ гувернантка, http://svitlana.net.ua/staff/category/5/ повар, http://svitlana.net.ua/staff/category/6/ садовник, http://svitlana.net.ua/staff/category/10/ репетитор, http://svitlana.net.ua/staff/category/4 домработница, http://svitlana.net.ua/staff/category/8/ семейная пара, http://svitlana.net.ua/pages/2/ работа няней.

Покер United States

Thursday, June 24, 2010 10:10 PM

Покер

It\'s an intriguing approach. I ordinarily stumble upon ordinary thoughts on the theme but yours it\'s written in a pretty special way. Sure enough, I will revisit your website for additional information.

Элитные проститутки United States

Sunday, July 04, 2010 12:14 AM

Элитные проститутки

Наверное, это из-за климата у девочек просыпается такое дикое желание и появляется страсть в глазах. Стоит отметить, что ночные бабочки очень сильно уважают своих клиентов, и никогда не пререкаются с ними, хотя, конечно, южный темперамент иногда дает знать о себе, и не дай вам Бог разозлить одну из них, тогда вы увидите, какой гнев обрушиться на вас. Лучше этого не допускать, и не портить себе настроение и нервы, а просто хорошо провести время с одной из представительниц самой древней профессии.

Магазин сантехники United States

Sunday, July 04, 2010 1:01 AM

Магазин сантехники

Can you please provide more information on this subject? BTW your blog is great. Cheers.

treatment of cellulite United States

Monday, July 05, 2010 1:31 PM

treatment of cellulite

- Have you tried the brutal  weights and machines  approach in the health club - only to get disappointed following so significantly sweaty effortIJ If so  don t be concerned    See  you re not a bodybuilder or  fitness competitor  - you easily would like to remove your fat    so your solution isn t  inside health club  - it s in a very c

Проститутки Москвы United States

Tuesday, July 06, 2010 10:35 PM

Проститутки Москвы

You have some honest ideas here. I done a research on the issue and discovered most peoples will agree with your blog.

Новинки сантехники United States

Saturday, July 10, 2010 10:25 PM

Новинки сантехники

It\\\'s an intriguing approach. I commonly see minimalist judgments on the matter but yours it\'s written in a pretty special way. For sure, I will revisit your site for more info.

Проститутки United States

Sunday, July 11, 2010 10:11 PM

Проститутки

You gave nice ideas here. I done a research on the issue and learnt most peoples will agree with your blog. Certainly, these practices are unfair; but they say that most of their rules are only to apply to people who overdraw.

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading