Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > String contains ?

Reply
Thread Tools

String contains ?

 
 
Greg
Guest
Posts: n/a
 
      11-09-2004
Hello,

If a visitor doesn't put anything in the "Search" text box I'd like them to
be redirected to where they came from before the search form forwarded them
to the search.asp page. Therefore I've put the following at the top of
search.asp to do this.


The problem is however, that if


 
Reply With Quote
 
 
 
 
Greg
Guest
Posts: n/a
 
      11-09-2004
Sorry, didn't finish did i?! Here we go....

Hello,

If a visitor doesn't put anything in the "Search" text box I'd like them to
be redirected to where they came from before the search form forwarded them
to the search.asp page. Therefore I've put the right stuff at the top of
search.asp to do this.


The problem is however, if the last thing they did was search for something
it will redirect them to the search page, which will redirect them to the
search page, which will redirect them to the search page etc. and the
operation times out. I tried to get over this by using a variable passed to
the search page, if it's the search page that is forwarding it on. If this
variable was set it would redirect it instead to index.asp - however, it
caused problems because I was attaching ?StopTimeout=1 to the end of the
Response.Redirect URL - causing problems if the URL to redirect to already
contained the ? character and some variables. Essentially I want a way of
working out if the referring page contains a ? or not, so I know whether I
have to do ?StopTimeout=1 or &StopTimeout=1 - know what I mean?

Regards
Greg


 
Reply With Quote
 
 
 
 
Stuart Palmer
Guest
Posts: n/a
 
      11-09-2004
How are you redirecting to previous page? A hidden field on the form you
pass through?
Sounds like you need to compare this against your search path and if it's
the same, don't redirect.

Think thats what you need to do.

Stu



"Greg" <> wrote in message
news:%23N$...
> Sorry, didn't finish did i?! Here we go....
>
> Hello,
>
> If a visitor doesn't put anything in the "Search" text box I'd like them

to
> be redirected to where they came from before the search form forwarded

them
> to the search.asp page. Therefore I've put the right stuff at the top of
> search.asp to do this.
>
>
> The problem is however, if the last thing they did was search for

something
> it will redirect them to the search page, which will redirect them to the
> search page, which will redirect them to the search page etc. and the
> operation times out. I tried to get over this by using a variable passed

to
> the search page, if it's the search page that is forwarding it on. If this
> variable was set it would redirect it instead to index.asp - however, it
> caused problems because I was attaching ?StopTimeout=1 to the end of the
> Response.Redirect URL - causing problems if the URL to redirect to already
> contained the ? character and some variables. Essentially I want a way of
> working out if the referring page contains a ? or not, so I know whether I
> have to do ?StopTimeout=1 or &StopTimeout=1 - know what I mean?
>
> Regards
> Greg
>
>



 
Reply With Quote
 
Hal Rosser
Guest
Posts: n/a
 
      11-09-2004

"Greg" <> wrote in message
news:...
> Hello,
>
> If a visitor doesn't put anything in the "Search" text box I'd like them

to
> be redirected to where they came from before the search form forwarded

them
> to the search.asp page. Therefore I've put the following at the top of
> search.asp to do this.
>
>
> The problem is however, that if
>


this problem is best solved with javascript on the client side



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.788 / Virus Database: 533 - Release Date: 11/1/2004


 
Reply With Quote
 
Jeff Dillon
Guest
Posts: n/a
 
      11-10-2004
What? Do you have search.htm and search.asp??

Where is the search form? Is search.asp the search form?

Jeff
"Greg" <> wrote in message
news:#N$...
> Sorry, didn't finish did i?! Here we go....
>
> Hello,
>
> If a visitor doesn't put anything in the "Search" text box I'd like them

to
> be redirected to where they came from before the search form forwarded

them
> to the search.asp page. Therefore I've put the right stuff at the top of
> search.asp to do this.
>
>
> The problem is however, if the last thing they did was search for

something
> it will redirect them to the search page, which will redirect them to the
> search page, which will redirect them to the search page etc. and the
> operation times out. I tried to get over this by using a variable passed

to
> the search page, if it's the search page that is forwarding it on. If this
> variable was set it would redirect it instead to index.asp - however, it
> caused problems because I was attaching ?StopTimeout=1 to the end of the
> Response.Redirect URL - causing problems if the URL to redirect to already
> contained the ? character and some variables. Essentially I want a way of
> working out if the referring page contains a ? or not, so I know whether I
> have to do ?StopTimeout=1 or &StopTimeout=1 - know what I mean?
>
> Regards
> Greg
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
any STL/string function available for determing string contains numeric nishit.gupta@st.com C++ 14 04-06-2007 01:00 PM
Help: what is the quickest way to find out whether a string contains another string? tuweiwen@gmail.com Java 17 12-06-2005 01:04 PM
check if string contains numeric, and check string length of numeric value ief@specialfruit.be C++ 5 06-30-2005 01:08 PM
Big O and algorithm to decide string A contains string B? usgog@yahoo.com C++ 15 04-10-2005 03:03 AM
Regex problem, match if line contains <a>, unless it also contains <b> James Dyer Perl 5 02-20-2004 12:29 PM



Advertisments