Is it possible to run custom controls in <title><meta> tags without placing the form tag at the start of the page?


Hi,
I have created a group of custom controls to allow users/designers to edit the design of dynamic pages easily without doing any code, basically they get given the custom controls and can drop them into web pages and it pulls up the appropriate information when ran on my server (from the querystring/public properties etc), sounds great so far.
But my problem is that I want them to be able to put the tags into other parts of the page outside of the body tag, including the pages metadata/title etc
eg
<title><mytag:pagename runat="server"></title>
will come out
<title>my lovely jubbly page</title>
Now I can get this to work by doing what I think must be a fudge, by putting the form start tag at the start of the page and the end tag at the end of the page.
But am I missing something? There must be a neater way of doing? Any help or hints would be appreciated?
Gav
0
GavinStorey
1/27/2004 7:58:21 PM
asp.net.hosting-open-forum 4216 articles. 0 followers. Follow

2 Replies
1094 Views

Similar Articles

[PageSpeed] 43
Get it on Google Play
Get it on Apple App Store

Are these control such that they are required to be inside form tag? That is like TextBox etc (form controls). If they aren't, you don't need to place them inside a server-side form which means you can just place them in the header etc. and access via ID as you would do for any other control.


Thanks,

Teemu Keiski
Finland, EU
0
joteke
1/27/2004 8:37:09 PM

Thanks for getting back to me so quickly.
I hadn't been thinking about the textbox controls being different than the label controls etc, which was bit of a mistake.
I think my best bet is to convert my server controls to inherit HTML controls instead as I am currently not using any of the more advanced features of the server controls anyway, and in so doing I can make the tags simpler to implement which is always good.
Gav
p.s. I have just tested it off and this all works fine now I am inheriting from the HTML controls, I also now do not have any need for the server side form tags
I just feel a bit of a prat not realising this in the first place.
0
GavinStorey
1/27/2004 10:00:18 PM
Reply:

Similar Artilces:

How to strip a string of <html>, ,</html>, <body>, </body>, <form ... >, </form> tags?
I have stream which is the HTML input of a page. Now I want to use only that part of this page, that is within <form .....> and </form> tags, and excluding these tags.How would I go about stripping <html>, ,</html>, <body>, </body>, <form ... >, </form>, <head> and </head> tags? I have to make sure that <head ...javascript..> and its corresponding </head> tags are not stripped in this process.sun21170    Wait... you said you wanted to strip the head tags, and you're also saying you need to NOT strip the ...

