Solved

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

Posted on 2009-05-08
2
251 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

943 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

15 Experts available now in Live!

Get 1:1 Help Now