>>I think everything in .Net has to be in a class.
>
>Ok
>
>>Create a WebCommon class with your method in it. Make the method static and you can call it from both aspx pages.
>
>I'm new to this. What would be the step in order to make this new class static.
I'm a C#'er so not 100% sure of the VB syntax. But, the fact of the method being static isn't what makes it callable from both pages, I guess I kinda misstated that. Making it static allows you to call it without instanciating the class. So, in your code you can just do...
MyResult = WebCommon.MyStaticMethod(Whatever)
without having to createobj, or whatever you do to instanciate in VB.Net.
If the webcommon class is in the same project and the same namespace as your aspx pages it should be callable. If you want to put your webcommon in another project you would have to add a reference to that project from your webpage's project to use it.
BOb
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only