Just change the protected Button1 as button
to public Button1 as Button
though one has to ask, why is the page setting the button's text...seems
like a flawed design...
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"ad" <ad@wfes.tcc.edu.tw> wrote in message
news:uD****************@tk2msftngp13.phx.gbl...
I put a Web User Controls in a Form.
The ID of the User Control is uc1.
But if I write the code like
uc1.Button1.text="New Text"
It will fail when complie time, and the error message is
uc_ascx.Button1is inaccessible due to its protection level
How can I public the button in User Control?