|
-
Oct 7th, 2002, 11:36 AM
#1
Thread Starter
PowerPoster
Document Title
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?
-
Oct 7th, 2002, 11:38 AM
#2
<?="Moderator"?>
Code:
<%
dim pagetitle
pagetitle = "ASP Page 1"
%>
<html>
<head>
<title><%=pagetitle%></title>
</head>
<body>
<%
response.write "Your page is called " & pagetitle
%>
</body>
</html>
do u mean something like that?
-
Oct 7th, 2002, 12:04 PM
#3
Thread Starter
PowerPoster
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?
-
Oct 7th, 2002, 01:08 PM
#4
PowerPoster
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.
-
Oct 7th, 2002, 08:44 PM
#5
Black Cat
ASP doesn't really have any special knowledge of the HTML or anything else you use it to generate, so no.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|