G
Guest
Hi all,
I have been thinking for long long time that how to create VB style class
in ASP .NET page. Below I am writing code written in normal ASP that I want
to convert to ASP .NET. I need your help for how to convert it. Please follow
the code below
----------------------------------------------------------------
[[[[[[[[[[[[[[[[[TestClass.asp]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
----------------------------------------------------------------
<%
Class TestClass
Sub JustPrint()
%>
<p>Hi this is just the test print</p>
<%
End Sub
Sub OtherPrint()
%>
<p>Hi this is another print</p>
<%
End Sub
End Class
%>
----------------------------------------------------------------
[[[[[[[[[[[[[[[[[Main.asp]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
----------------------------------------------------------------
<%@ Lauguage="VBSCRIPT"%>
<!--#include file="TestClass.asp"-->
<%
'Creating the class object
Dim clsObj
set clsObj = New TestClass
Dim requestedVal
requestedVal = Request.QueryString("type")
Select Case requestedVal
case 'other':
clsObj.OtherPrint
case else:
clsObj.TestPrint
End Select
%>
I think the above sample program is very simple. How can I convert the above
program with the same sort of flow control into ASP .NET.
My another question is "Can I still use #include directive in ASP .NET? I
want to break my HTML page into HEADER, SIDE MENU and FOOTER parts"
Your help will be appreciated
I have been thinking for long long time that how to create VB style class
in ASP .NET page. Below I am writing code written in normal ASP that I want
to convert to ASP .NET. I need your help for how to convert it. Please follow
the code below
----------------------------------------------------------------
[[[[[[[[[[[[[[[[[TestClass.asp]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
----------------------------------------------------------------
<%
Class TestClass
Sub JustPrint()
%>
<p>Hi this is just the test print</p>
<%
End Sub
Sub OtherPrint()
%>
<p>Hi this is another print</p>
<%
End Sub
End Class
%>
----------------------------------------------------------------
[[[[[[[[[[[[[[[[[Main.asp]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
----------------------------------------------------------------
<%@ Lauguage="VBSCRIPT"%>
<!--#include file="TestClass.asp"-->
<%
'Creating the class object
Dim clsObj
set clsObj = New TestClass
Dim requestedVal
requestedVal = Request.QueryString("type")
Select Case requestedVal
case 'other':
clsObj.OtherPrint
case else:
clsObj.TestPrint
End Select
%>
I think the above sample program is very simple. How can I convert the above
program with the same sort of flow control into ASP .NET.
My another question is "Can I still use #include directive in ASP .NET? I
want to break my HTML page into HEADER, SIDE MENU and FOOTER parts"
Your help will be appreciated