title: How to enumerate asp.net HTML element attributes in javascript
body: <p>To make a long story as short as possible (ignore this paragraph if you really just want to cut to the chase):</p>
  
  <p>I'm using CuteEditor to edit very specific pages of controls. In the page viewer application these controls use HTML5 canvii to do all sorts of funky anim stuff, but in CuteEditor (where it's not practical to do the same thing) they are represented by IMG elements for editability. These controls have a bunch of properties, and this is all saved and loaded from an SQL database. Different types of control have different possible types of properties, and in CuteEditor these are stored as attributes of the  element (such as PipColour="Green") I have created a custom tab for the CuteEditor IMG editor dialog, which when the control type is changed, an SQL database is called to get all the possible properties so the dialog can be populated with the relevant input controls.</p>
  
  <p>Now, the chase:</p>
  
  <p>In CuteEditor, custom dialog tabs use a .ascx file with SyncToView() and SyncTo(element) javascript methods to get and set the attributes of the element being edited, using</p>
  
  <pre><code>element.&lt;attributename&gt;
  </code></pre>
  
  <p>Since I don't necessarily know what attributes 'element' will have or what they will be called, is there a way to enumerate through them all by name?</p>