VB code in classic ASP
Hi,How to write vbscript code in a classic ASP pages? Ex: Dim str as String.
and also how can I write Try Catch block in asp page?
Thanks..
< html>
< head>
< %
sub vbproc(num1,num2)
response.write(num1*num2)
end sub
%>
< /head>
< body>
< p>You can call a procedure like this:</p>
< p>Result: < %call vbproc(3,4)%></p>
< p>Or, like this:</p>
< p>Result: <%vbproc 3,4%></p>
< /body>
< /html>
//You can call a procedure like this:
Result: 12
Or, like this:
Result: 12
Set Obj = Server.CreateObject("dllname")
UserID=Obj.DecryptForASP(encryptedUserID)
Private Sub populateCountries(ByVal cmb As ComboBox)
Try
Dim dsCountries As DataSet = GetcountryNamesUsingQuery()
If dsCountries.Tables(0).Rows.Count > 0 Then
cmb.DataSource = dsCountries.Tables(0).DefaultView
End If
cmb.SelectedIndex = -1
Catch ex As Exception
End Try
End Sub
If Err.Number <> 0 Then
Response.Write (Err.Description)
Response.End
End If
On Error Resume Next