|
 |
|
 |
11-08-2004, 11:36 AM
|
#1 (permalink)
|
|
Registered User
Join Date: Nov 2004
Posts: 43
|
ASP Links
Hi I'm totally new to ASP and was
1) wondering if someone could point me to a good tutorial. I've found a couple but they seem shorter than other language tutorials.
2) How do you link stuff using ASP?
Quote:
<a href="http://www.unco.edu/dss/testlink.asp?name=
<%
response.write(yourname)
%>
> Work? </a>
|
doesn't work, and:
Quote:
<%
response.write("<a href="http://www.unco.edu/dss/testlink.asp?name=" & yourname & ">Did this work?</a>"")
%>
|
Doesn't work either. I tried replacing the inner " marks with " but that didn't work either.
|
|
|
11-08-2004, 01:46 PM
|
#2 (permalink)
|
|
Masked Moderator
Join Date: May 2002
Location: Indianapolis, IN
Posts: 260
|
Well, your quotes in both are a little off, but I don't see any major issues:
Code:
<a href="http://www.unco.edu/dss/testlink.asp?name=<% response.write(yourname) %>">Work?</a>
Code:
<%
response.write("<a href='http://www.unco.edu/dss/testlink.asp?name=" & yourname & "'>Did this work?</a>")
%>
__________________
~Ryan
|
|
|
11-08-2004, 10:32 PM
|
#3 (permalink)
|
|
Registered User
Join Date: Nov 2004
Posts: 43
|
Ah thank you. So when you want to use quotes inside a quote you just use the single ' ?
|
|
|
11-09-2004, 07:41 AM
|
#4 (permalink)
|
|
Registered User
Join Date: Nov 2004
Posts: 43
|
I had another n00bie question if anyone can answer real quick: on an if/then statement in java, can there not be a line break in between them? I always thought when it compiled all the extra space was deleted but when I do put more than a space between the if and then parts it gives me a syntax error.
|
|
|
11-09-2004, 11:55 AM
|
#5 (permalink)
|
|
Masked Moderator
Join Date: May 2002
Location: Indianapolis, IN
Posts: 260
|
Quote:
|
Originally Posted by buchannon
Ah thank you. So when you want to use quotes inside a quote you just use the single ' ?
|
Thats correct. If you just have to use double quotes double them up like ""String"" and it will work that way for you as well.
Quote:
|
I had another n00bie question if anyone can answer real quick: on an if/then statement in java, can there not be a line break in between them? I always thought when it compiled all the extra space was deleted but when I do put more than a space between the if and then parts it gives me a syntax error.
|
I don't remember much about java, it has been about 3 years since i've even seen it. You should post your queston in the java forum. I'm sure those folks will be able to help you out.
__________________
~Ryan
|
|
|
11-09-2004, 11:57 AM
|
#6 (permalink)
|
|
Registered User
Join Date: Nov 2004
Posts: 43
|
I meant in VB not java sorry... I've noticed with java I can put crap anywhere it it always works, I'm totally new to VB and it seems to be picky about crap like line breaks and stuff... just wondering if there was a formal rule on it or something. Thanks!
|
|
|
11-09-2004, 11:59 AM
|
#7 (permalink)
|
|
Registered User
Join Date: Nov 2004
Posts: 43
|
PS, both of those are nice sites Ryan.
|
|
|
11-09-2004, 12:01 PM
|
#8 (permalink)
|
|
Masked Moderator
Join Date: May 2002
Location: Indianapolis, IN
Posts: 260
|
In VB if you have an if/then statement there can be multiple lines you just have to follow it with an end if
For example:
These 2 statements are valid:
Code:
If strVar <> "" Then Response.Write(strVar)
If strVar <> "" Then
Response.Write(strVar)
End If
This is invalid and will throw a compile error:
Code:
If strVar <> "" Then
Response.Write(strVar)
__________________
~Ryan
|
|
|
11-09-2004, 12:05 PM
|
#9 (permalink)
|
|
Moderator
Join Date: May 2002
Location: us.ca
Posts: 4,444
|
Quote:
|
Originally Posted by buchannon
PS, both of those are nice sites Ryan.
|
oh yeah, especially the beverley mitchell site 
__________________
Mike
|
|
|
11-09-2004, 12:13 PM
|
#10 (permalink)
|
|
Registered User
Join Date: Nov 2004
Posts: 43
|
haha... yeah...
Even when I was typing it:
Quote:
if
blar = 3
then
response.write("Are we having fun yet?")
end if
|
it gives me a syntax error. But when I move everything but the 'end if' to one line, it works fine.
|
|
|
11-09-2004, 12:16 PM
|
#11 (permalink)
|
|
Masked Moderator
Join Date: May 2002
Location: Indianapolis, IN
Posts: 260
|
Quote:
|
Originally Posted by sde
oh yeah, especially the beverley mitchell site 
|
Yea...unfortunately that site will be closing in Feb. 2005. I don't have much time to update it these days and hosting is costing my too much $$. Since I use a ton of bandwidth and get so many hits, there realy is no cheap windows hosting alterntive. So I decided to close the site when my hsoting contract is up.
So it will be closed for good unless someone wants to buy it from me
__________________
~Ryan
|
|
|
11-09-2004, 12:17 PM
|
#12 (permalink)
|
|
Masked Moderator
Join Date: May 2002
Location: Indianapolis, IN
Posts: 260
|
Quote:
|
Originally Posted by buchannon
haha... yeah...
Even when I was typing it:
it gives me a syntax error. But when I move everything but the 'end if' to one line, it works fine.
|
Yea you can't separate it all like that unfortunately
__________________
~Ryan
|
|
|
11-09-2004, 12:24 PM
|
#13 (permalink)
|
|
Registered User
Join Date: Nov 2004
Posts: 43
|
Ah ok thank you again rdove
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -8. The time now is 01:53 PM.
|
Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
|
 |
|