Adding run-time created <li></li> tags inbetween <ul>/ul> tags
I want to create a custom control which will create a unordered list and fill it with list items of which will be created at run-time. Currently I am using the following logic: At my Default.aspx page:<ai:ul_adder ID="ul_adder1" ListItemString="Page1 1,sf1.aspx,image/edit.gif; Page 2,sf2.aspx,image/colaps.gif" runat="server"/>and at the ul_adder.ascx file 1 public string ListItemString 2 { 3 set 4 { 5 string[] itemlist = value.Split(';'); 6 7 for (int i = 0; i < itemlist.Length; i++) 8 ...

Can't use "defaultbutton" in <form></form> tag in login control page.
I have a login control and I tried to set the default button as the submit button within my form tag in the login page.But, I am getting the following error.Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. I already generated the machine key.Any clue! hi robin, Please try this fix if.. add the below given code into your web.config or the file that you are executing and see if your issue gets...

Control <> of type <> must be placed inside a form tag with runat=server
Hi, I created a User Control and tried to place it in the header but I get the following error message Control 'Header1_cal_DropDownList1' of type 'DropDownList' must be placed inside a form tag with runat=server. Why does this happen ? It also does not work for Calendar and Textbox. Thanks Gslick Hi Gslick, Thanks for downloading the Issue Tracker! Unfortunately, the Header.ascx and Footer.ascx files do not include the opening and closing <form runat="Server"> tags. These tags are contained in the individual pages. This means that you ...

Should the <title> tag go into the <ContentPlaceHolder> tag?
In VS 2008, I want to be able to easily edit the <title> tag in a child page that inherits from a master page.  When I create the .master page it places the <title> tag outside of the <ContentPlaceHolder> tag in the header section.  Should I move it into that <ContentPlaceHolder> tag in the header section?  Doctor Who If you're trying to set the title of the page based on the content page you can use,Page.Header.Title = "<Page Title>in your content page code.Refer to this link for more information.http://aspnet.4guysfromrolla.com/artic...

Bug rendering <p> tags around <pre> or <code> tags
Name: Tim Robinson Email: tcr1272atgmaildotcom Product: Firefox Summary: Bug rendering <p> tags around <pre> or <code> tags Comments: Two Examples below, both render the <p> tags differently and incorrectly. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <body> <p> <pre> <div> my text </div> </pre> <p> <body> <html> <!DOCTYP...

data controls that output <div> and not <span> or <table> tags
 hi are there any controls that can output <div>?or can someone show me how to build my own controls for displaying data in div format?  Hi,use a Repeater control. Probably, haven't tested it myself, in .NET 3.5 you could also use the ListView for this.Grz, Kris. Read my blog. Handy Firefox plugins for web developers.Workaround for non working Mark as answer buttons....

Custom Composite Control
Let's start with what I'm looking for: <controls:MyWrapper id="Blah" runat="server">     <content>         <controls:Exporter id="Blah1" runat="server"  {This control has an image button and some other controls} />         <controls:GridView {This is a fully functional GridView} />         <controls:CustomFooterDetailer id="Yadda" runat="server" /> &nb...

Panel control generates <div> tags or <table> tags?
The reason is I'm confuse with my code. On some pages, they generate <div></div> html tags when I viewed the source, while on some occasions, they generate <table></table> html tags. Why is this so? Is it due to some settings? I've used them the same way by declaring them <asp:Panel id="pnABC" runat="server"> ... </asp:Panel> although sometimes I use the Visible attribute too. Can anyone clarify why? no one can answer this? Hi, have you checked the pages with different browsers to note this? E.g with IE it is D...

superreview requested: [Bug 271996] Setting page title in javascript does not work if <title></title> tags are omitted or empty. : [Attachment 170367] Patch
Boris Zbarsky <bzbarsky@mit.edu> has asked neil@parkwaycc.co.uk <neil.parkwaycc.co.uk@myrealbox.com> for superreview: Bug 271996: Setting page title in javascript does not work if <title></title> tags are omitted or empty. https://bugzilla.mozilla.org/show_bug.cgi?id=271996 Attachment 170367: Patch https://bugzilla.mozilla.org/attachment.cgi?id=170367&action=edit ------- Additional Comments from Boris Zbarsky <bzbarsky@mit.edu> This uses the actual document title to see whether we've set the title yet instead of using the local content sink me...

superreview granted: [Bug 271996] [FIX]Setting page title in javascript does not work if <title></title> tags are omitted or empty. : [Attachment 170367] Patch
neil@parkwaycc.co.uk <neil.parkwaycc.co.uk@myrealbox.com> has granted Boris Zbarsky <bzbarsky@mit.edu>'s request for superreview: Bug 271996: [FIX]Setting page title in javascript does not work if <title></title> tags are omitted or empty. https://bugzilla.mozilla.org/show_bug.cgi?id=271996 Attachment 170367: Patch https://bugzilla.mozilla.org/attachment.cgi?id=170367&action=edit ------- Additional Comments from neil@parkwaycc.co.uk <neil.parkwaycc.co.uk@myrealbox.com> >- text->SetText(mTitle, PR_TRUE); >+ text->SetText(title, P...

Links page -- Having trouble fitting sections in the <dl>, <dt>, <dd> tags
Greetings, I am new to web development (especially to ASP) so I imagine these are very beginner questions.  I'm looking/modifying the Personal Website starter kit, and namely the "Links" page.  I'm trying to add some custom descriptions to some of my links.  However, if these descriptions are too long, they overlap the description of the next link -- I would expect the next link to start where the previous one ended, however this is not the case.  Here is a snippet of my code: 1 <h4>Accomodations</h4> 2 <dl> 3 ...

Inline tags...<%=%>, <%# %>, <%$ %> ....etc...
I come from a classic ASP background, so I know what <%= [string] %> means...but what about:  <%# expression %> and <%$ expression %>  --------------- I've seen <%# expression %> used mainly in databinding (<%# Bind("employeename") %>) for a TemplateField but am not sure exactly what it means (though I know what it does). I would think that <%= and <%# are synonymous but it seems they are not. <%$ expression %> I've only seen in an SqlDataSource when setting the ConnectionString attribute to: <%$ ConnectionStri...

Inserting <Object> before <form> tag when rendering control
I have an ActiveX object that must be delcared outside the default <form> tag of my web control. In other words, when the control renders and writes out the <form element>, I need to place an object tag BEFORE "<form>" is written. What happens now: <form VIEWSTATE= " ... " > <object> objectstuff </object> </form> what I need is: <object>objectstuff</object> <form VIEWSTATE= " ... " ></form> I have tried the RegisterClientScriptBlock method on a whim, but it places ...

Web resources about - Is it possible to run custom controls in <title><meta> tags without placing the form tag at the start of the page? - asp.net.hosting-open-forum

Resources last updated: 11/29/2015 9:56:41 AM