I am trying to convert the following ASP VBScript to C# to use on our company's new ASP.Net 3.5 web site.
Can anyone help convert the following code .... ORZ

Much appreciated.
Vivian
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
<%@ Language=VBScript %> 
<% 'option Explicit %>
<%
Dim APP_NAME
APP_NAME = "WA10208"
Session("Group_ID") = "4"
%>




 
 
 
 
 
 
 
 
 
 
 
 
 
 
<%
If Session("message") <> "" Then
%>
 
 
 
<%
End If
Session("message") = ""
%>
 
aaaa
bbbb : 
 
<%
Dim Conn, Rs, SqlStatement, DataDate, QueryDate, I
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionTimeout = Application("PSI_ConnectionTimeout")
Conn.CommandTimeout = Application("PSI_CommandTimeout")
Conn.Open Application("PSI_ConnectionString"), Application("PSI_RuntimeUserName"), Application("PSI_RuntimePassword")
SqlStatement = "Select TODAY " & _
  "From " & Application("odsPROD_DB") & ".ETL_BUSDATE"
Set Rs = Conn.Execute(SqlStatement)
If Not Rs.Eof Then
  DataDate = Left(Rs("TODAY"), 6)
Else
  DataDate = Right("0000" & Year(Now()), 4) & Right("00" & Month(Now()))
End If
For I = 0 To 3
  QueryDate = DateAdd("m", I * -1, Left(DataDate, 4) & "/" & Right(DataDate, 2) & "/01")
  If I = 0 Then
%>
  <%= Right("0000" & Year(QueryDate), 4) & Right("00" & Month(QueryDate), 2) %>
<%
  Else
%>
  <%= Right("0000" & Year(QueryDate), 4) & Right("00" & Month(QueryDate), 2) %>
<%
  End If
Next
%>
 
 
CCCC : 
 
  DDD
<%
SqlStatement = "Select PURPOSE_CODE, PURPOSE_DESC " & _
  "From " & Application("odsMISRPT_DB") & ".BKL_MG_PURPOSE_CODE " & _
  "Order By PURPOSE_CODE"
Set Rs = Conn.Execute(SqlStatement)
Do While Not Rs.Eof
%>
 
  <%= ProcessXSS(Rs("PURPOSE_CODE")) & " " & ProcessXSS(Replace(Trim(Rs("PURPOSE_DESC")), " ", "")) %>
<%
  Rs.MoveNext
Loop
Rs.Close
Conn.Close
Set Rs = Nothing
Set Conn = Nothing
%>
 
 

EE:<%= Session("Message") %>



»»»FFFF