I'm just barely learning ASP, so bear with me if this is a really simple problem.
Is there a way to get the title of the page into a variable so that I can write it to the page wherever I want?
Printable View
I'm just barely learning ASP, so bear with me if this is a really simple problem.
Is there a way to get the title of the page into a variable so that I can write it to the page wherever I want?
do u mean something like that?Code:<%
dim pagetitle
pagetitle = "ASP Page 1"
%>
<html>
<head>
<title><%=pagetitle%></title>
</head>
<body>
<%
response.write "Your page is called " & pagetitle
%>
</body>
</html>
Yes, something like that, but I don't want to declare what the title of the page is in a variable first. Isn't there a function or something that will return the title? Like Document.Title or something like that? I know that document.title doesn't work (i've tried) but shouldn't there be something like that?
I am not certain, but you could try Javascript. I am sorry but I am not an expert on JS, so you will have to ask somebody else.
BTW, I think "Document.Title" or a slight variation should work in JS, just confirm it.
ASP doesn't really have any special knowledge of the HTML or anything else you use it to generate, so no.