Home > ASP Development > How to replace a <title> .... </title> contents and insert our own <title>contents by

How to replace a <title> .... </title> contents and insert our own <title>contents by



Hi Friends!



Is it possible to replace a line from a HTML file like



"<title> and its inside contents </title>"



by our own



"<title> our own contents </title>"



using an Interface.....



that is,



we have a form,that has



file : File path

title: "one text box"



while Submitting it will replace the <title> tag contents of the file we r specified..by the given title.



plz tell ur suggestions.....

    
Guest


like this:
<title><%=variable_to_be_displayed_in_tiltle%></title>

Was this answer helpful ? Yes No   
Guest


not sure just try it
<title><%=request("title")%></title>

Was this answer helpful ? Yes No   
Guest


Quote:
Originally Posted by shaileshdubey
not sure just try it

<title><%=request("title")%></title>




if v given like this,

is it will replce a tiltle already there on the File sir?

Was this answer helpful ? Yes No   
Guest


<title><%=variable_to_be_displayed_in_tiltle%></title>



if v given like this,

is it will replce a tiltle already there on the File sir?

Was this answer helpful ? Yes No   
Guest


Open that file using filesystem object then

Use RegX to Match <title></title> and replace it with yours.

Or Read file line by line...find string between <title></title> using Instr() and Mid() function in VBScript and replace that one with yours.



The solution given by above two users will also work...but ask them how to permanatly assign title ??

As the code they are suggesting is useful only up to session/Application is there ..after that?? Suppose I restart server and then visited page then?

And the solution given works only for ASP pages..

What about HTML pages??

Was this answer helpful ? Yes No   
Guest
 
 
Home - About Infoqu - Contact - Privacy Statement - Link to Infoqu - Bookmark Infoqu

Copyright 2007-2008 by Infoqu. All rights reserved