Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: How to display the searched keyword


Message #1 by "Alan Chiu" <achiu@m...> on Fri, 18 May 2001 16:31:35 -0400
Hi,



I'm right now writing the "SearchResult.asp" page for the  search 

engine, which we are going to use Microsoft Index Server as the Search 

Engine.



 I'll appreciate very much if somebody can tell me how does GOOGLE 

display the keywords, typed in the search text box by users,  in their 

search result page.



When you do a search with Google, after typing the keyword (i.e. Index 

Server) then you click the Google Search button. Next will show you the 

search result page. On top of the page you see your keyword is being 

displayed on the blue bar (i.e. Searched the web for Index Server.). 

Thanks.



Alan

Message #2 by "Daniel O'Dorisio" <dodorisio@h...> on Sun, 20 May 2001 15:08:54 -0400
if you are talking about the application bar (top bar with the close

minimise and resore buttons) they do that by probally a querystring...

so for example they did something like:



<TITLE>Google Search: <%=Request.Querystring("q")%></TITLE>



for the light blue bar that is part of the actual html page, they did the

same thing probally. they grabbed the value of the querystring like:



<TD bgcolor="#hexforltbl">

Searched the web for: <%=REquest.Querystring("q")

</TD>



hth



daniel



Daniel O'Dorisio

dodorisio@h...

xxx-xxx-xxxx





-----Original Message-----

From: Alan Chiu [mailto:achiu@m...]

Sent: Friday, May 18, 2001 4:32 PM

To: ASP Web HowTo

Subject: [asp_web_howto] How to display the searched keyword





Hi,



I'm right now writing the "SearchResult.asp" page for the  search 

engine, which we are going to use Microsoft Index Server as the Search 

Engine.



 I'll appreciate very much if somebody can tell me how does GOOGLE 

display the keywords, typed in the search text box by users,  in their 

search result page.



When you do a search with Google, after typing the keyword (i.e. Index 

Server) then you click the Google Search button. Next will show you the 

search result page. On top of the page you see your keyword is being 

displayed on the blue bar (i.e. Searched the web for Index Server.). 

Thanks.



Alan



Message #3 by achiu@m... on Mon, 21 May 2001 18:40:26
Daniel,



Thank you for the hints. I need one more help, do you know how Google make 

their bottom search navigation bars? (Result Page: Previous 1 2 3 ... 17 

18 19  Next). Thanks.



Alan





> if you are talking about the application bar (top bar with the close

> minimise and resore buttons) they do that by probally a querystring...

> so for example they did something like:

> 

> <TITLE>Google Search: <%=Request.Querystring("q")%></TITLE>

> 

> for the light blue bar that is part of the actual html page, they did the

> same thing probally. they grabbed the value of the querystring like:

> 

> <TD bgcolor="#hexforltbl">

> Searched the web for: <%=REquest.Querystring("q")

> </TD>

> 

> hth

> 

> daniel

> 

> Daniel O'Dorisio

> dodorisio@h...

> xxx-xxx-xxxx

> 

> 

> -----Original Message-----

> From: Alan Chiu [mailto:achiu@m...]

> Sent: Friday, May 18, 2001 4:32 PM

> To: ASP Web HowTo

> Subject: [asp_web_howto] How to display the searched keyword

> 

> 

> Hi,

> 

> I'm right now writing the "SearchResult.asp" page for the  search 

> engine, which we are going to use Microsoft Index Server as the Search 

> Engine.

> 

>  I'll appreciate very much if somebody can tell me how does GOOGLE 

> display the keywords, typed in the search text box by users,  in their 

> search result page.

> 

> When you do a search with Google, after typing the keyword (i.e. Index 

> Server) then you click the Google Search button. Next will show you the 

> search result page. On top of the page you see your keyword is being 

> displayed on the blue bar (i.e. Searched the web for Index Server.). 

> Thanks.

> 

> Alan

> 

Message #4 by "Daniel O'Dorisio" <dodorisio@h...> on Mon, 21 May 2001 22:05:05 -0400
that i am not sure of... i guess if the results are coming from a db they

used recordset paging.



but that would only be if they were coming from a db sql query..



