Solved

asp to aspx.vb - includes previously permitted in asp not permitted in aspx.vb - how to ?

Posted on 2009-05-08
2
257 Views
Last Modified: 2013-12-24
in an earlier asp project file I have calls to functions and sub procedures that heretofore were made available via include statements in the following format <!--#include file = "SQLHelp.asp-->

this is no longer legal in the VS 2005 web application project.

I know that I can add the respective asp function or sub that is resident in the above include to the aspx.vb codebehind file - or I think I can - but it is very convenient to be able to add an include and use the tools I need to the respective aspx file I am working with.

Any options consistent with my above thoughts I could use - I heard soemthing about an "include virtual" option - however I have not been able to make that work in the aspx.vb file.

javascript includes within html tags - working okay

looking for advice - clear concise instruction - an example would be good.

thanks if you are willing to help.

G
0
Comment
Question by:gregcis
2 Comments
 
LVL 1

Accepted Solution

by:
lizatexp earned 500 total points
ID: 24341393
You could create a vb file called something like Helper.vb and put it under App_Code.

Then in your code behind you just call Helper.Function1 to get things done.


Heler.vb:
 
Public Class Helper
  
  Public Shared Function Function1() As Integer
    ...
  End Function
 
  Public Shared Function Function2() As Integer
    ...
  End Function
 
End Class

Open in new window

0
 

Author Comment

by:gregcis
ID: 24370435
Hi - sorry to not respond to your solution sooner - it actually took me 2 days to understand how to use your "App_Code" reference - it seems to work - I have many more issues to address realtive to my piece of work.  How might I reach you in the future?
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
The viewer will learn how to count occurrences of each item in an array.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question