• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 559
  • Last Modified:

asp.net ajax update panel

I tried to put ajax update panel after the script manager and it failed me.
Can you tell exactly where I should put the Update Panel?

Thanks
<%@ Page Title="Step 1" Language="C#"  MasterPageFile="~/MasterPages/PrivateMasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Secure_Quote_Commercial_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register TagPrefix="obout" Namespace="Obout.ComboBox" Assembly="obout_ComboBox" %>
<%@ Register src="../../../UserControls/Principals.ascx" tagname="Principals" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"></asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<table   cellpadding="0" cellspacing="0"> 
<tr valign="top"><td> 
   
<cc1:Accordion  
            runat="server"    
            ID="Accordion1"   
            HeaderCSSClass="AjaxCommQuoteHeaderCSS"               
            HeaderSelectedCssClass="AjaxCommQuoteHeaderSelectedCSS"              
            ContentCssClass="AjaxCommQuoteContentCss" 
            Width="700" 
            TransitionDuration="250"
            FramesPerSecond="200"
            AutoSize="Fill" 
>
     <Panes>
     <cc1:AccordionPane runat="server" ID="step1">
                        <Header>Step 1 - State / Bond / Cover Amount</Header>
                        <Content>
                        <table> 
                        <tr>
                        <td>Select State:</td> 
                        <td><obout:ComboBox runat="server" ID="DdlState" Width="275" Height="250"
                             DataSourceID="sds1" DataTextField="StateName" DataValueField="StateId"
                             EmptyText="" AutoPostBack="true"
                             OnSelectedIndexChanged="DdlState_OnSelectedIndexChanged"
                               />
                        </td>
                        </tr>
                        <tr><td>Select bond:</td>
                        <td>
                        <obout:ComboBox runat="server" ID="DdlProductId" Width="275" Enabled="false"
                            DataSourceID="sds2" DataTextField="SaaSubCodeDescription" DataValueField="OnlineProductId"
                            EmptyText="" AutoPostBack="true"
                            OnSelectedIndexChanged="DdlProductId_OnSelectedIndexChanged" />
                        </td></tr>
                        <tr><td>
                            <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                            <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
                        </td></tr>
                        </table>
                        </Content>
                    </cc1:AccordionPane>
                    <cc1:AccordionPane runat="server" ID="Step2">
                        <Header>Step 2 - Principal / Indemnitor</Header>
                        <Content>
                         <uc1:Principals ID="Principals1" runat="server" />
                        </Content>
                    </cc1:AccordionPane>
                    <cc1:AccordionPane runat="server" ID="Step3">
                        <Header>Step 3 - Additional Information</Header>
                        <Content>
                            <asp:PlaceHolder ID="PHadditionalInformation" runat="server"></asp:PlaceHolder>
                        </Content>
                    </cc1:AccordionPane>
                    <cc1:AccordionPane runat="server" ID="Step4">
                        <Header>Step 4 - Preview</Header>
                        <Content>
                        Show All Information
                        </Content>
                    </cc1:AccordionPane>
     </Panes>
     </cc1:Accordion>
    
     </td>
     <td class="AjaxCommQuoteSideNoteCSS">Note</td>
     </tr>
     </table>
    <asp:SqlDataSource ID="sds1" runat="server" 
        SelectCommand="SELECT * FROM States ORDER BY StateName asc"
		ConnectionString="<%$ ConnectionStrings:SuretyConnectionString %>">
     </asp:SqlDataSource>
    <asp:SqlDataSource ID="sds2" runat="server" 
    SelectCommand="SELECT dbo.BondTypes.BondTypeId, dbo.BondTypes.SaaSubCodeDescription,OnlineProducts.OnlineProductId
                   FROM dbo.OnlineProducts INNER JOIN
                   dbo.States ON dbo.OnlineProducts.StateId = dbo.States.StateId INNER JOIN
                   dbo.BondTypes ON dbo.OnlineProducts.BondTypeId = dbo.BondTypes.BondTypeId
                   WHERE     (dbo.States.StateId = @StateId) AND (dbo.OnlineProducts.StatusId = 1)
                   ORDER BY dbo.BondTypes.SaaSubCodeDescription"
		ConnectionString="<%$ ConnectionStrings:SuretyConnectionString %>">
	    <SelectParameters>
	        <asp:Parameter Name="StateId" Type="Int16" />
	    </SelectParameters>	    
    </asp:SqlDataSource>

 </asp:Content>

Open in new window

0
Webboy2008
Asked:
Webboy2008
1 Solution
 
informaniacCommented:
what's the error that u r getting?
0
 
mr_nadgerCommented:
what are you trying to enclose in the update panel? is it the accordion panel itself?
I've copied a panel in one of my projects below for reference - everything you're updating needs to be between the ContentTemplate tags.


<asp:UpdatePanel ID="upPanDescription" runat="server">
                    <ContentTemplate>
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:CPFConnectionString %>" 
                            SelectCommand="SELECT [Details] FROM [Directorates] WHERE ([intid] = @intid)">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="lblWAID" DefaultValue="0" Name="intid" PropertyName="Text" Type="Int32" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                        <asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1">
                            <ItemTemplate>
                                <asp:Label ID="DetailsLabel" runat="server" Text='<%# Bind("Details") %>' />
                            </ItemTemplate>
                        </asp:FormView>
                        <asp:Label ID="lblWAID" runat="server" Text="0" Visible="False"></asp:Label>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="LinkButton1" EventName="Click" />
                    </Triggers>
                </asp:UpdatePanel>

Open in new window

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now