Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I have a user control with an update panel.This update panel holds country and state dropdown. on selection of country I have to fill state dropdown.
In my aspx page I have placed my Scripmanager but still it does a full postback when country dropdown is selected.

Here is my Master page design code:-

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs"
Inherits="NewOneColumnMaster" %>

<asp:ContentPlaceHolder ID="metaHolder" runat="server">


Here is my Aspx design code:-

XML
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="MyApplication.aspx.vb" Inherits="MyApplication" MasterPageFile="~/MasterPages/NewOneColumnMaster.master" Title="My Application"  MaintainScrollPositionOnPostback="true" EnableSessionState="True"  %>

<%@ Register src="~/UserControls/MyApplication1.ascx" tagname="Application" tagprefix="uc1" %>
 <%@ MasterType VirtualPath="~/MasterPages/NewOneColumnMaster.master" %>

 
<asp:Content ID="Content1" ContentPlaceHolderID="PrimaryColumn" runat="Server">
    <link href="../css/table.css" rel="stylesheet" type="text/css" />
    <form runat="server" id="form1">
    <asp:scriptmanager id="ScriptManager1" enablepagemethods="true" enablepartialrendering="true"
        runat="server" />
        <div id="pageDiv">             
           <uc1:Applicationid = "ucApplication"  runat="server" /> 
           
 </div>
    </form>
</asp:Content>


Here is User control desgin code:-

XML
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="MyApplication.ascx.vb" Inherits="MyApplication" Debug="true" %>

<div id="MyMainDiv">
 <asp:UpdatePanel ID="upEduInfo" runat="server">
        <ContentTemplate>
<table>
<tr>
            <td style= "height: 22px;">
               Country: 
           </td>
            <td colspan="5" style="padding-removed2px;">
                <asp:DropDownList ID="drpAltCountry" runat="server" width="300px" 
                    AutoPostBack="True"/>
            </td>
        </tr>   
<tr>
            <td style= "height: 22px;">
               State/Province:
           </td>
            <td colspan="5" style="padding-removed2px;">
                <asp:DropDownList ID="drpAltState" runat="server" width="300px"/>
            </td>
        </tr> 
</table>

</div>


Can anyone suggest ?? Thanks
Posted
Comments
Kornfeld Eliyahu Peter 21-Jul-14 8:36am    
Your master page code is not complete. There is a possibility that you have more than one (nested) forms in your final page?!

You didn't declared when UpdatePanel[^] should trigger a partial post back, so the AutoPostBack=true of the DDL will initiate full page post...
Use ChildrenAsTriggers[^] property of UpdatePanel, or use Triggers[^] declaration...
 
Share this answer
 
Comments
Phionix11 21-Jul-14 5:33am    
not working even using Triggers with Asynchronous tag in it.
Please remove update panel if it is not necessary.
 
Share this answer
 
Comments
Phionix11 21-Jul-14 5:34am    
If i dont use update panel it postback the whole page....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900