By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,089 Members | 2,283 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,089 IT Pros & Developers. It's quick & easy.

HTML form inside a ASP.NET form: CMS

P: n/a
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

Mar 14 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
DWS
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


Mar 15 '06 #2

P: n/a
Hi, thanks for your help, I will give this a go
Cheers
Mark
"DWS" <DW*@discussions.microsoft.com> wrote in message
news:4E**********************************@microsof t.com...
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


Mar 15 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.