asp code problems

  • Thread starter Thread starter matt shudy
  • Start date Start date
M

matt shudy

Hi,

I currently have this code in an upload.asp page
any suggestions on how I pass this variable to my conf.asp
page?
i am using fp 2000 and aspupload

thanks,
matt

Session("Name") = "File Name" & Response.Write
File.FileName

and it throws this error

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/enveng/flashreports/Upload.asp, line 14

Session("Name") = "File Name" & Response.Write
File.FileName
^

With the arrow pointing at "File"
 
He's using VB. Additionally, while a good practice, semi-colons at the end
of a statement are not required in J(ava)Script.

Bob Lehmann
 
Wish I would have said that :>)

Bob Lehmann

Jim Cheshire said:
You can't set a session variable to equal a Response.Write value.
Response.Write outputs a value to the response stream.

What you should do is likely this:

Session("Name") = "File Name" & File.FileName

--
Jim Cheshire
Jimco Add-ins
Add-ins for FrontPage 2000-2003
http://www.jimcoaddins.com
===============================
Co-author of Special Edition
Using Microsoft FrontPage 2003


cause
 
Yeah, I wondered why you didn't. :)

I was just trying to explain a bit to him about why it doesn't work.

--
Jim Cheshire
Jimco Add-ins
Add-ins for FrontPage 2000-2003
http://www.jimcoaddins.com
===============================
Co-author of Special Edition
Using Microsoft FrontPage 2003
 
Also make "File Name" one word or add a underscore in place of the space.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
The Session variable is just a variant, so it will store that value as a
string without issues. A space between the words is fine.

--
Jim Cheshire
Jimco Add-ins
Add-ins for FrontPage 2000-2003
http://www.jimcoaddins.com
===============================
Co-author of Special Edition
Using Microsoft FrontPage 2003
 
Session("Name") = File.FileName

Response.Write File.FileName

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
Back
Top