Writing outside
?

Is it possible to write characters outside the form tag? I know, you can't insert controls there, but is it just possible to insert ordinary ascii characters?
0
cantfindbettername
2/27/2006 2:31:25 PM
📁 asp.net.web-forms
📃 93655 articles.
⭐ 1 followers.

💬 4 Replies
👁️‍🗨️ 2185 Views

Yes you can.  Normal HTML tags can be outside of the 
tag.  What do you have in mind in relation to this question?
0
jcasp
2/27/2006 3:12:21 PM

Of course I meant how to do that programmaticaly, with asp.net.

0
cantfindbettername
2/27/2006 3:15:52 PM
I believe you can, but haven't tried it.  For example, using Page.Controls collection should be possible to achieve this since your Form resides in this collection.  Again, I haven't tried this so I'm not sure what problems, if any, you will face.  Just be sure to add HTML controls.
0
jcasp
2/27/2006 4:27:41 PM
cantfindbettername wrote:
Is it possible to write characters outside the form tag? I know, you can't insert controls there, but is it just possible to insert ordinary ascii characters?

That's not entierly correct. You can indeed insert controls outside the form tag, but only those that cannot cause postbacks. So, a container control like a PlaceHolder you can use outside the form tag, while for instance a button or a textbox must be placed inside a form tag.

If you place this outside the form tag:

 
You could add controls to it from code behing like this:
myPlaceHolder.Controls.Add(new LiteralControl("My Literal Control

--
Tarjei
0
tarjei
2/27/2006 6:42:06 PM
Reply:
(Thread closed)