a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

ASP Case Statement to VBSCRIPT Statement

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> General Web Development >> ASP Case Statement to VBSCRIPT Statement
Page: [1]
 
SerenityNet

 

Posts: 1372
Joined: 6/12/2001
From: Allen, TX, USA
Status: offline

 
ASP Case Statement to VBSCRIPT Statement - 5/25/2006 0:32:47   
I'm trying to modify a script written in VBSCRIPT
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>

My ASP "Case" statements don't work.  Will someone please tell me how to write the equivalent to my ASP code (shown below) in VBSCRIPT?

Or is there a way to declare to the sever, within a bunch of VBSCRIPT code, that a section is written in ASP

Thanks,
Andrew

<% 
    Dim View
    View = Request.QueryString("View")
    Select Case View
        Case "EN"   %>
            <!--#include file="resources-english.txt" -->
    <%  Case Else %>
            <!--#include file="resources-spanish.txt" -->
    <% End Select
%>


< Message edited by SerenityNet -- 5/25/2006 0:38:48 >


_____________________________

</Chaos, panic, & disorder - my work here is done.>
Spooky

 

Posts: 26617
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: ASP Case Statement to VBSCRIPT Statement - 5/25/2006 1:39:31   
What you are displaying is an asp page written in vbscript. asp itself is not a language :)

Whats the error you are getting? or what doesnt work?

It is case sensitive, so you would need to do this :
View = ucase(Request.QueryString("View"))

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§ş:)


(in reply to SerenityNet)
SerenityNet

 

Posts: 1372
Joined: 6/12/2001
From: Allen, TX, USA
Status: offline

 
RE: ASP Case Statement to VBSCRIPT Statement - 5/25/2006 8:33:04   
I didn't realize it was case sensitive, although my the case in the querystring match the case in my script. Anyway, it stil doesn't work.

I'm getting an HTTP500 Internal Server Error.

My querysting is:
http://www.myweb.com/mysubweb/site.asp?View=EN
or
http://mysubweb.myweb.com/site.asp?View=EN
as I'm running it in a subweb.

When I have the following then I get the HTTP500 error.
<%
    Dim View
    View = ucase(Request.QueryString("View"))
    Select Case View
        Case "EN"   %>
            <!--#include file="resources-english.txt" -->
    <%  Case Else %>
            <!--#include file="resources-spanish.txt" -->
    <%  End Select
%>

When I have just the include line then it works fine - although only in spanish.
<!--#include file="resources-spanish.txt" -->

I'm stumped.


_____________________________

</Chaos, panic, & disorder - my work here is done.>

(in reply to Spooky)
den57

 

Posts: 25
Joined: 12/5/2005
Status: offline

 
RE: ASP Case Statement to VBSCRIPT Statement - 5/25/2006 21:29:22   
Try this
<%If ucase(Request.QueryString("View")) = "EN" then %>
<!--#include file="resources-english.txt" -->
<%Else%>
<!--#include file="resources-spanish.txt" -->
<%end if%>

(in reply to SerenityNet)
SerenityNet

 

Posts: 1372
Joined: 6/12/2001
From: Allen, TX, USA
Status: offline

 
RE: ASP Case Statement to VBSCRIPT Statement - 5/26/2006 1:20:39   
Thanks Dennis. It turns out that the issue was not the case statement itself, but that it was implemented in a frameset.  The same happened when I tried the IF statement.  

Spooky helped me via PM and we got the matter solved.  Per Spooky, "As it was a frameset, the action of loading the differing frames reset the language to blank (which was ES) as the querystring wasnt included with any action." By setting a session variable, it worked.

Thanks,
Andrew


_____________________________

</Chaos, panic, & disorder - my work here is done.>

(in reply to den57)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> General Web Development >> ASP Case Statement to VBSCRIPT Statement
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts