Hi all,
I'm Trying to display the new added row id just added to DB using the ModalPopupExtender.
I'm passing the value for the new id to a label inside a panel for the Popup, but I get the viewstate (old value) from the the label control.
I can understand the reason for this, label will be updated when the page is loaded.
I was trying to do it from generating javascript on the client and from code behind, but did not make it.
is there a way to do this?
Cheers.
<cc1:ModalPopupExtender ID="mpeSummary" runat="server" BehaviorID="programmaticModalPopupBehavior"
TargetControlID="hiddenTargetControlForModalPopup" PopupControlID="savePopup"
BackgroundCssClass="modalBackground" DropShadow="True" PopupDragHandleControlID="programmaticPopupDragHandle"
RepositionMode="RepositionOnWindowScroll">
</cc1:ModalPopupExtender>
<script type="text/javascript">
function updatePopUP(newID)
{
$get('<%=lblNewID.ClientID%>').innerHTML = newID;
$find('<%= mpeSummary.ClientID %>').show();
}
</script>
<asp:Panel runat="server" CssClass="modalPopup" ID="savePopup" Style="display: none;
width: 350px; padding: 10px">
<asp:Panel runat="Server" ID="programmaticPopupDragHandle" Style="cursor: move; background-color: #DDDDDD;
border: solid 1px Gray; color: Black; text-align: center;">
טופס נשמר!<br />
מספר:
<asp:Label ID="lblNewID" runat="server" ForeColor="red"></asp:Label>
</asp:Panel>
<asp:LinkButton runat="server" ID="hideModalPopupViaServer" Text="סגור" OnClick="hideModalPopupViaServer_Click" CausesValidation="false" />
<br />
</asp:Panel>
C#
lblNewID.Text= e.OutputParameters["NewID"].ToString();
mpeSummary.Show();