Hi, i want to do a function that whenever you click a information on the drop-down box,it will redirect to the webpage of the information when i click a "SUBMIT" button.
So is it possible...
And below is my coding:
Dim h, name
Dim SQL,Rs2
Dim Rs, Con, ConnString
Dim Con1
Set Rs=Server.CreateObject ("ADODB.CONNECTION"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
'set Rs2=Server.CreateObject ("ADODB.CONNECTION"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
ConnString="driver={sql server};server=o6f2e1;database=user;DSN=localserver;PWD=;UID=sa;"
Rs.Open ConnString
SQL = "select * from info "
Set Con=Rs.Execute (SQL)
SQL= "select * from Course"
Set Con1=Rs.execute (SQL)
IF not Con1.EOF then
if not Con.EOF then
'Con1.MoveNext
'Con.MoveNext
Response.Write ("Your Profile:"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Response.Write ("<p>"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Response.Write ("Name:" & Con.fields("NameID"
)
Response.Write ("<p>"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Response.Write ("Department:" & Con.fields("Department"
)
Response.Write ("<p>"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Response.Write ("Option:" & Con.fields("OptionChosen"
)
Response.Write ("<p>"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Response.Write ("View your Modules:"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
If Not Con1.EOF Then
Con1.MoveFirst
'the form below calls this file only this time with an id in the QueryString
%>
<form action="View.asp" method="get" id=form1 name=form1>
<select name=UserID>
<option></option>
<%
Do While Not Con1.EOF
%>
<option value="<%= Con1.Fields("UserID"
%>"><%= Con1.Fields("Modules"
%></option>
<%
Con1.MoveNext
Loop
%>
</select>
<input type="submit" value="Submit" id=submit1 name=submit1>
</form>
<%
End if
End if
End if
%>
So is it possible...
And below is my coding:
Dim h, name
Dim SQL,Rs2
Dim Rs, Con, ConnString
Dim Con1
Set Rs=Server.CreateObject ("ADODB.CONNECTION"
'set Rs2=Server.CreateObject ("ADODB.CONNECTION"
ConnString="driver={sql server};server=o6f2e1;database=user;DSN=localserver;PWD=;UID=sa;"
Rs.Open ConnString
SQL = "select * from info "
Set Con=Rs.Execute (SQL)
SQL= "select * from Course"
Set Con1=Rs.execute (SQL)
IF not Con1.EOF then
if not Con.EOF then
'Con1.MoveNext
'Con.MoveNext
Response.Write ("Your Profile:"
Response.Write ("<p>"
Response.Write ("Name:" & Con.fields("NameID"
Response.Write ("<p>"
Response.Write ("Department:" & Con.fields("Department"
Response.Write ("<p>"
Response.Write ("Option:" & Con.fields("OptionChosen"
Response.Write ("<p>"
Response.Write ("View your Modules:"
If Not Con1.EOF Then
Con1.MoveFirst
'the form below calls this file only this time with an id in the QueryString
%>
<form action="View.asp" method="get" id=form1 name=form1>
<select name=UserID>
<option></option>
<%
Do While Not Con1.EOF
%>
<option value="<%= Con1.Fields("UserID"
<%
Con1.MoveNext
Loop
%>
</select>
<input type="submit" value="Submit" id=submit1 name=submit1>
</form>
<%
End if
End if
End if
%>