S
Shawn
I cannot find an AJAX feed here, so I am posting in here...
I want to set the visibility of my updatePanel to true upon postback from an
ASP.NET button. It works fine, but the panel flashes in it's starting
position before moving to it's final (correct) one. How can I get around
that?
Here is the button code.
Protected Sub btnAdminCommit_Click(ByVal sender As Object, ByVal e As
EventArgs) Handles btnAdminCommit.Click
Try
cnn.Open()
SubmitApplications()
SubmitPageAccess()
SubmitBusStructAccess()
cnn.Close()
upSecurity.Visible = False
lblConfirm.Text = "Updates Complete"
upConfirm.Visible = True
upConfirm.Update()
mpopConfirm.Show()
Catch ex As Exception
trUpdateAdminAccess1.Rollback()
trUpdateAdminAccess2.Rollback()
trUpdateAdminAccess3.Rollback()
cnn.Close()
upSecurity.Visible = False
upSecurity.Update()
mdlPopUp.Hide()
lblConfirm.Text = "There was an error submitting the change: " &
ex.Message
upConfirm.Visible = True
upConfirm.Update()
mpopConfirm.Show()
End Try
End Sub
The "up..." controls are my UpdatePanels.
Here is the code for the upConfirm Panel.
<asp:UpdatePanel ID="upConfirm" runat="server" UpdateMode="Conditional"
Visible="False">
<ContentTemplate>
<aspanel ID="pnlConfirm" runat="server" BackColor="White"
BorderColor="Gray"
BorderStyle="Ridge" BorderWidth="3px" Width="300px" ScrollBars="Auto">
<br />
<asp:Label ID="lblConfirm" runat="server" Text="Label"></asp:Label>
<ajaxToolkit:ModalPopupExtender ID="mpopConfirm" runat="server"
BackgroundCssClass="AJAX_Background" PopupControlID="pnlConfirm"
TargetControlID="btnHiddenConfirm" CancelControlID="btnConfirmOK"
oncancelscript="hideConfirm()">
</ajaxToolkit:ModalPopupExtender>
<br />
<br />
<asp:Button ID="btnConfirmOK" runat="server" Text="Close"
BackColor="SteelBlue"
ForeColor="White" />
<asp:Button ID="btnHiddenConfirm" runat="server" Text="Button"
style="display:none;"/>
<br />
<br />
</aspanel>
</ContentTemplate>
</asp:UpdatePanel>
I want to set the visibility of my updatePanel to true upon postback from an
ASP.NET button. It works fine, but the panel flashes in it's starting
position before moving to it's final (correct) one. How can I get around
that?
Here is the button code.
Protected Sub btnAdminCommit_Click(ByVal sender As Object, ByVal e As
EventArgs) Handles btnAdminCommit.Click
Try
cnn.Open()
SubmitApplications()
SubmitPageAccess()
SubmitBusStructAccess()
cnn.Close()
upSecurity.Visible = False
lblConfirm.Text = "Updates Complete"
upConfirm.Visible = True
upConfirm.Update()
mpopConfirm.Show()
Catch ex As Exception
trUpdateAdminAccess1.Rollback()
trUpdateAdminAccess2.Rollback()
trUpdateAdminAccess3.Rollback()
cnn.Close()
upSecurity.Visible = False
upSecurity.Update()
mdlPopUp.Hide()
lblConfirm.Text = "There was an error submitting the change: " &
ex.Message
upConfirm.Visible = True
upConfirm.Update()
mpopConfirm.Show()
End Try
End Sub
The "up..." controls are my UpdatePanels.
Here is the code for the upConfirm Panel.
<asp:UpdatePanel ID="upConfirm" runat="server" UpdateMode="Conditional"
Visible="False">
<ContentTemplate>
<aspanel ID="pnlConfirm" runat="server" BackColor="White"
BorderColor="Gray"
BorderStyle="Ridge" BorderWidth="3px" Width="300px" ScrollBars="Auto">
<br />
<asp:Label ID="lblConfirm" runat="server" Text="Label"></asp:Label>
<ajaxToolkit:ModalPopupExtender ID="mpopConfirm" runat="server"
BackgroundCssClass="AJAX_Background" PopupControlID="pnlConfirm"
TargetControlID="btnHiddenConfirm" CancelControlID="btnConfirmOK"
oncancelscript="hideConfirm()">
</ajaxToolkit:ModalPopupExtender>
<br />
<br />
<asp:Button ID="btnConfirmOK" runat="server" Text="Close"
BackColor="SteelBlue"
ForeColor="White" />
<asp:Button ID="btnHiddenConfirm" runat="server" Text="Button"
style="display:none;"/>
<br />
<br />
</aspanel>
</ContentTemplate>
</asp:UpdatePanel>