<%@ EnableSessionState=False Language=VBScript %>

<%

set conn = Server.CreateObject("ADODB.Connection")

conn.Open "DSN=AdvWorks"



set rs = Server.CreateObject("ADODB.Recordset")

rs.CursorLocation = 3  ' adUseClient

rs.Open "Select * from Employees", conn

rs.PageSize = 2

intPageCount = rs.PageCount



Select Case Request("Action")

	case "<<"

		intpage = 1

	case "<"

		intpage = Request("intpage")-1

		if intpage < 1 then intpage = 1

	case ">"

		intpage = Request("intpage")+1

		if intpage > intPageCount then intpage = IntPageCount

	Case ">>"

		intpage = intPageCount

	case else

		intpage = 1

end select

%>

<HTML>

<HEAD>

<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">

<TITLE>ASP & ADO Paging</TITLE>

</HEAD>

<BODY bgColor=White text=Black>



<%

rs.AbsolutePage = intPage

For intRecord = 1 To rs.PageSize

	Response.Write "Record	number: " & intRecord & " "

	Response.Write rs.Fields("FirstName") & " "

	Response.Write rs.Fields("LastName") & "<br>"

	rs.MoveNext

If rs.EOF Then Exit For



Next



rs.Close

set rs = Nothing

conn.Close

set conn = nothing

%>



there is some sample code taken from a ms kb article.



daniel



Daniel O'Dorisio

dodorisio@h...

xxx-xxx-xxxx





-----Original Message-----

From: achiu@m... [mailto:achiu@m...]

Sent: Monday, May 21, 2001 6:40 PM

To: ASP Web HowTo

Subject: [asp_web_howto] RE: How to display the searched keyword





Daniel,



Thank you for the hints. I need one more help, do you know how Google make

their bottom search navigation bars? (Result Page: Previous 1 2 3 ... 17

18 19  Next). Thanks.



Alan





> if you are talking about the application bar (top bar with the close

> minimise and resore buttons) they do that by probally a querystring...

> so for example they did something like:

>

> <TITLE>Google Search: <%=Request.Querystring("q")%></TITLE>

>

> for the light blue bar that is part of the actual html page, they did the

> same thing probally. they grabbed the value of the querystring like:

>

> <TD bgcolor="#hexforltbl">

> Searched the web for: <%=REquest.Querystring("q")

> </TD>

>

> hth

>

> daniel

>

> Daniel O'Dorisio

> dodorisio@h...

> xxx-xxx-xxxx

>

>

> -----Original Message-----

> From: Alan Chiu [mailto:achiu@m...]

> Sent: Friday, May 18, 2001 4:32 PM

> To: ASP Web HowTo

> Subject: [asp_web_howto] How to display the searched keyword

>

>

> Hi,

>

> I'm right now writing the "SearchResult.asp" page for the  search 

> engine, which we are going to use Microsoft Index Server as the Search 

> Engine.

>

>  I'll appreciate very much if somebody can tell me how does GOOGLE 

> display the keywords, typed in the search text box by users,  in their 

> search result page.

>

> When you do a search with Google, after typing the keyword (i.e. Index 

> Server) then you click the Google Search button. Next will show you the 

> search result page. On top of the page you see your keyword is being 

> displayed on the blue bar (i.e. Searched the web for Index Server.). 

> Thanks.

>

> Alan

Message #5 by achiu@m... on Tue, 22 May 2001 14:41:56
Daniel



Again, thank you very much for the codes.



Alan



> that i am not sure of... i guess if the results are coming from a db they

> used recordset paging.

> 

> but that would only be if they were coming from a db sql query..

> 

> <%@ EnableSessionState=False Language=VBScript %>

> <%

> set conn = Server.CreateObject("ADODB.Connection")

> conn.Open "DSN=AdvWorks"

> 

> set rs = Server.CreateObject("ADODB.Recordset")

> rs.CursorLocation = 3  ' adUseClient

> rs.Open "Select * from Employees", conn

> rs.PageSize = 2

> intPageCount = rs.PageCount

> 

> Select Case Request("Action")

> 	case "<<"

> 		intpage = 1

> 	case "<"

