For long and complicated reasons I'm using the <IMG> tag to represent a page control, and adding attributes to it (for example MajorIncrements="5") which are then stored in an SQL database to be used in a viewer later.
I have created a custom ascx tab for the image editor dialog, and need to be able to dynamically add input boxes to it according to what type of control it is, and sync the boxes to existing attributes.
I can enumerate the <IMG> tag's attributes client side in the .ascx file using this script:
function SyncToView() {
for (var i = 0; i < element.attributes.length; i++) {
if (element.attributes.item(i).nodeValue != null && element.attributes.item(i).nodeValue != ') {
alert('Found key ' + element.attributes.item(i).nodeName + ' with value ' + element.attributes.item(i).nodeValue);
}
}
}
Can anyone tell me how to access the element being edited and enumerate its' attributes from server-side, in the code behind?
Thanks