Combo box selection

1 posts, 0 answers
  1. Deepak
    Deepak avatar
    9 posts
    Member since:
    Aug 2010

    Posted 06 Jan 2011 Link to this post

    Hi ,
    here i am post my aspx page. In which i have 3 combo box list when user select the country dropdown then rad captcha image refresh plz help me out for finding the solution so that image does not refresh after select the combo box.
    <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="ddlCountry">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="ddlCountry" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="ddlState">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="ddlState" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="ddlCity">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="ddlCity" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
             
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="5">
            <table style="width: 100%; height: 100%;">
                <tr style="height: 100%">
                    <td align="center" valign="middle" style="width: 100%">
                        <asp:Image ID="Image2" ImageUrl="~/Images/loading6.gif" BorderWidth="0px" Height="32px"
                            Width="32px" AlternateText="Processing Data ...." runat="server"></asp:Image></td>
                </tr>
            </table>
        </telerik:RadAjaxLoadingPanel>
        <div class="fromContainer">
            <h1>
                <asp:Label runat="server" ID="lblHeader" Text="Why I love Kiwanis" />
            </h1>
            <img src="Images/btnAdd.jpg" class="btnAdd" id="Add" />
            <div style="clear: both;">
            </div>
            <div id="panleText" class="tabPanel">
                <h2>
                    Add your story and photo here!
                </h2>
            </div>
            <div id="panelMain">
                <asp:UpdatePanel runat="server" ID="UP">
                    <ContentTemplate>
                        <div class="bottomBgBox">
                            <table cellpadding="0" cellspacing="0">
                                <tr>
                                    <td>
                                        <table class="tblBasicForm">
                                            <tr>
                                                <td>
                                                    First Name
                                                </td>
                                                <td>
                                                    <asp:TextBox runat="server" ID="txtFirstName" CssClass="input" />
                                                </td>
                                                <td>
                                                    <asp:RequiredFieldValidator ID="rfvFirstName" runat="server" ControlToValidate="txtFirstName"
                                                        ErrorMessage="*" ValidationGroup="Submit" ForeColor="Red"></asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Last Name
                                                </td>
                                                <td>
                                                    <asp:TextBox runat="server" ID="txtLastName" CssClass="input" />
                                                </td>
                                                <td>
                                                    <asp:RequiredFieldValidator ID="rfvLastName" runat="server" ControlToValidate="txtLastName"
                                                        ErrorMessage="*" ValidationGroup="Submit" ForeColor="Red"></asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Club Name
                                                </td>
                                                <td>
                                                    <asp:TextBox runat="server" ID="txtClub" CssClass="input" />
                                                </td>
                                                <td>
                                                    <asp:RequiredFieldValidator ID="rfvClub" runat="server" ControlToValidate="txtClub"
                                                        ErrorMessage="*" ValidationGroup="Submit" ForeColor="Red"></asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                    <td>
                                        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px">
                                         
                                         
                                                <table class="tblOptionalForm">
                                                    <tr>
                                                        <td>
                                                            Country
                                                        </td>
                                                        <td>
                                                            <telerik:RadComboBox ID="ddlCountry" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlCountry_OnSelectedIndexChanged">
                                                            </telerik:RadComboBox>
                                                            <asp:RequiredFieldValidator ID="rfvDdlCountry" runat="server" ControlToValidate="ddlCountry"
                                                                Display="Dynamic" ErrorMessage="*" ValidationGroup="Submit" InitialValue="0"></asp:RequiredFieldValidator>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            State
                                                        </td>
                                                        <td>
                                                            <telerik:RadComboBox ID="ddlState" runat="server" AutoPostBack="true" CssClass="input" OnSelectedIndexChanged="ddlState_OnSelectedIndexChanged">
                                                            </telerik:RadComboBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            City
                                                        </td>
                                                        <td>
                                                            <telerik:RadComboBox ID="ddlCity" runat="server" CssClass="input">
                                                            </telerik:RadComboBox>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </telerik:RadAjaxPanel>
                                         
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div class="discriptionBox">
                            Discription
                            <br />
                            <asp:TextBox CssClass="input" runat="server" ID="txtDiscription" TextMode="MultiLine" />
                            <asp:RequiredFieldValidator ID="rfvDescription" ControlToValidate="txtDiscription"
                                ErrorMessage="Required field can not be empty" ForeColor="Red" runat="server"
                                ValidationGroup="Submit"></asp:RequiredFieldValidator>
                                 
                                <br />
                            
                            Photo Upload
                            <br /><br />
                            <telerik:RadAjaxPanel runat="server" RestoreOriginalRenderDelegate="false" >
                                <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" ControlObjectsVisibility="None"
                                    TargetFolder="~/Record/">
                                </telerik:RadAsyncUpload>
                            </telerik:RadAjaxPanel>
                            <br />
                            
                                 <div class="captchaText">                       
                                Enter the capcha text here
                                <asp:TextBox ID="CaptchaInput" CssClass="captchaBox" runat="server" MaxLength="5" Font-Size="13px" />                           
                                <asp:RequiredFieldValidator ID="ddd" runat="server" ControlToValidate="CaptchaInput"
                                ValidationGroup="Submit" ErrorMessage="*" ForeColor="Red"></asp:RequiredFieldValidator>
                                     <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" Height="200px" Width="300px">
                                     
                            </div>
                             <telerik:RadCaptcha ID="RadCaptcha2" runat="server" CaptchaImage-RenderImageOnly="true" CssClass="captcha"
                                CaptchaImage-BackgroundColor="#efefef" ErrorMessage="The code you entered is not valid"
                                Display="Dynamic" CaptchaTextBoxCssClass="captchaBox" ImageStorageLocation="Cache"
                                EnableViewState="true" ValidatedTextBoxID="CaptchaInput" ValidationGroup="Submit">
                            </telerik:RadCaptcha>
                             </telerik:RadAjaxPanel>
                            <asp:ImageButton runat="server" ID="btnUpload" CssClass="btnAdd" ImageUrl="~/Images/btnUpload.jpg"
                                OnClick="btnUpload_OnClick" ValidationGroup="Submit" />
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
            <script language="javascript" type="text/javascript">
                $(function () {
     
                    $(".btnAdd").click(function () {
                        var tab = document.getElementById('panleText')
                        if (tab.style.display == "" || tab.style.display == "block") {
                            $(".tabPanel").slideUp();
                            $("#panelMain").slideDown();
                        }
                        else {
                            $(".tabPanel").slideDown();
                            $("#panelMain").slideUp();
                        }
                    });
     
     
     
     
     
                })
            </script>
            </>
            
            <asp:UpdatePanel runat="server" ID="UP1">
                <ContentTemplate>
                    <div id="mapContainer">
                        <h1>
                            Map
                        </h1>
                        <br />
                         <asp:UpdateProgress runat="server" ID="PageUpdateProgress" AssociatedUpdatePanelID="UP1">
                             <ProgressTemplate>
                                <div class="progressBar">
                                <img id="imgUP1" runat="server" src="~/Images/update.gif" />
                                <span>Loading ...</span>
                                </div>
                             </ProgressTemplate>
                        </asp:UpdateProgress>
                        <div>
                            <div class="gMap">
                                <cc1:GMap ID="GMap1" runat="server" Width="540" Height="400" serverEventsType="AspNetPostBack"
                                    OnMarkerClick="Gmap1_OnMarkerClick" enableServerEvents="true" OnClick="Gmap1_OnClick"
                                    OnZoomEnd="Gmap1_OnZoomEnd" />
                            </div>
                            <div class="regionListContainer">
                                <h3>
                                    <asp:Label runat="server" ID="lblRegionListHeader" Text="Continent Regions" />
                                </h3>
                                <asp:ListBox runat="server" ID="listRegion" CssClass="regionList" OnSelectedIndexChanged="listRegion_OnSelectedIndexChanged"
                                    AutoPostBack="true" />
                                <div class="listContainerBottom">
                                    <img src="Images/DownArrow.jpg" />more
                                </div>
                            </div>
                        </div>
                    </div>
                    </div>
                    <div id="descriptionContainer">
                        <asp:FormView ID="fvTestimonial" runat="server" PagerSettings-NextPageImageUrl="~/Images/btnNext.jpg" OnPageIndexChanged="btnkNextBack_OnClick"
                            AllowPaging="true" OnPageIndexChanging="fvTestimonial_OnPageIndexChanging" PagerSettings-LastPageImageUrl="~/Images/btnBack.jpg"
                            PagerSettings-Mode="NextPrevious">
                            <PagerTemplate>
                            </PagerTemplate>
                            <ItemTemplate>
                                <h1>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("City.Name") %>' />
                                </h1>
                                <div class="hr">
                                    <div class="testiNavContainer">
                                        <asp:ImageButton runat="server" ID="ibtnPrevious" CommandName="Page" CommandArgument="Prev"
                                            ImageUrl="~/Images/btnBack.jpg" />
                                        <asp:ImageButton runat="server" ID="ibtnNext" CommandName="Page" CommandArgument="Next"
                                            ImageUrl="~/Images/btnNext.jpg" />
                                    </div>
                                </div>
                                <div class="discription">
                                     
                                        <asp:Image runat="server" ID="imgPhoto" Width="380" CssClass="discriptionImage" ImageUrl='<%# Bind("FileUrl") %>'
                                            Visible='<%# Eval("FileUrl")!= null %>' />
                                    <div style="float: left" class="discriptionText">
                                        <p>
                                            <asp:Label ID="lblDiscription" runat="server" Text='<%# Bind("Desciption") %>' />
                                        </p>
                                        <p>
                                            <asp:Label ID="lblFirstName" CssClass="highlight" runat="server" Text='<%# Bind("FirstName") %>' />
                                            <asp:Label ID="lblLastName" CssClass="highlight"  runat="server" Text='<%# Bind("LastName") %>' />,
                                            <br />
                                            <asp:Label ID="lblCity" runat="server" Text='<%# Bind("City.Name") %>' />,
                                            <asp:Label ID="lblCountry" runat="server" Text='<%# Bind("Country.Name") %>' />
                                        </p>
                                    </div>
                                </div>
                                <br />
                            </ItemTemplate>
                        </asp:FormView>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
    </asp:Content>
    Please help me I am just need to prevent rad captha image refershing after select the drop down list.
    Thanks
Back to Top