Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > search engine ASP script - GET vs POST

Reply
Thread Tools

search engine ASP script - GET vs POST

 
 
Kevin Blount
Guest
Posts: n/a
 
      04-08-2005
I love Google groups, you can find answers to ALL your questions here..
right?

I'm building a search script in ASP (not progressed to ASP.NET just
yet) and everything works. The problem I was having though was when
users move through the different pages of a set of returned results,
and then pres the browser "Back" button, they saw the "Warning: Page
has Expired" message, and had to refresh.

I fixed this by changing my form from POST to GET and now users can go
back through their browsers history and see previous pages of results.

But, and you know what's coming, GET is fugly!! I don't want all that
garbage in my URL, spoiling a nice pretty website. So, here's the
question (though I suspect I know the answer <frown>):

Is there a way to use GET but still POST the form entries? or maybe use
POST but append 1 item to the URL?

I wondering if using a temp (i.e. without an expiry date) cookie could
contain most of the info, such as search string, scope, language, etc,
and just keeping page=X in the URL. That I could live with and stick
with GET. but if I can get rid of ALL pairs from the URL, and/or go
back to using POST without the "Warning: Page has Expired" message,
then that would be ideal!

any thoughts, hints, links, etc would be most appreciated.

Kevin

 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      04-09-2005
Kevin Blount wrote:
> I love Google groups, you can find answers to ALL your questions
> here.. right?
>
> I'm building a search script in ASP (not progressed to ASP.NET just
> yet) and everything works. The problem I was having though was when
> users move through the different pages of a set of returned results,
> and then pres the browser "Back" button, they saw the "Warning: Page
> has Expired" message, and had to refresh.
>
> I fixed this by changing my form from POST to GET and now users can go
> back through their browsers history and see previous pages of results.
>
> But, and you know what's coming, GET is fugly!! I don't want all that
> garbage in my URL, spoiling a nice pretty website. So, here's the
> question (though I suspect I know the answer <frown>):
>
> Is there a way to use GET but still POST the form entries? or maybe
> use POST but append 1 item to the URL?
>
> I wondering if using a temp (i.e. without an expiry date) cookie could
> contain most of the info, such as search string, scope, language, etc,
> and just keeping page=X in the URL. That I could live with and stick
> with GET. but if I can get rid of ALL pairs from the URL, and/or go
> back to using POST without the "Warning: Page has Expired" message,
> then that would be ideal!
>
> any thoughts, hints, links, etc would be most appreciated.
>
> Kevin


You can use client-side code to modify your form's action attribute, adding
querystring values to it, regardless of what your form's method is. Please
follow up in a client-side scripting newsgroup, such as .scripting.jscript.

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
 
 
 
Kevin Blount
Guest
Posts: n/a
 
      04-09-2005
Bob, your message is a tease can you be more specific here, in this
newsgroup, otherwise the information you've given isn't enough for me
to pose the new question in script.jscript (shudder), as per your
"instruction".

 
Reply With Quote
 
Jeff Cochran
Guest
Posts: n/a
 
      04-11-2005
On 9 Apr 2005 05:25:58 -0700, "Kevin Blount" <(E-Mail Removed)>
wrote:

>Bob, your message is a tease can you be more specific here, in this
>newsgroup, otherwise the information you've given isn't enough for me
>to pose the new question in script.jscript (shudder), as per your
>"instruction".


Modify the form information returned by the client for the page, so
that your page receives the form information back when you reload the
page. The actual coding is client-side, basically simple HTML, so not
on topic here and better results would be had in a client-side group.

Basically, server-side on a new submission the form is blank. On a
return, the fields are populated in the form so that information gets
sent to the server, which then reads the values with the Request.Form
method and populates the form for resubmission. Usually a hidden
field is used to check if this is the first submission, and if not,
read the values and populate the form.

Jeff
 
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
Search jobs at world's largest online job search engine. Findresources for all types of solomanjo@gmail.com Computer Support 0 03-13-2008 12:00 PM
Search jobs at world's largest online job search engine. Findresources for all types of solomanjo@gmail.com Digital Photography 0 03-13-2008 11:49 AM
.Net Search Engine - Has anyone used dtSearch .Net Engine? Sasha ASP .Net 3 05-22-2007 04:20 PM
search within a search within a search - looking for better way...my script times out Abby Lee ASP General 5 08-02-2004 04:01 PM



Advertisments