I'm adding values to a custom DropDownList on the server w/ the following format:
<img fieldName=\"{0}\" tableName=\"{1}\" alt=\"[{2}]\" style=\"font-weight: bold\" />
When the user selects one of the values in the DropDownList, the OnClientCommandExecuting pastes the value of the selectedItem
as follows:
The pasted value is as follows:
<img style=\"font-weight: bold;\" alt=\"[Address]\" tablename=\"Organization\" fieldname=\"MailAddress1\" />
Why is the order of the attributes of my img element on the client different than what I explicitly set on the server? I'm trying to write a regular expression to do a replace of the img tag when the form is submitted, but I'm not able to due to the issue described above.
<img fieldName=\"{0}\" tableName=\"{1}\" alt=\"[{2}]\" style=\"font-weight: bold\" />
When the user selects one of the values in the DropDownList, the OnClientCommandExecuting pastes the value of the selectedItem
as follows:
| function templateEditorOnClientCommandExecuting(sender, eventArgs) |
| { |
| var name = eventArgs.get_name(); |
| var val = eventArgs.get_value(); |
| if(name == "Fields") |
| { |
| if(val != null && val != '') |
| { |
| sender.pasteHtml(val); |
| } |
| else |
| { |
| alert('Select a Template Type first'); |
| } |
| eventArgs.set_cancel(true); |
| } |
| } |
The pasted value is as follows:
<img style=\"font-weight: bold;\" alt=\"[Address]\" tablename=\"Organization\" fieldname=\"MailAddress1\" />
Why is the order of the attributes of my img element on the client different than what I explicitly set on the server? I'm trying to write a regular expression to do a replace of the img tag when the form is submitted, but I'm not able to due to the issue described above.
