Can we use a function located at aspx.vb file from a function inside a vb class file?
Can we use a function located at aspx.vb file from a function inside a vb class file?
Can we use a function which is shared or public or any of criteria needed to call a function which is defined in aspx.vb file and I want to call it from my vb class file. Is it possible?
Thanks for Helping.
Option Strict On
That doesn't sound like something you should be doing. Why would a class need to call a method in a page? It makes sense the other way around but I would suggest that if it seems a good idea to do it as you suggest then there's something wrong with your design.
– jmcilhinney
Jun 29 at 10:17
@AndrewMorton when I tried it I could not create object for my page so that I was not Able to find my method
– Soul_Hunter
2 days ago
@jmcilhinney I am working on a system which is already developed and I can not change that function directly thats why I need to call it in this way
– Soul_Hunter
2 days ago
@Soul_Hunter In the Solution Explorer pane, can you expand the .aspx.vb file by clicking on the triangle next to it and find the function you need?
– Andrew Morton
2 days ago
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
What went wrong when you tried it? Hint: making sure the project is using
Option Strict On
may make it easier as IntelliSense will be able to offer autocomplete suggestions.– Andrew Morton
Jun 29 at 9:53