Solved

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

Posted on 2007-11-20
11
1,332 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:BobCSD
  • 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:BobCSD
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:BobCSD
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:BobCSD
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 1

Author Comment

by:BobCSD
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:BobCSD
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:BobCSD
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:BobCSD
ID: 20323838
It does now. and it now works.

Thanks!


0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

705 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

19 Experts available now in Live!

Get 1:1 Help Now