I have a current problem, let me explain the context earlier:
I have a modal popup extender that contains a form. There is a βSave and add newβ function, when the user clicks on this button, the data in the form is saved in the database during postback, and the page reloads.
I want this Modal popup to appear again on the load page, allowing the user to enter new data without having to click again the button that displays this Modal Popup.
I tried calling it as follows:
ClientScript.RegisterStartupScript(Page.GetType(), "ModalPopup", "ShowModalPopup(""" & Me.formModalButton.ID & """);", True)
but the problem was that the function was called by my Modal Popup does not yet exist on the page. Because of this, the code on
var modal = $find('myModal');
So, I found it in a different way and works almost fine .
ClientScript.RegisterStartupScript(Page.GetType(), "ModalPopup", "Sys.Application.add_load(function() {ShowModalPopup(""" & Me.formModalButton.ID & """)};", True)
, , , , .
: Modal Popup , , , .
- , ?
P.S. Modal popup server-side, javascript , RegisterStartupScript.
.