Home
> ASP.NET > How to Access Parent Page (.aspx) control (IDs) from its child User Control (.ascx)
How to Access Parent Page (.aspx) control (IDs) from its child User Control (.ascx)
Write below line of code in control to find relevant parent page (aspx page)’s control
Code for VB.NET
Dim MainContent As ContentPlaceHolder = Me.Page.Master.FindControl(“MainContent”)
Dim btnPrint As Button = MainContent.FindControl(“btnPrint”)
Hope this help !
Categories: ASP.NET
ASP.NET, aspx, find button, find contorl, parent page, user control
Comments (0)
Trackbacks (0)
Leave a comment
Trackback
Comments