Change VBScript to and convert asp page to aspx page


I want to convet an asp page to aspx page using
The below is the code for the whole page. The main part is to convert the vbscript part hightlighted in the code

The page also send email and I can use existing mail sending classes to do that part.
**************************this part of the code needs changing********************
<%@ Language=VBScript %>
strID = CDbl(Request("strID"))
strLastname = Replace(Request.Form("strLastname"),"'","''")
strDocumentation = Replace(Request.Form("strDocumentation"),"'","''")
Set conn = Server.CreateObject("ADODB.Connection") Application("app1")
'copy old record to history table and add documentation
conn.execute("INSERT INTO accounts_history (accountid,firstname,lastname,address,city,zip,state,country,email,password,created,consent1,consent2,access, documentation) SELECT accountid,firstname,lastname,address,city,zip,state,country,email,password,created,consent1,consent2,access,'" & strDocumentation & "' as documentation FROM accounts where accountid = " & strID)
Set ds = Server.CreateObject("ADODB.Recordset")
ds.Open "SELECT * FROM accounts WHERE accountid = " & strID & "", conn, 1, 2
ds("lastname") = strLastname
intAccountID = ds("accountid")
strEmail = ds("email")
strPassword = ds("password")
Set ds = Nothing
Set conn = Nothing
<title>Mypage Inc. - Sareholder Register</title>
<h1>My page Register</h1>
<a HREF="Index.asp">Main Menu</a> &gt; Search Results &gt; Update Last Name
<font color="red">Account information has been updated. (<em><%= Now()%></em>)</font>
<form action="" method="GET" id="form1" name="form1">
Search by <strong>last name:</strong>&nbsp;<input type="text" id="text1" name="text1"><input type="submit" value="Search" id="submit1" name="submit1"><br>
Search by <strong>account number</strong>&nbsp;<input type="text" id="text2" name="text2"><input type="submit" value="Search" id="submit2" name="submit2">
strBody = "Dear Stockholder:" & vbCrLf & vbCrLf & "This is to confirm that we completed the update of your account information per your request." & vbCrLf & vbCrLf
strBody = strBody & "This is an automatically generated post only e-mail. Please do not reply." & vbcrlf & vbcrlf
strBody = strBody & "To view your account statement online, please visit the following URL:" & vbcrlf & "" & intAccountID & "&pw=" & strPassword & vbcrlf & vbcrlf & vbcrlf
strBody = strBody & "For all other shareholder services, please visit our investor relations Web site at:" & vbcrlf & "" & vbcrlf & vbcrlf
strBody = strBody & "Account Number:     " & intAccountID & vbcrlf & vbcrlf & "Password:           " & strPassword & vbcrlf & vbcrlf & vbcrlf 
strBody = strBody & "Best regards," & vbcrlf & vbcrlf & "Mypage" & vbcrlf & vbcrlf
Set Mailer = CreateObject("CDONTS.NewMail")
Mailer.From = """Mypage Inc.""<>"
Mailer.To = strEmail
Mailer.Subject = "Confirmation"
Mailer.Body = strBody
Set Mailer = Nothing
The following email has been sent to <b><code><%=strEmail%></code></b><p>

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David H.H.LeeCommented:
Hi nirisan,
There are a vast topic to aspx conversion. This official site can guide you the important steps regarding the necessary changes should be take for asp convert to aspx.

If you tend to use existing asp code under environment, the easiest solution is add aspcompat mode and remain the existing vbscript that running behind.
<%@ Page AspCompat="true" Language="VB" %>

Check this MSDN descriptions:


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.