RE: Server Renaming Form Fields

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?YnJ1Y2UgYmFya2Vy?=

    RE: Server Renaming Form Fields

    this was answered last time you asked.

    -- bruce (sqlwork.com)


    "CJM" wrote:
    I have a bit of code that inserts some extra controls (specifically,
    ordinary <input type="hidden" name="MyField"f orm 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$Mai nBodyContent$PP ItemName" type="hidden"
    id="ctl00_MainB odyContent_PPIt emName" />
    >
    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
    >
Working...