|
 |
asp_databases thread: Create Hyperlink For Database Value
Message #1 by "Nageswary" <nagesh5286@h...> on Thu, 15 Feb 2001 17:38:52 +0800
|
|
Hai Folks ,
I have a problem with one of my asp page. I am trying to display values
which I exctracted from the database when the user wants it. And I want to
display the values as hyperlink to another page which will display the sub
values for the values chosen.
Example:
User Keys In : Asia
I want to display all the available countries in Asia as hyperlink :
malaysia , singapore , india , ext
So , lets say they clicked on malaysia , I want to retieve all the
associated values from database and display it to the user.
The problem is , I do not know how to create the hyperlink which acts as an
indicator for the retrieval process from the database.
I really hope you guys will be able to help me as I am really desperate for
a solution. Thank You in advance and I also wish " A Very Happy Valentine
Day to all."
From ,
Nageswary
Message #2 by Louise Greally <lgreally@c...> on Thu, 15 Feb 2001 11:10:54 -0000
|
|
I think this is what you mean
eg
choose_country.asp
user_continent = request.form("chosen_continent")
sql = "Select * from country where continent = ' '"&user_continent&" ' "
set rs = conn.execute(sql)
etc
while rs.eof <> true ' loop through all countries
dim country
country = rs("mycountry") ' assign the value for the name of the country to
a page variable
country_id = rs("mycountry_id") ' assign the value for the id of the country
to a page variable, assuming the PK of the table is an id field
response.write "<a
href=display_country_details.asp?country_id="&country_id&">Display
"&country&" details</a> " ' create the hyperlink with querystring value of
'country
rs.movenext
wend
----------------------------------------------
display_country.asp
in_country_id = request.querystring("country_id") ' this time use
querystring as we've posted using querystring (get method)
sql = "Select * from country where country_id = ' '"&in_country_id&" ' "
set rs = conn.execute(sql)
' display values etc etc
I hope this helps you, and Ive explained it ok
Regards
Louise
-----Original Message-----
From: Nageswary [mailto:nagesh5286@h...]
Sent: 15 February 2001 09:39
To: ASP Databases
Subject: [asp_databases] Create Hyperlink For Database Value
Hai Folks ,
I have a problem with one of my asp page. I am trying to display values
which I exctracted from the database when the user wants it. And I want to
display the values as hyperlink to another page which will display the sub
values for the values chosen.
Example:
User Keys In : Asia
I want to display all the available countries in Asia as hyperlink :
malaysia , singapore , india , ext
So , lets say they clicked on malaysia , I want to retieve all the
associated values from database and display it to the user.
The problem is , I do not know how to create the hyperlink which acts as an
indicator for the retrieval process from the database.
I really hope you guys will be able to help me as I am really desperate for
a solution. Thank You in advance and I also wish " A Very Happy Valentine
Day to all."
From ,
Nageswary
Message #3 by "Nageswary" <nagesh5286@h...> on Fri, 16 Feb 2001 10:44:21 +0800
|
|
Hai Louise Greally ,
Thank You very much . It works.
From
Nageswary
----- Original Message -----
From: Louise Greally <lgreally@c...>
To: ASP Databases <asp_databases@p...>
Sent: Thursday, February 15, 2001 7:10
Subject: [asp_databases] RE: Create Hyperlink For Database Value
> I think this is what you mean
>
> eg
>
>
> choose_country.asp
>
> user_continent = request.form("chosen_continent")
> sql = "Select * from country where continent = ' '"&user_continent&" ' "
> set rs = conn.execute(sql)
> etc
>
> while rs.eof <> true ' loop through all countries
>
> dim country
> country = rs("mycountry") ' assign the value for the name of the country
to
> a page variable
> country_id = rs("mycountry_id") ' assign the value for the id of the
country
> to a page variable, assuming the PK of the table is an id field
>
> response.write "<a
> href=display_country_details.asp?country_id="&country_id&">Display
> "&country&" details</a> " ' create the hyperlink with querystring value of
> 'country
>
> rs.movenext
> wend
>
> ----------------------------------------------
> display_country.asp
>
> in_country_id = request.querystring("country_id") ' this time use
> querystring as we've posted using querystring (get method)
>
> sql = "Select * from country where country_id = ' '"&in_country_id&" ' "
> set rs = conn.execute(sql)
>
>
> ' display values etc etc
>
> I hope this helps you, and Ive explained it ok
>
> Regards
>
> Louise
>
> -----Original Message-----
> From: Nageswary [mailto:nagesh5286@h...]
> Sent: 15 February 2001 09:39
> To: ASP Databases
> Subject: [asp_databases] Create Hyperlink For Database Value
>
>
> Hai Folks ,
>
> I have a problem with one of my asp page. I am trying to display values
> which I exctracted from the database when the user wants it. And I want to
> display the values as hyperlink to another page which will display the sub
> values for the values chosen.
>
> Example:
>
> User Keys In : Asia
>
> I want to display all the available countries in Asia as hyperlink :
> malaysia , singapore , india , ext
> So , lets say they clicked on malaysia , I want to retieve all the
> associated values from database and display it to the user.
>
> The problem is , I do not know how to create the hyperlink which acts as
an
> indicator for the retrieval process from the database.
>
> I really hope you guys will be able to help me as I am really desperate
for
> a solution. Thank You in advance and I also wish " A Very Happy Valentine
> Day to all."
>
>
> From ,
> Nageswary
>
Message #4 by "Nageswary" <nagesh5286@h...> on Fri, 16 Feb 2001 11:17:12 +0800
|
|
Hai
Its me again. the method that u gave previously ... only for going to
another page . But it does not retrieve the values that I am passing from
the search form.
For clarification purpose , I have attached the code below :
****************************************************************************
******************
First Page : Search Page
<html>
<head>
</head>
<body>
<p><b><font face="Arial" size="2">Search Route Using WildCards From
Database</font></b></p>
<p> </p>
<form method="POST">
<table border="0" width="100%">
<tr>
<td width="23%"><font size="2" face="Arial">You are From :
</font></td>
<td width="77%"><input type="text" name="txtfrom" size="48" value="<%
= Request("txtfrom") %>"></td>
</tr>
<tr>
<td width="23%"><font size="2" face="Arial">Going To : </font></td>
<td width="77%"><input type="text" name="txtto" size="48" value="<%
Request("txtto") %>"></td>
</tr>
</table>
<p align="center"><input type="submit" value="Submit"
name="btnSubmit"><input type="reset" value="Reset" name="B2"></p>
</form>
</body>
<%
If Request("btnSubmit") <> "" then
If ((Request("txtto") <> "") AND (Request("txtfrom") <> "" )) then
'perform the search
'Response.write " Search can be performed "
'---------------------------------------------------------------------------
-----------------------------------
'for the FROM stage search
sqlsearchwild ="Select * from tablename Where Stage_desc LIKE '%" &
Request("txtfrom") & "%' order by Route_id"
set rsSearch = DBSQL.Execute(sqlsearchwild)
'response.write "SQL :" & sqlsearchwild & "<br>"
If not rsSearch.eof then
Do while not rsSearch.eof
stagedesc = rsSearch("Stage_desc")
stageid = rsSearch("Stage_id")
Response.write "<a
href=display_stage_details.asp?Stage_id="&stageid&">"&stagedesc&"</a>" &
"<BR>"
Response.write "Stage ID : " & rsSearch("Stage_id") & "<BR>"
Response.write "Zone ID : " & rsSearch("Zone_id") & "<BR>"
Response.write "Route ID : " & rsSearch("Route_id") & "<BR>"
Response.write "Area ID : " & rsSearch("Area_id") & "<BR>"
Response.write "<BR>"
rsSearch.Movenext
Loop
else
Response.write "The Start Point Does Not Exist.Please Try
again." & "<br>"
end if
'---------------------------------------------------------------------------
-----------------------------------
else
Response.write "Please key in All the Required Values. Thank You " &
"<br>"
end if
End if
%>
</html>
****************************************************************************
******************
The Second Page : display_stage_details.asp
<html>
<head>
<title>It comes here</title>
</head>
<body>
<%
in_stage_id = request.querystring("stageid")
in_stage_desc = request.querystring("stagedesc")
Response.write "Stage ID : " & in_stage_id & "<BR>"
Response.write "Stage Desc : " & in_stage_desc & "<BR>"
sqlsearchwild ="Select * from tablename Where Stage_id LIKE '%" &
in_stage_id & "%' and Stage_desc LIKE '%" & in_stage_desc & "%' order by
Route_id"
set rsSearch = DBSQL.Execute(sqlsearchwild)
if not rsSearch.eof then
do while not rsSearch.eof
Response.write "<BR>"
Response.write " AREA : " & rsSearch("Area_id")
Response.write " STAGE : " & rsSearch("Stage_desc")
Response.write " STAGE ID : " & rsSearch("Stage_id")
Response.write "<BR>"
rsSearch.MoveNext
Loop
else
Response.write "No Record "
end if
%>
</body>
</html>
****************************************************************************
******************
The Stage Id and Stage Description is not retieved from the previous page. I
am using Access Database and I link to the database using connection string.
I tried to use the GET method in the first page but no difference. I do not
know where i went wrong but I think maybe it has something to do with the
way i am passing the value . I hope u can help .
Thank you in advance.
From
Nageswary
----- Original Message -----
From: Louise Greally <lgreally@c...>
To: ASP Databases <asp_databases@p...>
Sent: Thursday, February 15, 2001 7:10
Subject: [asp_databases] RE: Create Hyperlink For Database Value
> I think this is what you mean
>
> eg
>
>
> choose_country.asp
>
> user_continent = request.form("chosen_continent")
> sql = "Select * from country where continent = ' '"&user_continent&" ' "
> set rs = conn.execute(sql)
> etc
>
> while rs.eof <> true ' loop through all countries
>
> dim country
> country = rs("mycountry") ' assign the value for the name of the country
to
> a page variable
> country_id = rs("mycountry_id") ' assign the value for the id of the
country
> to a page variable, assuming the PK of the table is an id field
>
> response.write "<a
> href=display_country_details.asp?country_id="&country_id&">Display
> "&country&" details</a> " ' create the hyperlink with querystring value of
> 'country
>
> rs.movenext
> wend
>
> ----------------------------------------------
> display_country.asp
>
> in_country_id = request.querystring("country_id") ' this time use
> querystring as we've posted using querystring (get method)
>
> sql = "Select * from country where country_id = ' '"&in_country_id&" ' "
> set rs = conn.execute(sql)
>
>
> ' display values etc etc
>
> I hope this helps you, and Ive explained it ok
>
> Regards
>
> Louise
>
> -----Original Message-----
> From: Nageswary [mailto:nagesh5286@h...]
> Sent: 15 February 2001 09:39
> To: ASP Databases
> Subject: [asp_databases] Create Hyperlink For Database Value
>
>
> Hai Folks ,
>
> I have a problem with one of my asp page. I am trying to display values
> which I exctracted from the database when the user wants it. And I want to
> display the values as hyperlink to another page which will display the sub
> values for the values chosen.
>
> Example:
>
> User Keys In : Asia
>
> I want to display all the available countries in Asia as hyperlink :
> malaysia , singapore , india , ext
> So , lets say they clicked on malaysia , I want to retieve all the
> associated values from database and display it to the user.
>
> The problem is , I do not know how to create the hyperlink which acts as
an
> indicator for the retrieval process from the database.
>
> I really hope you guys will be able to help me as I am really desperate
for
> a solution. Thank You in advance and I also wish " A Very Happy Valentine
> Day to all."
>
>
> From ,
> Nageswary
>
>
Message #5 by Louise Greally <lgreally@c...> on Fri, 16 Feb 2001 08:29:00 -0000
|
|
The simplest way to do this, if you want to keep using the hyperlink is to
append the querystring with the other values you wish to send, eg
Do while not rsSearch.eof
stagedesc = rsSearch("Stage_desc")
stageid = rsSearch("Stage_id")
Response.write "<a
href=display_stage_details.asp?Stage_id="&stageid&"&stage_desc="&Stagedesc&"
>"&stagedesc&"</a>" &
"<BR>"
The Second Page : display_stage_details.asp
<html>
<head>
<title>It comes here</title>
</head>
<body>
<%
in_stage_id = request.querystring("stageid") ' you request
stageid, but in your code you named in stage_id try -in_stage_id
request.querystring("stage_id")
in_stage_desc = request.querystring("stagedesc") ' and the same
applies here either call this stagedesc in the hyperlink above or
request.querystring("stage_desc")
Response.write "Stage ID : " & in_stage_id & "<BR>"
Response.write "Stage Desc : " & in_stage_desc & "<BR>"
hope this helps
-----Original Message-----
From: Nageswary [mailto:nagesh5286@h...]
Sent: 16 February 2001 03:17
To: ASP Databases
Subject: [asp_databases] RE: Create Hyperlink For Database Value
Hai
Its me again. the method that u gave previously ... only for going to
another page . But it does not retrieve the values that I am passing from
the search form.
For clarification purpose , I have attached the code below :
****************************************************************************
******************
First Page : Search Page
<html>
<head>
</head>
<body>
<p><b><font face="Arial" size="2">Search Route Using WildCards From
Database</font></b></p>
<p> </p>
<form method="POST">
<table border="0" width="100%">
<tr>
<td width="23%"><font size="2" face="Arial">You are From :
</font></td>
<td width="77%"><input type="text" name="txtfrom" size="48" value="<%
= Request("txtfrom") %>"></td>
</tr>
<tr>
<td width="23%"><font size="2" face="Arial">Going To : </font></td>
<td width="77%"><input type="text" name="txtto" size="48" value="<%
Request("txtto") %>"></td>
</tr>
</table>
<p align="center"><input type="submit" value="Submit"
name="btnSubmit"><input type="reset" value="Reset" name="B2"></p>
</form>
</body>
<%
If Request("btnSubmit") <> "" then
If ((Request("txtto") <> "") AND (Request("txtfrom") <> "" )) then
'perform the search
'Response.write " Search can be performed "
'---------------------------------------------------------------------------
-----------------------------------
'for the FROM stage search
sqlsearchwild ="Select * from tablename Where Stage_desc LIKE '%" &
Request("txtfrom") & "%' order by Route_id"
set rsSearch = DBSQL.Execute(sqlsearchwild)
'response.write "SQL :" & sqlsearchwild & "<br>"
If not rsSearch.eof then
Do while not rsSearch.eof
stagedesc = rsSearch("Stage_desc")
stageid = rsSearch("Stage_id")
Response.write "<a
href=display_stage_details.asp?Stage_id="&stageid&">"&stagedesc&"</a>" &
"<BR>"
Response.write "Stage ID : " & rsSearch("Stage_id") & "<BR>"
Response.write "Zone ID : " & rsSearch("Zone_id") & "<BR>"
Response.write "Route ID : " & rsSearch("Route_id") & "<BR>"
Response.write "Area ID : " & rsSearch("Area_id") & "<BR>"
Response.write "<BR>"
rsSearch.Movenext
Loop
else
Response.write "The Start Point Does Not Exist.Please Try
again." & "<br>"
end if
'---------------------------------------------------------------------------
-----------------------------------
else
Response.write "Please key in All the Required Values. Thank You " &
"<br>"
end if
End if
%>
</html>
****************************************************************************
******************
The Second Page : display_stage_details.asp
<html>
<head>
<title>It comes here</title>
</head>
<body>
<%
in_stage_id = request.querystring("stageid")
in_stage_desc = request.querystring("stagedesc")
Response.write "Stage ID : " & in_stage_id & "<BR>"
Response.write "Stage Desc : " & in_stage_desc & "<BR>"
sqlsearchwild ="Select * from tablename Where Stage_id LIKE '%" &
in_stage_id & "%' and Stage_desc LIKE '%" & in_stage_desc & "%' order by
Route_id"
set rsSearch = DBSQL.Execute(sqlsearchwild)
if not rsSearch.eof then
do while not rsSearch.eof
Response.write "<BR>"
Response.write " AREA : " & rsSearch("Area_id")
Response.write " STAGE : " & rsSearch("Stage_desc")
Response.write " STAGE ID : " & rsSearch("Stage_id")
Response.write "<BR>"
rsSearch.MoveNext
Loop
else
Response.write "No Record "
end if
%>
</body>
</html>
****************************************************************************
******************
The Stage Id and Stage Description is not retieved from the previous page. I
am using Access Database and I link to the database using connection string.
I tried to use the GET method in the first page but no difference. I do not
know where i went wrong but I think maybe it has something to do with the
way i am passing the value . I hope u can help .
Thank you in advance.
From
Nageswary
----- Original Message -----
From: Louise Greally <lgreally@c...>
To: ASP Databases <asp_databases@p...>
Sent: Thursday, February 15, 2001 7:10
Subject: [asp_databases] RE: Create Hyperlink For Database Value
> I think this is what you mean
>
> eg
>
>
> choose_country.asp
>
> user_continent = request.form("chosen_continent")
> sql = "Select * from country where continent = ' '"&user_continent&" ' "
> set rs = conn.execute(sql)
> etc
>
> while rs.eof <> true ' loop through all countries
>
> dim country
> country = rs("mycountry") ' assign the value for the name of the country
to
> a page variable
> country_id = rs("mycountry_id") ' assign the value for the id of the
country
> to a page variable, assuming the PK of the table is an id field
>
> response.write "<a
> href=display_country_details.asp?country_id="&country_id&">Display
> "&country&" details</a> " ' create the hyperlink with querystring value of
> 'country
>
> rs.movenext
> wend
>
> ----------------------------------------------
> display_country.asp
>
> in_country_id = request.querystring("country_id") ' this time use
> querystring as we've posted using querystring (get method)
>
> sql = "Select * from country where country_id = ' '"&in_country_id&" ' "
> set rs = conn.execute(sql)
>
>
> ' display values etc etc
>
> I hope this helps you, and Ive explained it ok
>
> Regards
>
> Louise
>
> -----Original Message-----
> From: Nageswary [mailto:nagesh5286@h...]
> Sent: 15 February 2001 09:39
> To: ASP Databases
> Subject: [asp_databases] Create Hyperlink For Database Value
>
>
> Hai Folks ,
>
> I have a problem with one of my asp page. I am trying to display values
> which I exctracted from the database when the user wants it. And I want to
> display the values as hyperlink to another page which will display the sub
> values for the values chosen.
>
> Example:
>
> User Keys In : Asia
>
> I want to display all the available countries in Asia as hyperlink :
> malaysia , singapore , india , ext
> So , lets say they clicked on malaysia , I want to retieve all the
> associated values from database and display it to the user.
>
> The problem is , I do not know how to create the hyperlink which acts as
an
> indicator for the retrieval process from the database.
>
> I really hope you guys will be able to help me as I am really desperate
for
> a solution. Thank You in advance and I also wish " A Very Happy Valentine
> Day to all."
>
>
> From ,
> Nageswary
>
>
Message #6 by "Nageswary" <nagesh5286@h...> on Sat, 17 Feb 2001 10:30:34 +0800
|
|
Hai ,
I got it but now I have another problem. The values that I am passing
(stagedesc) has empty spaces . How do I send it ?
Example :
stagedesc = red flower
And the value that is passed to the result page is only the "red" and not
the whole sentence , which is "red flower". How do I make it to accept
whatever the user keys in .... including all the spaces and special
characters?
I thank you in advance for helping me this far and I hope you can help me
with this one also.
Sincerely
Nageswary
----- Original Message -----
From: Louise Greally <lgreally@c...>
To: ASP Databases <asp_databases@p...>
Sent: Friday, February 16, 2001 4:29
Subject: [asp_databases] RE: Create Hyperlink For Database Value
> The simplest way to do this, if you want to keep using the hyperlink is to
> append the querystring with the other values you wish to send, eg
>
>
> Do while not rsSearch.eof
>
> stagedesc = rsSearch("Stage_desc")
> stageid = rsSearch("Stage_id")
>
> Response.write "<a
>
href=display_stage_details.asp?Stage_id="&stageid&"&stage_desc="&Stagedesc&"
> >"&stagedesc&"</a>" &
> "<BR>"
>
> The Second Page : display_stage_details.asp
>
> <html>
>
> <head>
> <title>It comes here</title>
> </head>
> <body>
> <%
> in_stage_id = request.querystring("stageid") ' you request
> stageid, but in your code you named in stage_id try -in_stage_id
> request.querystring("stage_id")
> in_stage_desc = request.querystring("stagedesc") ' and the same
> applies here either call this stagedesc in the hyperlink above or
> request.querystring("stage_desc")
>
> Response.write "Stage ID : " & in_stage_id & "<BR>"
> Response.write "Stage Desc : " & in_stage_desc & "<BR>"
>
>
> hope this helps
>
> -----Original Message-----
> From: Nageswary [mailto:nagesh5286@h...]
> Sent: 16 February 2001 03:17
> To: ASP Databases
> Subject: [asp_databases] RE: Create Hyperlink For Database Value
>
>
> Hai
>
> Its me again. the method that u gave previously ... only for going to
> another page . But it does not retrieve the values that I am passing from
> the search form.
>
> For clarification purpose , I have attached the code below :
>
>
****************************************************************************
> ******************
> First Page : Search Page
>
>
> <html>
> <head>
> </head>
>
> <body>
>
> <p><b><font face="Arial" size="2">Search Route Using WildCards From
> Database</font></b></p>
> <p> </p>
> <form method="POST">
> <table border="0" width="100%">
> <tr>
> <td width="23%"><font size="2" face="Arial">You are From :
> </font></td>
> <td width="77%"><input type="text" name="txtfrom" size="48"
value="<%
> = Request("txtfrom") %>"></td>
> </tr>
> <tr>
> <td width="23%"><font size="2" face="Arial">Going To : </font></td>
> <td width="77%"><input type="text" name="txtto" size="48" value="<%
> Request("txtto") %>"></td>
> </tr>
> </table>
> <p align="center"><input type="submit" value="Submit"
> name="btnSubmit"><input type="reset" value="Reset" name="B2"></p>
> </form>
>
> </body>
> <%
> If Request("btnSubmit") <> "" then
> If ((Request("txtto") <> "") AND (Request("txtfrom") <> "" )) then
> 'perform the search
> 'Response.write " Search can be performed "
>
>
'---------------------------------------------------------------------------
> -----------------------------------
> 'for the FROM stage search
>
> sqlsearchwild ="Select * from tablename Where Stage_desc LIKE '%" &
> Request("txtfrom") & "%' order by Route_id"
> set rsSearch = DBSQL.Execute(sqlsearchwild)
>
> 'response.write "SQL :" & sqlsearchwild & "<br>"
>
> If not rsSearch.eof then
>
> Do while not rsSearch.eof
>
> stagedesc = rsSearch("Stage_desc")
> stageid = rsSearch("Stage_id")
>
> Response.write "<a
> href=display_stage_details.asp?Stage_id="&stageid&">"&stagedesc&"</a>" &
> "<BR>"
> Response.write "Stage ID : " & rsSearch("Stage_id") & "<BR>"
> Response.write "Zone ID : " & rsSearch("Zone_id") & "<BR>"
> Response.write "Route ID : " & rsSearch("Route_id") & "<BR>"
> Response.write "Area ID : " & rsSearch("Area_id") & "<BR>"
> Response.write "<BR>"
>
> rsSearch.Movenext
> Loop
>
> else
> Response.write "The Start Point Does Not Exist.Please Try
> again." & "<br>"
> end if
>
'---------------------------------------------------------------------------
> -----------------------------------
>
> else
> Response.write "Please key in All the Required Values. Thank You " &
> "<br>"
> end if
> End if
>
>
> %>
> </html>
>
>
****************************************************************************
> ******************
>
> The Second Page : display_stage_details.asp
>
> <html>
>
> <head>
> <title>It comes here</title>
> </head>
> <body>
> <%
> in_stage_id = request.querystring("stageid")
> in_stage_desc = request.querystring("stagedesc")
>
> Response.write "Stage ID : " & in_stage_id & "<BR>"
> Response.write "Stage Desc : " & in_stage_desc & "<BR>"
>
> sqlsearchwild ="Select * from tablename Where Stage_id LIKE '%" &
> in_stage_id & "%' and Stage_desc LIKE '%" & in_stage_desc & "%' order by
> Route_id"
>
> set rsSearch = DBSQL.Execute(sqlsearchwild)
>
> if not rsSearch.eof then
> do while not rsSearch.eof
>
> Response.write "<BR>"
> Response.write " AREA : " & rsSearch("Area_id")
> Response.write " STAGE : " & rsSearch("Stage_desc")
> Response.write " STAGE ID : " & rsSearch("Stage_id")
> Response.write "<BR>"
>
> rsSearch.MoveNext
> Loop
>
> else
> Response.write "No Record "
> end if
> %>
>
> </body>
> </html>
>
>
****************************************************************************
> ******************
> The Stage Id and Stage Description is not retieved from the previous page.
I
> am using Access Database and I link to the database using connection
string.
>
> I tried to use the GET method in the first page but no difference. I do
not
> know where i went wrong but I think maybe it has something to do with the
> way i am passing the value . I hope u can help .
>
> Thank you in advance.
>
> From
> Nageswary
>
>
>
> ----- Original Message -----
> From: Louise Greally <lgreally@c...>
> To: ASP Databases <asp_databases@p...>
> Sent: Thursday, February 15, 2001 7:10
> Subject: [asp_databases] RE: Create Hyperlink For Database Value
>
>
> > I think this is what you mean
> >
> > eg
> >
> >
> > choose_country.asp
> >
> > user_continent = request.form("chosen_continent")
> > sql = "Select * from country where continent = ' '"&user_continent&" '
"
> > set rs = conn.execute(sql)
> > etc
> >
> > while rs.eof <> true ' loop through all countries
> >
> > dim country
> > country = rs("mycountry") ' assign the value for the name of the country
> to
> > a page variable
> > country_id = rs("mycountry_id") ' assign the value for the id of the
> country
> > to a page variable, assuming the PK of the table is an id field
> >
> > response.write "<a
> > href=display_country_details.asp?country_id="&country_id&">Display
> > "&country&" details</a> " ' create the hyperlink with querystring value
of
> > 'country
> >
> > rs.movenext
> > wend
> >
> > ----------------------------------------------
> > display_country.asp
> >
> > in_country_id = request.querystring("country_id") ' this time use
> > querystring as we've posted using querystring (get method)
> >
> > sql = "Select * from country where country_id = ' '"&in_country_id&" '
"
> > set rs = conn.execute(sql)
> >
> >
> > ' display values etc etc
> >
> > I hope this helps you, and Ive explained it ok
> >
> > Regards
> >
> > Louise
> >
> > -----Original Message-----
> > From: Nageswary [mailto:nagesh5286@h...]
> > Sent: 15 February 2001 09:39
> > To: ASP Databases
> > Subject: [asp_databases] Create Hyperlink For Database Value
> >
> >
> > Hai Folks ,
> >
> > I have a problem with one of my asp page. I am trying to display values
> > which I exctracted from the database when the user wants it. And I want
to
> > display the values as hyperlink to another page which will display the
sub
> > values for the values chosen.
> >
> > Example:
> >
> > User Keys In : Asia
> >
> > I want to display all the available countries in Asia as hyperlink :
> > malaysia , singapore , india , ext
> > So , lets say they clicked on malaysia , I want to retieve all the
> > associated values from database and display it to the user.
> >
> > The problem is , I do not know how to create the hyperlink which acts
as
> an
> > indicator for the retrieval process from the database.
> >
> > I really hope you guys will be able to help me as I am really desperate
> for
> > a solution. Thank You in advance and I also wish " A Very Happy
Valentine
> > Day to all."
> >
> >
> > From ,
> > Nageswary
> >
> >
>
>
Message #7 by "Ken Schaefer" <ken@a...> on Mon, 19 Feb 2001 17:05:17 +1100
|
|
You need to Server.URLEncode() the values that you are passing.
http://www.myserver.com/default.asp?ID=some value
Can you see how the underlining stops at the first space. You need to use
Server.URLEncode() on the value: Server.URLEncode("some value") etc
Cheers
Ken
----- Original Message -----
From: "Nageswary" <nagesh5286@h...>
To: "ASP Databases" <asp_databases@p...>
Sent: Saturday, February 17, 2001 1:30 PM
Subject: [asp_databases] RE: Create Hyperlink For Database Value
> Hai ,
>
> I got it but now I have another problem. The values that I am passing
> (stagedesc) has empty spaces . How do I send it ?
>
> Example :
>
> stagedesc = red flower
>
> And the value that is passed to the result page is only the "red" and not
> the whole sentence , which is "red flower". How do I make it to accept
> whatever the user keys in .... including all the spaces and special
> characters?
>
> I thank you in advance for helping me this far and I hope you can help me
> with this one also.
>
> Sincerely
> Nageswary
Message #8 by "Nageswary" <nagesh5286@h...> on Mon, 19 Feb 2001 18:20:55 +0800
|
|
hai,
Thank you very much for the help. It is working and thanks to all of you
guys !!!
Sincerely From,
Nageswary
|
|
 |