Title in Webpart with UpdatePanel

Last post 05-08-2007 5:07 PM by jlcbmtech. 1 replies.

Sort Posts:

  • Title in Webpart with UpdatePanel

    05-08-2007, 12:57 PM
    • Loading...
    • jlcbmtech
    • Joined on 03-12-2007, 4:28 PM
    • Posts 7

    Hi there,

     I have a Webpart with two update panels in it. Both creating a seperate web part. I have been looking around and haven't been able to find out how to set the title of the Webpart if an updatepanel is in the webpart. If I try to enter title in the updatepanel, I get build errors... Is it possible to set the title of the webpart with an updatepanel inside?

    Thanks in advance for any help you can offer. 

    Here is my current source:

    <

    asp:WebPartZone ID="WebPartZone1" runat="server" BorderColor="#CCCCCC" Font-Names="Verdana"

    Height="208px" Padding="6" Width="360px">

    <PartChromeStyle BackColor="#F7F6F3" BorderColor="#E2DED6" Font-Names="Verdana" ForeColor="White" />

    <MenuLabelHoverStyle ForeColor="#E2DED6" />

    <EmptyZoneTextStyle Font-Size="0.8em" />

    <MenuLabelStyle ForeColor="White" />

    <MenuVerbHoverStyle BackColor="#F7F6F3" BorderColor="#CCCCCC" BorderStyle="Solid"

    BorderWidth="1px" ForeColor="#333333" />

    <HeaderStyle Font-Size="0.7em" ForeColor="#CCCCCC" HorizontalAlign="Center" />

    <ZoneTemplate>

    <asp:UpdatePanel ID="upSearch" runat="server" UpdateMode="Conditional">

    <contenttemplate>

    <

    BR /><TABLE style="WIDTH: 288px"><TBODY><TR><TD style="HEIGHT: 21px"><asp:Label id="Label1" runat="server" Font-Size="Small" Font-Names="Tahoma" Text="Enter ML#:" Font-Bold="True"></asp:Label></TD><TD style="HEIGHT: 21px" colSpan=2><asp:TextBox id="txtBasicSearch" runat="server" Width="168px"></asp:TextBox></TD><TD style="HEIGHT: 21px">&nbsp;<asp:ImageButton id="imgbBasic" runat="server" CommandName="BasicSearch" OnCommand="OnCommand" ImageUrl="../images/btnGoClick.gif"></asp:ImageButton></TD><TD style="FONT-SIZE: x-small; FONT-FAMILY: Tahoma" rowSpan=3><asp:UpdateProgress id="UpdateProgress1" runat="server" DisplayAfter="100"><ProgressTemplate>

    <

    asp:Image id="ImageProg2" runat="server" ImageUrl="../images/progress.gif"></asp:Image>

    </

    ProgressTemplate>

    </

    asp:UpdateProgress></TD></TR><TR><TD><asp:Label id="Label2" runat="server" Font-Size="Small" Font-Names="Tahoma" Text="EnterAddress:" Font-Bold="True"></asp:Label></TD><TD style="FONT-SIZE: x-small; FONT-FAMILY: Tahoma"><asp:TextBox id="txtBasicSearchAddrNum" runat="server" Width="64px"></asp:TextBox></TD><TD style="FONT-SIZE: x-small; FONT-FAMILY: Tahoma">Street #</TD><TD style="FONT-SIZE: x-small; FONT-FAMILY: Tahoma"></TD></TR><TR><TD style="HEIGHT: 21px"></TD><TD style="HEIGHT: 21px"><asp:TextBox id="txtBasicSearchAddrName" runat="server" Width="136px"></asp:TextBox></TD><TD style="FONT-SIZE: x-small; FONT-FAMILY: Tahoma; HEIGHT: 21px">Street Name</TD><TD style="FONT-SIZE: x-small; FONT-FAMILY: Tahoma; HEIGHT: 21px">&nbsp;<asp:ImageButton id="imgbBasicAddr" runat="server" CommandName="BasicSearchAddr" OnCommand="OnCommand" ImageUrl="../images/btnGoClick.gif"></asp:ImageButton></TD></TR>

    </

    TBODY></TABLE>

    </

    contenttemplate>

    </asp:UpdatePanel>
  • Re: Title in Webpart with UpdatePanel

    05-08-2007, 5:07 PM
    Answer
    • Loading...
    • jlcbmtech
    • Joined on 03-12-2007, 4:28 PM
    • Posts 7

    Ok So I have answered my own question. For those of you seeking similar advice, my answer to this problem was to set the title of each web part with an updatepanel inside in the Page_Load code.

     This is done as follows:

     WebPartZone2.WebParts(0).Title = "My First Web Part Title"
     WebPartZone2.WebParts(1).Title = "My Second Web Part Title"

Page 1 of 1 (2 items)
Microsoft Communities
Page view counter