simple asp migration to asp.net question

P

pete

Simple question, so simple answer I hope. I am trying to upgrade my asp
skills to asp.net so please bear with me for a few moments. I want to create
a simple custom control that returns a string value, but not a web control.
In the asp that I know this works

default.asp code:
<%@language="vbscript">
<!--#include file="functions.asp"-->
<%
if not (functionb) then
response.write "The value of the function called functiona is " &
functiona
else
response.write "Try again later."
end if
%>

functions.asp code:
<%
function functiona
functiona = "My name is Pete"
end functiona

function functionb
if cint(year(date)) = 2004 then
functionb = true
else
functionb = false
end if

%>

How can I do the above in asp.net using a custom control? I know that I can
register the control and use a web control to do this but this is just an
example. I have a lot of classic asp code that uses include files where the
include files have functions that return different types of data and I don't
always want to display the value of those functions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top