Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 11-08-2004, 11:36 AM   #1 (permalink)
buchannon
Registered User
 
buchannon's Avatar
 
Join Date: Nov 2004
Posts: 43
buchannon is on a distinguished road
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.
buchannon is offline   Reply With Quote
Old 11-08-2004, 01:46 PM   #2 (permalink)
rdove
Masked Moderator
 
rdove's Avatar
 
Join Date: May 2002
Location: Indianapolis, IN
Posts: 260
rdove is on a distinguished road
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

rdove is offline   Reply With Quote
Old 11-08-2004, 10:32 PM   #3 (permalink)
buchannon
Registered User
 
buchannon's Avatar
 
Join Date: Nov 2004
Posts: 43
buchannon is on a distinguished road
Ah thank you. So when you want to use quotes inside a quote you just use the single ' ?
buchannon is offline   Reply With Quote
Old 11-09-2004, 07:41 AM   #4 (permalink)
buchannon
Registered User
 
buchannon's Avatar
 
Join Date: Nov 2004
Posts: 43
buchannon is on a distinguished road
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.
buchannon is offline   Reply With Quote
Old 11-09-2004, 11:55 AM   #5 (permalink)
rdove
Masked Moderator
 
rdove's Avatar
 
Join Date: May 2002
Location: Indianapolis, IN
Posts: 260
rdove is on a distinguished road
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

rdove is offline   Reply With Quote
Old 11-09-2004, 11:57 AM   #6 (permalink)
buchannon
Registered User
 
buchannon's Avatar
 
Join Date: Nov 2004
Posts: 43
buchannon is on a distinguished road
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!
buchannon is offline   Reply With Quote
Old 11-09-2004, 11:59 AM   #7 (permalink)
buchannon
Registered User
 
buchannon's Avatar
 
Join Date: Nov 2004
Posts: 43
buchannon is on a distinguished road
PS, both of those are nice sites Ryan.
buchannon is offline   Reply With Quote
Old 11-09-2004, 12:01 PM   #8 (permalink)
rdove
Masked Moderator
 
rdove's Avatar
 
Join Date: May 2002
Location: Indianapolis, IN
Posts: 260
rdove is on a distinguished road
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

rdove is offline   Reply With Quote
Old 11-09-2004, 12:05 PM   #9 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
Quote:
Originally Posted by buchannon
PS, both of those are nice sites Ryan.
oh yeah, especially the beverley mitchell site
__________________
Mike
sde is offline   Reply With Quote
Old 11-09-2004, 12:13 PM   #10 (permalink)
buchannon
Registered User
 
buchannon's Avatar
 
Join Date: Nov 2004
Posts: 43
buchannon is on a distinguished road
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.
buchannon is offline   Reply With Quote
Old 11-09-2004, 12:16 PM   #11 (permalink)
rdove
Masked Moderator
 
rdove's Avatar
 
Join Date: May 2002
Location: Indianapolis, IN
Posts: 260
rdove is on a distinguished road
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

rdove is offline   Reply With Quote
Old 11-09-2004, 12:17 PM   #12 (permalink)
rdove
Masked Moderator
 
rdove's Avatar
 
Join Date: May 2002
Location: Indianapolis, IN
Posts: 260
rdove is on a distinguished road
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

rdove is offline   Reply With Quote
Old 11-09-2004, 12:24 PM   #13 (permalink)
buchannon
Registered User
 
buchannon's Avatar
 
Join Date: Nov 2004
Posts: 43
buchannon is on a distinguished road
Ah ok thank you again rdove
buchannon is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
New Tutorials: ASP Strings, and Visual Studio/VB.NET sde Code Newbie News 0 03-25-2004 06:37 PM
New Java and ASP Tutorials sde Code Newbie News 2 03-15-2004 08:02 PM
Php Vs. Asp sde PHP 6 06-06-2003 06:02 PM


All times are GMT -8. The time now is 01:53 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting