I have added an ASPxPopupControl, which includes a Save Button, and I want to close it after saving a record.
I tried the following:
string str = @"<script language=""javascript"" type=""text/javascript"">function HideEscalateAsk() {pcEscalteAsk.Hide();}</script>";
Page.RegisterClientScriptBlock("ClientScript", str);
but it still doesn't work. How can I close the ASPxPopupControl?
First thing. How are you handling Save Button; Server Side
event or Client Side
.
If you are using client side then use Callback
server side event to save data and End Callback
client event to close popup.
If using Server Side event then use ASPxPopupControl.ShowOnPageLoad
Property.
protected void btnShowPopup_Click(object sender, EventArgs e) {
txtPopup.Text = txtMain.Text;
ASPxPopupControl1.ShowOnPageLoad = true;
}
protected void btnOK_Click(object sender, EventArgs e) {
// TODO: your code is here to process the popup window's data at the server
txtMain.Text = txtPopup.Text;
ASPxPopupControl1.ShowOnPageLoad = false;
}
Refer following links for information:
How to show the ASPxPopupControl
How to show and hide a popup window via server side code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With