|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Add a META line to an existing HTML doc programmatically<HTML xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> <HEAD> <META NAME="Generator" CONTENT="Microsoft MapPoint 2004"> Now I need to add a META line to force the browser to refresh every 5 minutes as follow: <HEAD> <META Http-Equiv="Refresh" CONTENT="300" /> <META NAME="Generator" CONTENT="Microsoft MapPoint 2004"> Any suggestion is greatly appreciated! Thanks Bill Hey Bill,
there is a HtmlMeta class that you can use to do just that! You put the code in the Page_Load class and it will populate the tags for you Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) ' Create two instances of an HtmlMeta control. Dim meta As New HtmlMeta() ' Get a reference to the page header element. Dim head As HtmlHead = Page.Header ' Define an HTML <meta> element hm1.Name = "keywords" hm1.Content = "one, two, three" head.Controls.Add(hm1) End Sub On Wed, 29 Nov 2006 10:24:58 -0800, "Bill Nguyen" <billn_nospam_please@jaco.com> wrote: Show quoteHide quote >The HTML doc looks like this: Bits.Bytes.> ><HTML xmlns:v="urn:schemas-microsoft-com:vml" >xmlns:o="urn:schemas-microsoft-com:office:office"> > ><HEAD> ><META NAME="Generator" CONTENT="Microsoft MapPoint 2004"> > > > >Now I need to add a META line to force the browser to refresh every 5 >minutes as follow: > ><HEAD> ><META Http-Equiv="Refresh" CONTENT="300" /> ><META NAME="Generator" CONTENT="Microsoft MapPoint 2004"> > > >Any suggestion is greatly appreciated! > > >Thanks > > > >Bill > -- http://bytes.thinkersroom.com Dear Rad;
I'm new to this. Can you please elaborate a bit further? Assuming I have an existing HTML file in C:\temp\My.HTML How do I open it for editingt in VB.NET? Thanks again Bill Show quoteHide quote "Rad [Visual C# MVP]" <nospam@nospam.com> wrote in message news:oiqrm2tnd9l0emprv934veoh7vbk85462i@4ax.com... > Hey Bill, > > there is a HtmlMeta class that you can use to do just that! You put > the code in the Page_Load class and it will populate the tags for you > > Protected Sub Page_Load(ByVal sender As Object, ByVal e As > System.EventArgs) > > ' Create two instances of an HtmlMeta control. > Dim meta As New HtmlMeta() > > ' Get a reference to the page header element. > Dim head As HtmlHead = Page.Header > > ' Define an HTML <meta> element > hm1.Name = "keywords" > hm1.Content = "one, two, three" > head.Controls.Add(hm1) > > End Sub > > > > On Wed, 29 Nov 2006 10:24:58 -0800, "Bill Nguyen" > <billn_nospam_please@jaco.com> wrote: > >>The HTML doc looks like this: >> >><HTML xmlns:v="urn:schemas-microsoft-com:vml" >>xmlns:o="urn:schemas-microsoft-com:office:office"> >> >><HEAD> >><META NAME="Generator" CONTENT="Microsoft MapPoint 2004"> >> >> >> >>Now I need to add a META line to force the browser to refresh every 5 >>minutes as follow: >> >><HEAD> >><META Http-Equiv="Refresh" CONTENT="300" /> >><META NAME="Generator" CONTENT="Microsoft MapPoint 2004"> >> >> >>Any suggestion is greatly appreciated! >> >> >>Thanks >> >> >> >>Bill >> > -- > > Bits.Bytes. > http://bytes.thinkersroom.com
How do you translate your WinForms app? (outsourcing localization)
How to recognize a Command Line parameter? how to make cookies into an array? Looking for a simple explanation of how to walk through a dataset in .net 2.0 edit text in file using streamreader and string.replace Can't Figure Out why this array is out of bounds now! problem with join() Logic Troubles - reading in a difficult textfile Convert today's date and time to a long Its Urgent: I have export database into excel file if office not installed then it gives me error |
|||||||||||||||||||||||