> 		intpage = Request("intpage")-1

> 		if intpage < 1 then intpage = 1

> 	case ">"

> 		intpage = Request("intpage")+1

> 		if intpage > intPageCount then intpage = IntPageCount

> 	Case ">>"

> 		intpage = intPageCount

> 	case else

> 		intpage = 1

> end select

> %>

> <HTML>

> <HEAD>

> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">

> <TITLE>ASP & ADO Paging</TITLE>

> </HEAD>

> <BODY bgColor=White text=Black>

> 

> <%

> rs.AbsolutePage = intPage

> For intRecord = 1 To rs.PageSize

> 	Response.Write "Record	number: " & intRecord & " "

> 	Response.Write rs.Fields("FirstName") & " "

> 	Response.Write rs.Fields("LastName") & "<br>"

> 	rs.MoveNext

> If rs.EOF Then Exit For

> 

> Next

> 

> rs.Close

> set rs = Nothing

> conn.Close

> set conn = nothing

> %>

> 

> there is some sample code taken from a ms kb article.

> 

> daniel

> 

> Daniel O'Dorisio

> dodorisio@h...

> xxx-xxx-xxxx

> 

> 

> -----Original Message-----

> From: achiu@m... [mailto:achiu@m...]

> Sent: Monday, May 21, 2001 6:40 PM

> To: ASP Web HowTo

> Subject: [asp_web_howto] RE: How to display the searched keyword

> 

> 

> Daniel,

> 

> Thank you for the hints. I need one more help, do you know how Google 

make

> their bottom search navigation bars? (Result Page: Previous 1 2 3 ... 17

> 18 19  Next). Thanks.

> 

> Alan

> 

> 

> > if you are talking about the application bar (top bar with the close

> > minimise and resore buttons) they do that by probally a querystring...

> > so for example they did something like:

> >

> > <TITLE>Google Search: <%=Request.Querystring("q")%></TITLE>

> >

> > for the light blue bar that is part of the actual html page, they did 

the

> > same thing probally. they grabbed the value of the querystring like:

> >

> > <TD bgcolor="#hexforltbl">

> > Searched the web for: <%=REquest.Querystring("q")

> > </TD>

> >

> > hth

> >

> > daniel

> >

> > Daniel O'Dorisio

> > dodorisio@h...

> > xxx-xxx-xxxx

> >

> >

> > -----Original Message-----

> > From: Alan Chiu [mailto:achiu@m...]

> > Sent: Friday, May 18, 2001 4:32 PM

> > To: ASP Web HowTo

> > Subject: [asp_web_howto] How to display the searched keyword

> >

> >

> > Hi,

> >

> > I'm right now writing the "SearchResult.asp" page for the  search 

> > engine, which we are going to use Microsoft Index Server as the Search 



> > Engine.

> >

> >  I'll appreciate very much if somebody can tell me how does GOOGLE 

> > display the keywords, typed in the search text box by users,  in their 



> > search result page.

> >

> > When you do a search with Google, after typing the keyword (i.e. Index 



> > Server) then you click the Google Search button. Next will show you 

the 

> > search result page. On top of the page you see your keyword is being 

> > displayed on the blue bar (i.e. Searched the web for Index Server.). 

> > Thanks.

> >

> > Alan

Message #6 by "Morgan, Rob" <Rob.Morgan@o...> on Tue, 22 May 2001 09:55:59 -0400
Just a little bit more functionality but the same concepts.



http://www.planet-source-code.com/vb/default.asp?lngCId=6609&lngWId=4 



-----Original Message-----

From: achiu@m... [mailto:achiu@m...]

Sent: Tuesday, May 22, 2001 10:42 AM

To: ASP Web HowTo

Subject: [asp_web_howto] RE: How to display the searched keyword





Daniel



Again, thank you very much for the codes.



Alan



> that i am not sure of... i guess if the results are coming from a db they

> used recordset paging.

> 

> but that would only be if they were coming from a db sql query..

> 

> <%@ EnableSessionState=False Language=VBScript %>

> <%

> set conn = Server.CreateObject("ADODB.Connection")

> conn.Open "DSN=AdvWorks"

> 

