Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > New to using ASP

Reply
Thread Tools

New to using ASP

 
 
apgoodb
Guest
Posts: n/a
 
      04-19-2004
I think this should be quite easy; however, I am having problems. I
want to build a page that takes information from an SQL query and puts
the names in a list box. From this box the user can select which
"Market" they wish to use and then they can select one of a few links
to different reports. These reports however, filter on which "Market"
they selected. My problem is I don't know how to store the Market
value in the session. Here is the code I have so far. Any help would
be appreciated.
Thanks,

<%@ LANGUAGE="VBSCRIPT" %>
<% Option Explicit %>
<!--#include virtual="/checkit/Functions.asp"-->
<%
If Session("UserName")="" Then
Response.Redirect("log_in.asp")
ElseIf Session("Client")="" Then
Response.Redirect("client_list.asp")
End If

%>


<html>
<head>
<title>Untitled Document</title>
</head> <body bgcolor="#FFFFFF">

<body bgcolor="#FFFFFF">
<table width="100%" border="0">
<tr>
<td width="15%">&nbsp;</td>
<td width="30%">&nbsp;</td>
<td width="10%">&nbsp;</td>
<td width="30%">&nbsp;</td>
<td width="15%">&nbsp;</td>
</tr>
<tr>
<td width="15%">&nbsp;</td>
<td bgcolor="#99CCCC" width="30%"
background="green_fade.gif"><b>Available
Markets:</b></td>
<td width="10%">&nbsp;</td>
<td width="30%" background="green_fade.gif"><b>Reports:</b></td>
<td width="15%">&nbsp;</td>
</tr>
<tr>
<td width="15%" rowspan="7">&nbsp;</td>
<td width="30%" rowspan="7">
<form method="POST" action="markets.asp" name="frmSelectMarket">
<select name="lstMarket" size="10">
<%
'set up query and display values
Dim conn, mySurveyList, rs, sql
Set conn = Server.CreateObject("ADODB.Connection")
conn.open Session("ConnectionString")

sql = "SELECT [market_master].[market_id],
[market_master].[market_name] FROM ([market_master] INNER JOIN
[evaluator] ON [market_master].[evaluator_id] =
[evaluator].[evaluator_id]) WHERE [evaluator].[evaluator_id]='" &
SQLString(Session("Client")) & "';"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 3, 3
Do Until rs.EOF %>
<option value="<%=Server.HTMLEncode(rs.Fields("market_id") .Value)%>"><%=Server.HTMLEncode(rs.Fields("market_ name").Value)%></option>
<%rs.MoveNext
Loop

rs.close
set rs=Nothing
conn.close
set conn=nothing
%>
'link to reports
</select>
</form>
</td>
<td width="10%">&nbsp;</td>
<td width="30%"><name="submit"><a href="overall.asp">Overall
Performance</a></td>
<td width="15%">&nbsp;</td>
</tr>
<tr>
<td width="10%">&nbsp;</td>
<td width="30%"><a href="financial.asp">Financial
Stability</a></td>
<td width="15%">&nbsp;</td>
</tr>
<tr>
<td width="10%">&nbsp;</td>
<td width="30%"><a href="health.asp">Health and Wellness</a></td>
<td width="15%">&nbsp;</td>
</tr>
<tr>
<td width="10%">&nbsp;</td>
<td width="30%"><a href="satisfaction.asp">Satisfaction and
Access</a> </td>
<td width="15%">&nbsp;</td>
</tr>
<tr>
<td width="10%">&nbsp;</td>
<td width="30%"><a href="utilization.asp">Utilization</a></td>
<td width="15%">&nbsp;</td>
</tr>
<tr>
<td width="10%">&nbsp;</td>
<td width="30%"><a href="utilization.asp">Maps</a></td>
<td width="15%">&nbsp;</td>
</tr>
<tr>
<td width="10%">&nbsp;</td>
<td width="30%">&nbsp;</td>
<td width="15%">&nbsp;</td>
</tr>
</table>
<p>&nbsp;</p>
</body>
</html>
 
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
Javascript new-new-new-new-newbee weblinkunlimited@gmail.com Javascript 2 03-11-2008 01:15 AM
Reframing a given page in a new frameset using javascript -- frames[0] goes to new location, but can't remember it? Weston Javascript 1 08-10-2007 08:34 PM
New to .NET ASP, need to start a project using .NET ASP, do I have to buy any Software to install, how can I start? santa19992000@yahoo.com ASP .Net 3 06-02-2007 07:03 PM
New computer, New OS, New Wireless Problem :-\ =?Utf-8?B?RGFu?= Wireless Networking 3 07-31-2005 02:11 PM



Advertisments