473,386 Members | 1,654 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

HTML form inside a ASP.NET form: CMS

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
2 6013
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: frogman042 | last post by:
My daughter is playing around trying to learn JavaScript and she wrote a small program that prints out a message in increasing and decreasing font size and color changes. She is using document...
17
by: Lloyd Sheen | last post by:
This IDE is driving me nuts. I needed another button so I copied an existing one, changed the Text and the id and position by drag and drop. Well then I run and get the following: Control...
2
by: Nick Gilbert | last post by:
Hi I have a number of pages where it is valid for the user to enter HTML. On these pages, I have turned off RequestValidation ("ValidateRequest = false" in the page directive) so that the...
2
by: John Olsen | last post by:
Hi. I`m building a small CMS, and want to add the possibility to include server side code inside static html-strings that is stored in a database. For e.g. in the string...
2
by: Chad | last post by:
In our application, I would like to send out HTML mail. TO do so, I must do something like this: Mail.Body = <raw HTMLTEXT String> Hence, I would like to know how to get the HTML text for Web...
3
by: Just D. | last post by:
All, What's the simplest way to show my own HTML string on the ASPX page assuming that this page is just created using the wizard and it has nothing on it? We're free to use any control adding...
7
by: thersitz | last post by:
I can't seem to get my html form to submit properly from within a web form. Here's my form tag syntax and some delivery hidden fields. <form id="myForm"...
2
by: lynx129 | last post by:
Hi there , I have php script that works fine under my server but I dont know how to put the html code inside my site. feedback.html <html dir="rtl"> <head> <title> ????? ??? </title>...
3
by: happyse27 | last post by:
Hi All, I am creating the perl script using html form(with embedded javascript inside). When using this html form with javascript alone, it works where the form validation will pop up...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.