Is it possible to set the data in a ContentPlaceHolder through code? This is what I am thinking of:
dim oCPH as new ContentPlaceHolder
oCPH.id = "column1" 'this id is the one that corresponds with the ID I set on the page
oCPH.content = "content here" '<-- not real code
Obviously that is not correct syntax, I hope that this clarifies what I am asking.
You should be able to reference it through the MasterPage element on the current page. Something like:
ContentPlaceHolder cph = (ContentPlaceHolder)Master.FindControl("column1");
If in the MasterPage codebehind, just reference it by name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With