Live Chat Icon For mobile
Live Chat Icon

I have a function inside of the .ascx file. How can I call it from the web application page(the .aspx file)

Platform: ASP.NET| Category: User Controls

All you need to do is give your user control an ID in the aspx. e.g.


<myTagTest:MarcTest id=myUC runat='server'> 
</myTagTest:MarcTest> 

Then in your aspx code, you can simply use the id to call public methods (and properties) defined by the ascx. e.g.
VB.NET


myUC.writeData(...) 

C#


myUC.writeData(...) 

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.