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
MarkMark,
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 desig
n
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 htm
l.
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 insi
de
> 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
>
>
>
Hi, thanks for your help, I will give this a go
Cheers
Mark
"DWS" <DWS@.discussions.microsoft.com> wrote in message
news:4E27ABA2-F0C8-4DF6-A49E-948A7D2892B8@.microsoft.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:
>
No comments:
Post a Comment