Re: Altenative of PHP Function "Unset" in ASP
From: Karl Seguin (_at_)
Date: 10/22/04
- Next message: Wayne: "Cant run ASP.NET Web Application"
- Previous message: ES: "VS 2003 hang saving .aspx file or switching design view"
- In reply to: fasanay_at_yahoo.com: "Altenative of PHP Function "Unset" in ASP"
- Next in thread: fasanay_at_yahoo.com: "Re: Altenative of PHP Function "Unset" in ASP..Thanks Karl"
- Reply: fasanay_at_yahoo.com: "Re: Altenative of PHP Function "Unset" in ASP..Thanks Karl"
- Messages sorted by: [ date ] [ thread ]
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>"; > } > } >
- Next message: Wayne: "Cant run ASP.NET Web Application"
- Previous message: ES: "VS 2003 hang saving .aspx file or switching design view"
- In reply to: fasanay_at_yahoo.com: "Altenative of PHP Function "Unset" in ASP"
- Next in thread: fasanay_at_yahoo.com: "Re: Altenative of PHP Function "Unset" in ASP..Thanks Karl"
- Reply: fasanay_at_yahoo.com: "Re: Altenative of PHP Function "Unset" in ASP..Thanks Karl"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|