accessing control on page A.ASPX from a WEBUSERCONTROL.ASCX
-
28-10-2019 - |
Frage
How can I access a control on page a.aspx
from a webusercontrol.ascx
- I do not know the technical term used to describe this, if any,
the webusercontrol.ascx page contains a button.
- onclick of the button, placeholder on main page must display the "required content".
if this were on the same page no problem.
but how to access across pages?
Lösung
Expose an event on your ASCX control, subscribe an event handler method on the ASPX page to the event on that page's instance of that control, implement the method to make the required changes to the parent page.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow