HTML form inside a ASP.NET form: CMS

Discussion in 'ASP .Net' started by Mark, Mar 14, 2006.

  1. Mark

    Mark Guest

    Hi all, I have a WYSIWYG editor which allows people to insert a form into a
    page.

    This information is stored in a database and at run-time is displayed inside
    a content placeholder (I'm using MasterPages).

    The problem I am having is that because .NET places a form tag wth
    runat=server my nested HTML tag posts back to the .NET form instead of the
    HTML page declared in the action tag of the HTML form.

    I have read that the way to get around this is to place the HTML form
    outside of the .NET tag but how can I do this when a page is being built
    from the database and displayed inside a content placeholder...

    Any ideas welcome!
    Thanks
    Mark
    Mark, Mar 14, 2006
    #1
    1. Advertising

  2. Mark,
    I had the same problem inserting html forms into a masterpage and came up
    with this technique witch didn't completely work for me (problems when design
    of masterpage changed) so I made a standalone page of html forms. Maybe the
    technique will work for you. It involves injecting html form tags into the
    client.

    In content place holder close out the masterpage form by writing a literal
    control to the client
    me.controls.add(new literalcontrol("</form>"))
    .....
    Write out your db forms. how ever you do this Mark.
    me.controls.add(new MarkFormfromdb)
    ....
    Create dummy header for aspx masterpage closing form tag for well formed html.
    me.controls.add(new literalcontrol("<form>))

    Good Luck
    DWS


    "Mark" wrote:

    > Hi all, I have a WYSIWYG editor which allows people to insert a form into a
    > page.
    >
    > This information is stored in a database and at run-time is displayed inside
    > a content placeholder (I'm using MasterPages).
    >
    > The problem I am having is that because .NET places a form tag wth
    > runat=server my nested HTML tag posts back to the .NET form instead of the
    > HTML page declared in the action tag of the HTML form.
    >
    > I have read that the way to get around this is to place the HTML form
    > outside of the .NET tag but how can I do this when a page is being built
    > from the database and displayed inside a content placeholder...
    >
    > Any ideas welcome!
    > Thanks
    > Mark
    >
    >
    >
    >
    >
    >
    =?Utf-8?B?RFdT?=, Mar 15, 2006
    #2
    1. Advertising

  3. Mark

    Mark Guest

    Hi, thanks for your help, I will give this a go
    Cheers
    Mark
    "DWS" <> wrote in message
    news:...
    > Mark,
    > I had the same problem inserting html forms into a masterpage and came up
    > with this technique witch didn't completely work for me (problems when
    > design
    > of masterpage changed) so I made a standalone page of html forms. Maybe
    > the
    > technique will work for you. It involves injecting html form tags into
    > the
    > client.
    >
    > In content place holder close out the masterpage form by writing a
    > literal
    > control to the client
    > me.controls.add(new literalcontrol("</form>"))
    > ....
    > Write out your db forms. how ever you do this Mark.
    > me.controls.add(new MarkFormfromdb)
    > ...
    > Create dummy header for aspx masterpage closing form tag for well formed
    > html.
    > me.controls.add(new literalcontrol("<form>))
    >
    > Good Luck
    > DWS
    >
    >
    > "Mark" wrote:
    >
    >> Hi all, I have a WYSIWYG editor which allows people to insert a form into
    >> a
    >> page.
    >>
    >> This information is stored in a database and at run-time is displayed
    >> inside
    >> a content placeholder (I'm using MasterPages).
    >>
    >> The problem I am having is that because .NET places a form tag wth
    >> runat=server my nested HTML tag posts back to the .NET form instead of
    >> the
    >> HTML page declared in the action tag of the HTML form.
    >>
    >> I have read that the way to get around this is to place the HTML form
    >> outside of the .NET tag but how can I do this when a page is being built
    >> from the database and displayed inside a content placeholder...
    >>
    >> Any ideas welcome!
    >> Thanks
    >> Mark
    >>
    >>
    >>
    >>
    >>
    >>
    Mark, Mar 15, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anders S. Willumsen

    CMS in ASP.NET 1.1 / 2

    Anders S. Willumsen, Oct 10, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    332
    Anders S. Willumsen
    Oct 10, 2004
  2. Jensen bredal
    Replies:
    2
    Views:
    2,930
    Lucas Tam
    Mar 15, 2005
  3. darrel
    Replies:
    1
    Views:
    378
    darrel
    Mar 29, 2005
  4. Replies:
    0
    Views:
    835
  5. Replies:
    2
    Views:
    717
Loading...

Share This Page