HTML form inside a ASP.NET form: CMS

M

Mark

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
 
G

Guest

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top