Converting from Classic ASP -- using VB .NET
Ok - I have a function called checkNull in VBScript:
I am lost as to how to integrate this into ASP .NET.
I can include it in my .aspx file and it works fine -- but I should be able to build a class with this function (and then a few others) -- and then import it into my aspx page shouldn't I?
I'm guessing the file will look something like this:
I call this file DataFormatFunctions.ascx (and I know I missed some important stuff in this file)....
I hate to ask like this but I am lost and becoming frustrated:
1. can someone glance at this and point me in the right direction -- that is all the text in my ascx file -- and I know I am missing something(s).
2. what do I need to add to my main aspx page to make these functions available to the main aspx page
Thanks.
Ok - I have a function called checkNull in VBScript:
Code:
Function checkNull(fieldValue2,decimals)
If isNull(fieldValue2) Then
checkNull = 0
Else
checkNull = FormatNumber(fieldValue2,decimals)
End If
End Function
I am lost as to how to integrate this into ASP .NET.
I can include it in my .aspx file and it works fine -- but I should be able to build a class with this function (and then a few others) -- and then import it into my aspx page shouldn't I?
I'm guessing the file will look something like this:
Code:
Public Class DataFormatting : Inherits Page
Function checkNull(fieldValue2 as double,decimals as integer)
If len(fieldValue2)=0 Then
checkNull = " "
Else
checkNull = FormatNumber(fieldValue2,decimals)
End If
End Function
End Class
I call this file DataFormatFunctions.ascx (and I know I missed some important stuff in this file)....
I hate to ask like this but I am lost and becoming frustrated:
1. can someone glance at this and point me in the right direction -- that is all the text in my ascx file -- and I know I am missing something(s).
2. what do I need to add to my main aspx page to make these functions available to the main aspx page
Thanks.