Solved

request.servervariables("SCRIPT_NAME") asp.net version

Posted on 2007-11-20
11
1,336 Views
Last Modified: 2008-02-01
Please show me how to retrieve the vb asp.net version of this from asp classic:

request.servervariables("SCRIPT_NAME")

thanks!
0
Comment
Question by:Starr Duskk
  • 7
  • 4
11 Comments
 
LVL 11

Expert Comment

by:DotNetThinker
ID: 20323528
C#: Request.ServerVariables["Name"]
VB: Request.ServerVariables("Name")
0
 
LVL 1

Author Comment

by:Starr Duskk
ID: 20323546
That's exactly what I already have and asked how to define/retrieve:

request.servervariables("SCRIPT_NAME")
0
 
LVL 1

Author Comment

by:Starr Duskk
ID: 20323549
I want to know how to define it, assign it, use it please.
0
 
LVL 11

Expert Comment

by:DotNetThinker
ID: 20323565
my bad,

Request.ServerVariables.Add("Name", "Value")
0
 
LVL 1

Author Comment

by:Starr Duskk
ID: 20323623
You're not answering my question.

How do I dim and find the value of the "SCRIPT_NAME"

I don't know how many other ways I can ask the same question.


0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Author Comment

by:Starr Duskk
ID: 20323630
Here is an example that doesn't work. I need to know how to dim it (define it), and retrieve it.

dim scriptname as request.servervariables("SCRIPT_NAME")
0
 
LVL 11

Expert Comment

by:DotNetThinker
ID: 20323642
try to take it easy, you asked how to get the value so I told you, you asked how to assign the value so I told you. If you want to assign the value to a variable you can just ask.




Dim Value as String = Request.ServerVariables("SCRIPT_NAME")

Open in new window

0
 
LVL 1

Author Comment

by:Starr Duskk
ID: 20323696
I've tried that. That's why I'm asking here. That doesn't work.

The word "Request" is squiggly underlined.
0
 
LVL 1

Author Comment

by:Starr Duskk
ID: 20323703
I am trying to add this to my class and it is saying "Name 'Request' is not declared."
0
 
LVL 11

Accepted Solution

by:
DotNetThinker earned 500 total points
ID: 20323718
Does the class inherit from System.Web.UI.Page?
0
 
LVL 1

Author Comment

by:Starr Duskk
ID: 20323838
It does now. and it now works.

Thanks!


0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Auto refresh part of an MVC5 View 7 59
Remove greater than sign 3 44
Help with C#, MVC, razor. 6 23
IIS Authorization for Web Service 2 22
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now