Master pages cause Atlas UpdatePanel to flash?

D

Diane Yocom

I'm trying to use an Atlas UpdatePanel to just update a label when a text
box has changed. The problem is that my textbox is in a user control and
I'm using Master Pages - with the combination of these two things, the page
flashes everytime my textbox changes and the panel is updated.

If I just use a regular textbox along with the Master Page, it works fine.
If I use by user control without the Master Pages, it works fine. When I
combine them....flash.

I've pasted in the simplest example I could make. Any help would be much
appreciated as this has been very frustrating!

Thanks,
Diane Y.

MASTER PAGE CODE:
AtlasTest.master:

<%@ Master Language="VB" CodeFile="AtlasTest.master.vb"
Inherits="Masters_AtlasTest" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

<title>Untitled Page</title>

</head>

<body>

<form id="form1" runat="server">

<div>

<asp:contentplaceholder id="test" runat="server">

</asp:contentplaceholder>

</div>

</form>

</body>

</html>





AtlastTest.master.vb:

Partial Class Masters_AtlasTest

Inherits System.Web.UI.MasterPage

End Class



USER CONTROL CODE:
AtlasTest.ascx:

<%@ Control Language="VB" AutoEventWireup="false"
CodeFile="AtlasTest.ascx.vb" Inherits="Controls_AtlasTest" %>
<asp:TextBox ID="txtTest" runat="server" AutoPostBack="True" />


AtlasTest.ascx.vb:


Public Delegate Sub TextChangedHandler(ByVal sender As Object, ByVal e As
System.EventArgs)

Partial Class Controls_AtlasTest

Inherits System.Web.UI.UserControl

Public Event TextChanged As TextChangedHandler

Public Property Text() As String

Get

Return Me.txtTest.Text

End Get

Set(ByVal value As String)

Me.txtTest.Text = value

End Set

End Property



Sub txtTest_TextChanged(ByVal sender As Object, ByVal e As EventArgs)
Handles txtTest.TextChanged

RaiseEvent TextChanged(Me, e)

End Sub

End Class



TEST WEB PAGE CODE:
AtlasTest.aspx.vb:

<%--<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="AtlasTest.aspx.vb" Inherits="Family_AtlasTest" %>

--%><%@ Page Language="VB" MasterPageFile="~/Masters/AtlasTest.master"
AutoEventWireup="false" CodeFile="AtlasTest.aspx.vb"
Inherits="Family_AtlasTest" %>

<%@ Register TagPrefix="hsd" TagName="Test" Src="../Controls/AtlasTest.ascx"
%>

<%--<html>

<head runat="server">

</head>

<body>

<form id="form1" runat="server">--%>

<asp:Content ID="test1" ContentPlaceHolderID="test" runat="Server">

<atlas:ScriptManager ID="ScriptManager1" runat="server"
EnablePartialRendering="True" />

<table border="0" style="width: 100%">

<tr>

<td>

Text Box Test:

<atlas:UpdatePanel ID="updateTextBoxTest" runat="server" Mode="Conditional">

<ContentTemplate>

<asp:textbox runat="server" ID="txtTextBoxTest" AutoPostBack="True" />

<asp:Label Runat="server" ID="lblTextBoxTest"></asp:Label>

</ContentTemplate>

<Triggers>

<atlas:ControlEventTrigger ControlID="txtTextBoxTest"
EventName="TextChanged" />

</Triggers>

</atlas:UpdatePanel>

<br />

User Control Test:

<atlas:UpdatePanel ID="updateControlTest" runat="server" Mode="Conditional">

<ContentTemplate>

<hsd:Test runat="server" ID="txtControlTest" />

<asp:Label Runat="server" ID="lblControlTest"></asp:Label>

</ContentTemplate>

<Triggers>

<atlas:ControlEventTrigger ControlID="txtControlTest"
EventName="TextChanged" />

</Triggers>

</atlas:UpdatePanel>

</td>

</tr>


</table>

</asp:Content>

<%--

</form>

</body>

</html>--%>




AtlasTest.aspx.vb:
Partial Class Family_AtlasTest

Inherits System.Web.UI.Page

Protected Sub txtTextBoxTest_TextChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles txtTextBoxTest.TextChanged

Me.lblTextBoxTest.Text = Me.txtTextBoxTest.Text

End Sub

Protected Sub txtControlTest_TextChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles txtControlTest.TextChanged

Me.lblControlTest.Text = Me.txtControlTest.Text

End Sub

End Class
 
D

Diane Yocom

I figured out the problem.

In my web.config file, I had the following tag:
<xhtmlConformance mode="Legacy"/>

When I got rid of it, the postback/flashing stopped.

Now, can anyone tell me what that tag is for?
 
L

Laurent Bugnion

Hi,

Diane said:
I figured out the problem.

In my web.config file, I had the following tag:
<xhtmlConformance mode="Legacy"/>

When I got rid of it, the postback/flashing stopped.

Now, can anyone tell me what that tag is for?

This is an attribute which specifies how the HTML will look like (if it
will validate as XHTML Strict, XHTML Transitional or XHTML Legacy).

Some browsers have problems with XHTML still. That might explain your
problem.

See
http://msdn2.microsoft.com/en-us/library/ms228268.aspx

HTH,
Laurent
 
Joined
Sep 1, 2006
Messages
1
Reaction score
0
Hi,

I'm having the same problem, but that line doesn't exist in my web.config. Does anyone know of another reason this might be happening? Thanks so much for the help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,058
Latest member
QQXCharlot

Latest Threads

Top