I've created a new user control which is nothing more than a TextBox control and imported it into Umbraco 4.6.1 as a new Data Type. I've embedded it in a DocumentType as a field and all is well.
The control saves my text inputs and I have no problems, until I mark the field with a ReadOnly="true" attribute in the HTML and reimport it. In the codebehind, on Page_Load I ask that if it's not a Postback, then set the value to false so that I can enter data. If it is Postback, leave it alone, so I can't change the value.
Could you perhaps share your code with us? Then it will be much easier to help you out I guess since this could perhaps be happening due to a wrong syntax or that you're maybe testing in the wrong place or something like that.
Once we can see the code it's much easier to give you some suggestions - otherwise we're just guessing :-)
UserControl ReadOnly text field
Hi,
I've created a new user control which is nothing more than a TextBox control and imported it into Umbraco 4.6.1 as a new Data Type. I've embedded it in a DocumentType as a field and all is well.
The control saves my text inputs and I have no problems, until I mark the field with a ReadOnly="true" attribute in the HTML and reimport it. In the codebehind, on Page_Load I ask that if it's not a Postback, then set the value to false so that I can enter data. If it is Postback, leave it alone, so I can't change the value.
Unfortunately, the value is now no longer saving.
Can anyone suggest why?
Thanks
Rich
Hi Rich
Could you perhaps share your code with us? Then it will be much easier to help you out I guess since this could perhaps be happening due to a wrong syntax or that you're maybe testing in the wrong place or something like that.
Once we can see the code it's much easier to give you some suggestions - otherwise we're just guessing :-)
/Jan
is working on a reply...