Solved ajax update panel

Posted on 2011-04-26
Last Modified: 2012-05-11
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?

<%@ 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:AccordionPane runat="server" ID="step1">
                        <Header>Step 1 - State / Bond / Cover Amount</Header>
                        <td>Select State:</td> 
                        <td><obout:ComboBox runat="server" ID="DdlState" Width="275" Height="250"
                             DataSourceID="sds1" DataTextField="StateName" DataValueField="StateId"
                             EmptyText="" AutoPostBack="true"
                        <tr><td>Select bond:</td>
                        <obout:ComboBox runat="server" ID="DdlProductId" Width="275" Enabled="false"
                            DataSourceID="sds2" DataTextField="SaaSubCodeDescription" DataValueField="OnlineProductId"
                            EmptyText="" AutoPostBack="true"
                            OnSelectedIndexChanged="DdlProductId_OnSelectedIndexChanged" />
                            <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                            <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
                    <cc1:AccordionPane runat="server" ID="Step2">
                        <Header>Step 2 - Principal / Indemnitor</Header>
                         <uc1:Principals ID="Principals1" runat="server" />
                    <cc1:AccordionPane runat="server" ID="Step3">
                        <Header>Step 3 - Additional Information</Header>
                            <asp:PlaceHolder ID="PHadditionalInformation" runat="server"></asp:PlaceHolder>
                    <cc1:AccordionPane runat="server" ID="Step4">
                        <Header>Step 4 - Preview</Header>
                        Show All Information
     <td class="AjaxCommQuoteSideNoteCSS">Note</td>
    <asp:SqlDataSource ID="sds1" runat="server" 
        SelectCommand="SELECT * FROM States ORDER BY StateName asc"
		ConnectionString="<%$ ConnectionStrings:SuretyConnectionString %>">
    <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 %>">
	        <asp:Parameter Name="StateId" Type="Int16" />


Open in new window

Question by:Webboy2008
    LVL 20

    Expert Comment

    what's the error that u r getting?
    LVL 7

    Accepted Solution

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

    Open in new window

    LVL 6

    Expert Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Suggested Solutions

    jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
    Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now