Solved

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

Posted on 2009-05-08
2
248 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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now