*Experts* mutant Posted June 14, 2003 *Experts* Posted June 14, 2003 (edited) I recently started a ASP.NET project. I have a ascx file which I put on my web form. This is a part of my ascx file: <div align="center"><%#COPYRIGHT%></div> Then I drag the ascx onto my form. How can I let the ascx control know of variable copyright from the page? I never worked with ascx files before :rolleyes: Edited June 14, 2003 by mutant Quote
hrabia Posted June 14, 2003 Posted June 14, 2003 You have to have a public property COPYRIGHT in your user control (ascx). Than you can set it from web form level: Protected WithEvents WebUserControl11 As WebUserControl1 Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load WebUserControl11.COPYRIGHT = "My Copyright" End Sub Quote A man and a dog have an average of three legs. Beaware of Statistics.
*Experts* mutant Posted June 14, 2003 Author *Experts* Posted June 14, 2003 Didnt think of that :D Thanks! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.