Solved

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

Posted on 2007-11-20
11
1,343 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 
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 500 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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 …
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

860 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