سؤال

Lets me explain the situation. I have a gridview, when I hit an add button I show a popup window and let the user enter the info. When the info is completed, the user clicks OK and a client side comprobation is made and an e.processOnServer = isValid; with a true in there, so the server event runs (btnSubmitConfig_Click), and at the end of this function in code behind I need to insert this startup script to make an callback in the gridview to see that is populated, while the popup remains open with a message saying submit successful

My startup script is:

ScriptManager.RegisterStartupScript(this, GetType(), "Javascript", "aspxgridEditLog.PerformCallback(); ", true);

And is not fired.

Any guesses please? Thanks

هل كانت مفيدة؟

المحلول

I found the problem, I had to insert this script in the Parent.Page, instead of this because it was trying to find the gridview in the popup, so it wasn't finding it.

Now works:

ScriptManager.RegisterStartupScript(this.Parent.Page, Parent.Page.GetType(), "Javascript", "aspxgridEditLog.PerformCallback(); ", true);

Thanks for the guesses, you helped me think about what was the problem.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top