• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 167
  • Last Modified:

ASP - removeKey()

What is the syntax of the removeKey() method ?

I want to delete several variables contained in the URL and I tried like below, but it doesn't work !!!

removeKey(Request.ServerVariables("QUERY_STRING"), "COM_LIGNE", "COM_QUANT").
0
netf_ds
Asked:
netf_ds
  • 3
  • 3
1 Solution
 
sybeCommented:
ServerVariables are read-only

Maybe this will work:

MyVar = Request.ServerVariables("QUERY_STRING")

removeKey(MyVar, "COM_LIGNE", "COM_QUANT")

But I could not find the removeKey function, so I am not sure
0
 
netf_dsAuthor Commented:
Sorry, but it doesn't change anything !

Microsoft VBScript runtime error '800a01c2'

Wrong number of arguments or invalid property assignment: 'removeKey'

0
 
sybeCommented:
I think you must have removeKey() defined somewhere in your code. Maybe in some include, or in the global.asa

Look there for how the sub or function is defined.

Your error message suggests that you should not pass 3 parameters to the function. Try passing 2 or 4 parameters.


this is what I get when I use your code:

=======================
Microsoft VBScript compilation error '800a0414'

Cannot use parens when calling a Sub

/asp/test/removekey.asp, line 5

removeKey(Request.ServerVariables("QUERY_STRING"), "COM_LIGNE", "COM_QUANT")
===============================


0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
netf_dsAuthor Commented:
Oooops,

You're right sybe : removeKey was a function I didn't saw in my application and not a predifined function (that's why we both didn't find any reference !). In fact it's not really my application, someone else began it and I was asked to finish it.

OK, if you want to earn the 50 points, I think you have to return me a blank answer.
0
 
sybeCommented:
ok
0
 
netf_dsAuthor Commented:
I finaly wrote :

removeKey(removeKey(Request.ServerVariables("QUERY_STRING"), "COM_QUANT"), "COM_LIGNE")
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now