[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2007-11-20
11
Medium Priority
?
1,382 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 2

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 2

Author Comment

by:Starr Duskk
ID: 20323549
I want to know how to define it, assign it, use it please.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Expert Comment

by:DotNetThinker
ID: 20323565
my bad,

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

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
 
LVL 2

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 2

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 2

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 2000 total points
ID: 20323718
Does the class inherit from System.Web.UI.Page?
0
 
LVL 2

Author Comment

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

Thanks!


0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Loops Section Overview
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month18 days, 18 hours left to enroll

834 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