Last post Feb 01, 2006 07:54 PM by tyrus
Feb 01, 2006 05:18 PM|uswebpro|LINK
Feb 01, 2006 06:26 PM|Darmark|LINK
I'm assuming your notify.vb is a class file.
Give your class file a 'Namespace' Name, like below:
In your code behind of your aspx page, reference your class file above like this.
Put that above line of code above your Page Load Event.
Then when you want to call your Method in your notify.vb file, do this
OR, if passing a parameter:
Hope this helps.
Feb 01, 2006 06:27 PM|tyrus|LINK
inherits Notify \\at the top of the page's code behind
Dim Notify as new Notify \\before you try to use it, then
Try doing one of the quick tutorials on Object Oriented Programming. I'm no expert on this, but i'm working on it!
If you set up notify.vb as a class with a namespace declared in it it will appear in intellisense when you do this. (It may anyway) But then if you have a public sub in the notify.vb it will pull it up. Like say the sub is called AddNumbers
You would then have Notify.AddNumbers("123")
Feb 01, 2006 07:13 PM|uswebpro|LINK
Feb 01, 2006 07:27 PM|uswebpro|LINK
Feb 01, 2006 07:54 PM|tyrus|LINK
Hmm. If that's all that is in that class. Then it doesn't have any functions. Is that all there is??
The file is in the right place but it needs some functionality i.e.
Public Class notifyFunction
' get record info here
Function Hello(ByVal vVar1
If vVar1 =
' prepare smtp notification
' send notification
Then you call the function Hello("Hi") from another page that imports this class.