Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Tried the above with the same results. FYI-when I create a test page using the same setup(page that calls a usercontrol--same code in the usercontrol) it works as it should using cs.RegisterStartupScript.
The component template has a related tbb that contains a usercontrol tag. When the page is called with the 56 id, 'the ltrClassName.Text = "active";' runs as it should.
I've been thinking about many of the above comments..particularly composition vs inheritance.Inheritance would be easier for me to implement, but would hide page data on the back-end where the web producers would be unable to access. The template in question(1200 lines long) is a Razor template that based on component data, injects html to build out the page.That html should probably reside in a component somewhere.If that were the case, I'm assuming I would need to use TBB's to figure out which component(and its html) to bring in to build out the page instead of placing the logic in the tplt?
I'm looking to pull information prior to publishing-by calling a usercontrol from within a component template. So, I'm looking to access component info in the Content Management context.
I am investigating keeping the basic html in the template, then pushing the component's xml into the usercontrol and performing logic there, based on the contents of the xml.