C
CJM
[A third attempt - my first two attempts doesn't appear to have shown
up -yet]
I have a bit of code that inserts some extra controls (specifically,
ordinary <input type="hidden" name="MyField"> form fields) into an existing
HTML form. However, it is mangling the name & IDs of these controls when
they are rendered:
For example, the PPItemName field is rendered as: <input
name="ctl00$MainBodyContent$PPItemName" type="hidden"
id="ctl00_MainBodyContent_PPItemName" />
Ordinarily, I wouldn't care (and it wouldn't matter either), but this form
is posting to a Paypal server and paypal is expecting particular field
names - so consequently we are having problems.
I can understand that .NET needs to use the ID attribute, but why the name
attribute? The name attribute is important in standard HTML, but I wouldn't
have thought so for .NET.
A workaround would be to use a placeholder, and use .innerHTML to inject
straight HTML inside. But this entire piece of code is already a workaround
for .NETs inability to handle multiple forms, so I thought there must be a
limit to the amount of messing about that I have to do.
Is there a way that I can force the server not to change the name of the
fields?
Thanks in advance...
Chris
up -yet]
I have a bit of code that inserts some extra controls (specifically,
ordinary <input type="hidden" name="MyField"> form fields) into an existing
HTML form. However, it is mangling the name & IDs of these controls when
they are rendered:
For example, the PPItemName field is rendered as: <input
name="ctl00$MainBodyContent$PPItemName" type="hidden"
id="ctl00_MainBodyContent_PPItemName" />
Ordinarily, I wouldn't care (and it wouldn't matter either), but this form
is posting to a Paypal server and paypal is expecting particular field
names - so consequently we are having problems.
I can understand that .NET needs to use the ID attribute, but why the name
attribute? The name attribute is important in standard HTML, but I wouldn't
have thought so for .NET.
A workaround would be to use a placeholder, and use .innerHTML to inject
straight HTML inside. But this entire piece of code is already a workaround
for .NETs inability to handle multiple forms, so I thought there must be a
limit to the amount of messing about that I have to do.
Is there a way that I can force the server not to change the name of the
fields?
Thanks in advance...
Chris