Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page title as a parameter

Status
Not open for further replies.

eyal

Programmer
May 15, 2000
38
IL
Hi,<br>in ASP code, how can I know the page title that I'm currenly in?<br>In other words, can I define a parameter (srtTitle) and store the title string in it (strTitle=title)?<br>Thanks<br>Eyal
 
Dear Eyal,<br><br>If the 'title' entity you are referring to is the contents of the documents &lt;title&gt;&lt;/title&gt; tags, the answer is no.<br><br>That entity only exists in the DOM which in turn only exists in the browser. ASP is a server side process therefore there is no browser and therefore no DOM from which to obtain the 'document' object nor it's 'title' element.<br><br>You could inverse your question though.<br><br>&lt;% var sTitle = &quot;My Server Side Title&quot;; %&gt;<br>&lt;title&gt;&lt;%=sTitle%&gt;&lt;/title&gt;<br><br>Hope this helps<br>-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top