?
Solved

I need assistance using the AJAX UpdatePanel and ContentTemplate controls in my ASP.Net app

Posted on 2010-08-19
2
Medium Priority
?
391 Views
Last Modified: 2013-12-17
Hi Experts,
I need assistance using the UpdatePanel and ContentTemplate controls in my ASP.Net application.  The screen still flickers when I tab out of the Text fields?  What am i doing wrong?  I have provided a sample of my code below:


<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode=Conditional>
<ContentTemplate>                                
<asp:DropDownList ID="ddlOrgPortCode" runat="server" Style="z-index: 100; left: 212px;
position: absolute; top: 135px" Width="270px" AutoPostBack="True" OnSelectedIndexChanged="ddlOrgPortCode_SelectedIndexChanged" TabIndex="2">
</asp:DropDownList>                            
</ContentTemplate>    
    
</asp:UpdatePanel>
<br />
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode=Conditional>
<ContentTemplate> 
<asp:TextBox ID="txtOrigZone" runat="server" Style="z-index: 101; left: 636px; position: absolute; top: 134px" Width="29px" ReadOnly="True" Visible="False">
</asp:TextBox>
&nbsp;&nbsp;&nbsp;  
</ContentTemplate>  
</asp:UpdatePanel>

Open in new window

0
Comment
Question by:mainrotor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 6

Accepted Solution

by:
thaytu888888 earned 2000 total points
ID: 33481745
- Tell me exactly what is your problem? Try to remove AutoPostBack="True" in the dropdownlist, also post the Page_Load function here so i can have more information.
0
 

Author Comment

by:mainrotor
ID: 33487519
thaytu888888
Below is the info you requested.  I cleaned up the code a little bit and removed the AutoPostBack on my dropdownlists.  Let me know if there is anything else I need to check.  My app is still flickering When I tab from a text box to the DropDownList.

Thanks in advance,
mrotor
<asp:UpdatePanel ID="UpdatePanel4" runat="server" UpdateMode=Conditional>
   <ContentTemplate> 
   <asp:TextBox ID="txtOrgPostCode" runat="server" Style="z-index: 116; left: 115px; position: absolute; top: 135px" Width="80px" Font-Size="Small" TabIndex="1" onblur="GetLocalInfo()"                                                                      OnTextChanged="txtOrgPostCode_TextChanged" ></asp:TextBox>
   </ContentTemplate>  
</asp:UpdatePanel>

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode=Conditional>
   <ContentTemplate>                                
   <asp:DropDownList ID="ddlOrgPortCode" runat="server" Style="z-index: 100; left: 212px; position: absolute; top: 135px" Width="270px" AutoPostBack="False"                                                                                                  OnSelectedIndexChanged="ddlOrgPortCode_SelectedIndexChanged" TabIndex="2">
   </asp:DropDownList>                            
   </ContentTemplate>        
</asp:UpdatePanel>

<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode=Conditional>
   <ContentTemplate> 
   <asp:TextBox ID="txtDestPostCode" runat="server" Style="z-index: 111; left: 115px; position: absolute; top: 160px" Width="80px" TabIndex="3" Font-Size="Small" onblur="GetDestInfo()" 	                   OnTextChanged="txtDestPostCode_TextChanged">
   </asp:TextBox>   
   </ContentTemplate>  
</asp:UpdatePanel>

<asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode=Conditional>
   <ContentTemplate>   
   <asp:DropDownList ID="ddlDestPortCode" runat="server" Style="z-index: 123; left: 212px; position: absolute; top: 160px" Width="270px" AutoPostBack="False"                                                                                                             OnSelectedIndexChanged="ddlDestPortCode_SelectedIndexChanged" TabIndex="4">
   </asp:DropDownList>
   </ContentTemplate>        
</asp:UpdatePanel>







HERE'S THE PAGE LOAD EVENT YOU REQUESTED:

    protected void Page_Load(object sender, EventArgs e)
    {
        this.GetPostBackEventReference(this, string.Empty);

        if (!IsPostBack)
        {
            GetUserEmailAddress();

            TotTable.Visible = false;
            TotalCost.Visible = false;
            ManualTable.Visible = false;
            btnCalcTotal.Visible = false;
            TabGrid.Visible = false;
            GridResults.Visible = false;
            tblLegend.Visible = false;

            GMap1.addGMapUI(new Subgurim.Controles.GMapUI());
            GMap2.addGMapUI(new Subgurim.Controles.GMapUI());

            GMap1.Visible = false;
            GMap2.Visible = false;

            txtOrgPostCode.Focus();
        }
        else
        {
            string eventTarget = (this.Request["__EVENTTARGET"] == null) ?
            string.Empty : this.Request["__EVENTTARGET"];
            string eventArgument = (this.Request["__EVENTARGUMENT"]);

            if (eventTarget == "GetLocalInfo()")
                GetLocalInfo();

            if (eventTarget == "GetDestInfo()")
                GetDestInfo();

            if (eventTarget == "ManPerc()")
                ManPerc();
        }
    }

Open in new window

0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

770 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