> set rs = Server.CreateObject("ADODB.Recordset")

> rs.CursorLocation = 3  ' adUseClient

> rs.Open "Select * from Employees", conn

> rs.PageSize = 2

> intPageCount = rs.PageCount

> 

> Select Case Request("Action")

> 	case "<<"

> 		intpage = 1

> 	case "<"

> 		intpage = Request("intpage")-1

> 		if intpage < 1 then intpage = 1

> 	case ">"

> 		intpage = Request("intpage")+1

> 		if intpage > intPageCount then intpage = IntPageCount

> 	Case ">>"

> 		intpage = intPageCount

> 	case else

> 		intpage = 1

> end select

> %>

> <HTML>

> <HEAD>

> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">

> <TITLE>ASP & ADO Paging</TITLE>

> </HEAD>

> <BODY bgColor=White text=Black>

> 

> <%

> rs.AbsolutePage = intPage

> For intRecord = 1 To rs.PageSize

> 	Response.Write "Record	number: " & intRecord & " "

> 	Response.Write rs.Fields("FirstName") & " "

> 	Response.Write rs.Fields("LastName") & "<br>"

> 	rs.MoveNext

> If rs.EOF Then Exit For

> 

> Next

> 

> rs.Close

> set rs = Nothing

> conn.Close

> set conn = nothing

> %>

> 

> there is some sample code taken from a ms kb article.

> 

> daniel

> 

> Daniel O'Dorisio

> dodorisio@h...

> xxx-xxx-xxxx

> 

> 

> -----Original Message-----

> From: achiu@m... [mailto:achiu@m...]

> Sent: Monday, May 21, 2001 6:40 PM

> To: ASP Web HowTo

> Subject: [asp_web_howto] RE: How to display the searched keyword

> 

> 

> Daniel,

> 

> Thank you for the hints. I need one more help, do you know how Google 

make

> their bottom search navigation bars? (Result Page: Previous 1 2 3 ... 17

> 18 19  Next). Thanks.

> 

> Alan

> 

> 

> > if you are talking about the application bar (top bar with the close

> > minimise and resore buttons) they do that by probally a querystring...

> > so for example they did something like:

> >

> > <TITLE>Google Search: <%=Request.Querystring("q")%></TITLE>

> >

> > for the light blue bar that is part of the actual html page, they did 

the

> > same thing probally. they grabbed the value of the querystring like:

> >

> > <TD bgcolor="#hexforltbl">

> > Searched the web for: <%=REquest.Querystring("q")

> > </TD>

> >

> > hth

> >

> > daniel

> >

> > Daniel O'Dorisio

> > dodorisio@h...

> > xxx-xxx-xxxx

> >

> >

> > -----Original Message-----

> > From: Alan Chiu [mailto:achiu@m...]

> > Sent: Friday, May 18, 2001 4:32 PM

> > To: ASP Web HowTo

> > Subject: [asp_web_howto] How to display the searched keyword

> >

> >

> > Hi,

> >

> > I'm right now writing the "SearchResult.asp" page for the  search 

> > engine, which we are going to use Microsoft Index Server as the Search 



> > Engine.

> >

> >  I'll appreciate very much if somebody can tell me how does GOOGLE 

> > display the keywords, typed in the search text box by users,  in their 



> > search result page.

> >

> > When you do a search with Google, after typing the keyword (i.e. Index 



> > Server) then you click the Google Search button. Next will show you 

the 

> > search result page. On top of the page you see your keyword is being 

> > displayed on the blue bar (i.e. Searched the web for Index Server.). 

> > Thanks.

> >

> > Alan
Message #7 by "Alan Chiu" <achiu@m...> on Tue, 22 May 2001 11:06:29 -0400
Rob



Thank you.



Alan



-----Original Message-----

From: Morgan, Rob [mailto:Rob.Morgan@o...]

Sent: Tuesday, May 22, 2001 9:56 AM

To: ASP Web HowTo

Subject: [asp_web_howto] RE: How to display the searched keyword





Just a little bit more functionality but the same concepts.



http://www.planet-source-code.com/vb/default.asp?lngCId=6609&lngWId=4

-

  Return to Index