Re: Altenative of PHP Function "Unset" in ASP

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Karl Seguin (_at_)
Date: 10/22/04


Date: Fri, 22 Oct 2004 12:10:52 -0400

I take it you are talking about ASP.Net...you won't be able to unset
Request.Param values in ASP.Net since these values are in a readonly
collection. From the brief code you've shown, I take it you want to
"unset" these values because you are looping through the collection and
don't want them to show up in your dump. You'll have to create an string[]
of keys you don't want and as you are looping through the collection, make
sure the key isn't in your string[].

Karl

-- 
MY ASP.Net tutorials
http://www.openmymind.net/
<fasanay@yahoo.com> wrote in message news:clb8a102qfl@drn.newsguy.com...
> Hi everybody I have got the following PHP code which I am trying to
convert to
> ASP any help will be appreciated...I have done most of it but I cant find
a
> replace function for Unset in asp which will discard the variable
alltogether...
>
>
> if ($categoryid == "all")
> {
>      $sql = "SELECT * FROM products where shopinspection=$shopinspection";
>   unset($HTTP_POST_VARS['categoryid']);
>   unset($HTTP_POST_VARS['shopinspection']);
> }
> else
> {
>      $sql = "SELECT * FROM products where categoryid = $categoryid";
> unset($HTTP_POST_VARS['categoryid']);
> }
>  unset($HTTP_POST_VARS['Submit']);
>  while (list($key, $value) = each($HTTP_POST_VARS))
>  {
>    if ($value != "" )
>     {
>    $sql = $sql .=" AND $key=$value";
>    //$sql = $sql .=" AND solesource = $solesource";
>    //echo "<strong>$value</strong>";
> }
> }
>


Relevant Pages

  • Re: Altenative of PHP Function "Unset" in ASP..Thanks Karl
    ... I'm considered that you are talking about ASP and not ASP.Net (even though ... Private Function ItemExistsInArray(ByVal item As String, ... > thanks Karl but can you give me an example on how to do it I am including ... >>I take it you are talking about ASP.Net...you won't be able to unset ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Store a char into an integer variable
    ... I entered "Awheofhoeafh" at the prompt and got that number. ... The entered string /isn't/ being converted to an integer. ... you use scanf() to read your data. ... leave the unset variables unset, ...
    (comp.lang.c)
  • NULL value (was Re: merging variables and arrays ...)
    ... puts; # Error ... IOW, a NULL alone has no string rep, however when used with string ... operations it is rendered as the canonical form. ... love to see it used as synonymous for [unset], ...
    (comp.lang.tcl)
  • Re: variable unset, or not
    ... this will test whether a variable is unset: ... > (The underscore is an arbitrary choice of string with non zero length) ...
    (comp.unix.shell)
  • Re: nulls versus ?
    ... does anyone know of a resource which discusses the merits of using "nulls" ... unknown or unset date, ... For a string ...
    (microsoft.public.dotnet.languages.csharp)