Please enable JavaScript to view this site.

Navigation: Advanced topics

How to add external files

Scroll Prev Next More

 

Follow the instructions below to add your files with JavaScript/CSS/C# code to the project.

Copy your files to the project folder

Copy your files to the source folder in the project directory (e.g., ..\Documents\ASPRunner.NETProjects\Project1\source). Organize the files into subfolders if needed.

 

For example, you want to add images right.png and wrong.png to the images folder, a new HTML template quiz.cshtm to the templates folder, and a simple CSS file quiz.css. To perform this:

 

Create the folder called images inside the source folder and copy the images right.png and wrong.png there.

Create the folder called templates inside the source folder and copy the file quiz.cshtm there.

Copy the file quiz.css directly into the source folder.

 

When building the project, all files from the source folder are copied to the output folder while keeping the structure of the subfolders.

Link your files to pages

JavaScript

To add a link to Javascript file proceed to Style Editor -> Templates -> header.htm item and add the following code there:

 

<script type="text/javascript" src="include/customfile.js"></script>

 

This JavaScript file will be available on all pages of your application.

CSS

To add a link to Javascript file proceed to Style Editor -> Templates -> header.htm item and add the following code there:

 

<link REL="stylesheet" href="style.css" type="text/css">

 

This CSS file will be applied to all pages of your application.

C#

This article explains how you can add external C# files.  

 

 

 

 

C#/VB.NET DLL files

 

To add an external DLL file to your project proceed to Style Editor screen and under Custom Files create a new folder named bin. Select this folder and choose 'Import files'. Import your DLL file there. It should be something similar to this screenshot.

 

custom_files_dll
 
Then proceed to Event Editor screen and under "C# imports" event add the following code, assuming that your namespace is FlipAPP.
 

using FlipAPP;

 

 

Then you can use this DLL's objects and functions in any of C# events.

 

Note: when you compile your own DLL make sure that you do not select TargetFramework greater than .NET Framework version selected in ASPRunner.NET on the Output Directory screen.

 

 

See also:

Editor screen

Editing the <head> section

Event editor

AfterTableInit

AfterAppInit

Building a nice looking login page with Custom CSS

How to create a beautiful dashboard theme

Using CSS grid for mobile screens

Building visually appealing web applications