Saturday, March 24, 2012

a simple test

Hi guys,

I have this in HTML:

<atlas:ScriptManager ID="s1" runat="server" EnablePartialRendering="true"/>

<asp:LinkButton ID="linkAtlas" runat="server" PostBackUrl="home.aspx" Text="LinkButton 2 Atlas"OnClick="linkAtlas_Click" />

<atlas:UpdatePanel id="u1" runat="server" Mode="Conditional">
<ContentTemplate>
<asp:Label ID="lblAtlas" runat="server" Text="label under Panel" />
</ContentTemplate>
<Triggers>
<atlas:ControlEventTrigger ControlID="linkAtlas" EventName="Click" />
</Triggers>
</atlas:UpdatePanel>

and the linkAtlas_Click function is:

Protected SublinkAtlas_Click(ByVal sender As Object, ByVal e As System.EventArgs)
lblAtlas.Text = "new (" & 1 * Rnd() * 100 & ")"
End Sub

just a simple test so I can figure out how ATLAS work...

the objective is to click in the link and the label change it's text value without refreshing the page...
the above code should do that, right? well... it doesn't :-(

it doesn't change the value, but if I changeEnablePartialRendering="true" it works fine, but it refreshes the page...

can you help me on this?

Thank you.

Bruno Alexandre
"a Portugueses in K?benhavn, Danmark"

<asp:LinkButton ID="linkAtlas" runat="server"PostBackUrl="home.aspx" Text="LinkButton 2 Atlas"OnClick="linkAtlas_Click" />

The offending code is thePostBackUrl="home.aspx"

If you remove that it will start working. I don't think cross-page postbacks are supported with Atlas UpdatePanels.

No comments:

Post a Comment