Upload
gabriela-lopez
View
116
Download
4
Embed Size (px)
Citation preview
ASPRunner.Net manual
© 2009 Xlinesoft
ASPRunner.Net manualI
© 2009 Xlinesoft
Table of ContentsPart I Introduction 1
................................................................................................................................... 11 Welcome
................................................................................................................................... 12 System requirements
................................................................................................................................... 23 Licensing details
................................................................................................................................... 34 What is the registration
Part II Using ASPRunner.NET 4
................................................................................................................................... 41 Working with projects
................................................................................................................................... 52 Connecting to the database
................................................................................................................................... 93 Datasource tables
................................................................................................................................... 124 Master-detail
................................................................................................................................... 155 Choose pages
................................................................................................................................... 186 Login page
................................................................................................................................... 197 User login settings
................................................................................................................................... 238 Avanced Security Settings
................................................................................................................................... 259 User group permissions
................................................................................................................................... 2610 Fields order and totals
................................................................................................................................... 2811 Miscellaneous settings
................................................................................................................................... 2912 Choose theme
................................................................................................................................... 3013 Visual Editor
.......................................................................................................................................................... 30About
.......................................................................................................................................................... 31Toolbars
.......................................................................................................................................................... 34Page Elements
.......................................................................................................................................................... 35"View as" settings
.......................................................................................................................................................... 41"Edit as" settings
.......................................................................................................................................................... 48Validation types
.......................................................................................................................................................... 50Lookup wizard
................................................................................................................................... 5614 Events
................................................................................................................................... 5715 Output directory settings
................................................................................................................................... 5916 After you done
................................................................................................................................... 6117 FTP upload
................................................................................................................................... 6218 FrontPage Publishing
Part III Advanced topics 64
................................................................................................................................... 641 Master-details relationship
................................................................................................................................... 642 AJAX-based Functionality
................................................................................................................................... 693 Connecting to database
.......................................................................................................................................................... 69Connecting to MS Access database
.......................................................................................................................................................... 72Connecting to MS SQL Server database
.......................................................................................................................................................... 75Connecting to MySQL database
IIContents
II
© 2009 Xlinesoft
.......................................................................................................................................................... 78Connecting to Oracle database
................................................................................................................................... 814 Publishing ASP.NET application to the remote Web server
.......................................................................................................................................................... 81Using FTP client to publish ASP.NET pages to the remote Web server
.......................................................................................................................................................... 84Using FrontPage to publish ASP.NET pages to the remote Web server
................................................................................................................................... 865 Demo Account
.......................................................................................................................................................... 86What is the Demo Account
.......................................................................................................................................................... 87Terms and conditions
................................................................................................................................... 906 Events
.......................................................................................................................................................... 90More about events
.......................................................................................................................................................... 91Predefined actions
......................................................................................................................................................... 91Send simple email
......................................................................................................................................................... 95Send email with new data
......................................................................................................................................................... 98Save new data in another table
......................................................................................................................................................... 102Insert a record into another table
......................................................................................................................................................... 106Check if specific record exist
......................................................................................................................................................... 110Display a message on the WEB page
......................................................................................................................................................... 114Redirect to another page
......................................................................................................................................................... 117Custom code
.......................................................................................................................................................... 120Sample code
......................................................................................................................................................... 120Show list of customer orders
......................................................................................................................................................... 121Before deleting a record check if related record exist
......................................................................................................................................................... 122Check if start date is earlier then end date
......................................................................................................................................................... 122Speed up data entry using events
Part IV Order ASPRunner.NET online 123
ASPRunner.Net manual1
© 2009 Xlinesoft
1 Introduction
1.1 Welcome
Welcome and thank you for choosing ASPRunner.NET!
ASPRunner.NET creates set of ASP.NET pages to access and modify Oracle, SQL Server,MySQL, MS Access database or any other ODBC datasource. Using generated ASP.NETpages users can search, edit, delete, and add data into database. ASPRunner.NET isextremely easy to learn, you can get started in just 10 minutes!
Features:· Easy to use wizard-like interface· Generates 100% pure ASP.NET code· Number of search modes· Add, view, edit, and delete pages· Password-protected access to the database
Benefits of using ASPRunner.NET are:· Can save you time and money.· Improve functionality of your web site.· Create robust, easy to modify code.· Easy to use, you can generate your first ASP.NET pages in just ten minutes.· No programming required.
What ASPRunner.NET can do for me:· Collect user's information.· Phone/address book.· News articles.· Products listing.· Web-based database searching & data entry.· Web-based reporting.
Visit ASPRunner.NET online
1.2 System requirements
ASPRunner.NET is designed for Windows operating systems including Windows 2003,Windows XP, Windows 2000. Windows Me, Windows 98, Windows 3.1 systems are notsupported.
To run with ASPRunner.NET, your system should be equipped with the following:· Microsoft .NET Framework Version 2.0 Redistributable Package
The .NET Framework version 2.0 redistributable package includes everything you need
Introduction 2
© 2009 Xlinesoft
to run applications developed using the .NET Framework· Microsoft ADO Version 2.8 or higher (for connection to ODBC Data Source). This is
already the case for users running Windows 2000/XP or have MS Access 2000/XPinstalled
· 486 processor (minimum) or faster (recommended)· 32 MB RAM (minimum) or more (64 MB or more recommended)· Windows operating system such as Microsoft Windows 2003, XP, 2000· 15 MB free disk space (minimum) or more· Microsoft Access Data Objects comes with support of MS SQL, Oracle, MS Access,
Excel, MS FoxPro databases. If you use another database ( e.g. MySQL or DB2 ), youhave to install appropriate ODBC driver for your database. See ODBC help topic fordetails.
· Microsoft IIS 6.0 or higher. Internet Information Server (IIS) is required to testgenerated ASP.NET pages locally.
· Optional: Visual Studio .NET 2005/2008 or Visual Web Developer
ASPRunner.NET also requires a few other system files. To update your system, go theMicrosoft download pages listed below. If you are not yet using IE 6.0, it is recommendedto install it as it includes most if not all of the required files.
Databases Supported
ASPRunner.NET can connect to virtually any ODBC compliant database using theappropriate drivers installed on the computer where ASPRunner.NET is present. Supporteddatabases include:
· Microsoft SQL· Microsoft Access· Oracle· MySQL
All other databases with an appropriate ODBC driver
The generated code does not require ODBC connectivity.
1.3 Licensing details
1. License
By receiving and/or using ASPRunner.NET, you accept the following Evaluation andRegistered User Agreement. This agreement is a binding legal agreement betweenXLineSoft and the purchasers, users or evaluators of XlineSoft's software and products. Ifyou do not intend to honor this agreement, remove all installed XLineSoft products fromyour computer now.
2. Evaluation (Unregistered) and Registered User Agreement
You may evaluate this program for maximum of twenty one calendar days, after which you
ASPRunner.Net manual3
© 2009 Xlinesoft
must register the program with XLineSoft or remove the software from your computer.
You may allow other users to evaluate copies of the unregistered software. All evaluationusers are subject to the terms of this agreement.
The evaluator/user/buyer/owner is not allowed to attempt to reverse engineer, disassembleor decompile any XLineSoft products.
XLineSoft name and any logo or graphics file that represent our software may not be usedin any way to promote products developed with our software. All parts of XLineSoftproducts are copyright protected. No program, code, part, image, video clip, audio sample,text or computer generated sequence of images may be copied or used in any way by theuser except as intended within the bounds of the single user program.
The evaluator/user/buyer/owner of XLineSoft will indemnify, hold harmless, and defendXLineSoft against lawsuits, claims, costs associated with defense or accusations that resultfrom the use of XLineSoft products.
XLineSoft is not responsible for any damages whatsoever, including loss of information,interruption of business, personal injury and/or any damage or consequential damagewithout limitation, incurred before, during or after the use of our products. Our entireliability, without exception, is limited to the customers' reimbursement of the purchaseprice of the software (maximum being the suggested retail price as listed by XLineSoft) inexchange for the return of the product, all copies, registration papers and manuals, and allmaterials that constitute a transfer of ownership from the customer back to XLineSoft.
Each registered copy of the ASPRunner.NET may be used in only one single location by oneuser. Use of the software means that you have loaded the program and run it or haveinstalled the program onto a computer. If you install the software onto a multi-userplatform or network, each and every individual user of the software must be registeredseparately.
You may make one copy of the registered software for backup purposes, providing you onlyhave one copy installed on one computer being used by one person. If any person otherthan yourself uses XLineSoft software registered in your name, regardless of whether it isat the same time or different times, then this agreement is being violated!
The sale of and or distribution of registered copies of this software is strictly forbidden. It isa violation of this agreement to loan, rent, lease, borrow, or transfer the use of registeredcopies of XLineSoft products.
1.4 What is the registration
ASPRunner.NET is "Try before you buy" software. This means that we have made thesoftware available to you for free evaluation. You are entitled to evaluate the software forup to 21 days without obligation to pay. After 21 days, if you decide to keep the software,you must register your copy with us.
Demo version (non-registered) of ASPRunner.NET is a "full-featured" release. This meansthat the same capabilities available in the registered software are present in the non-
Introduction 4
© 2009 Xlinesoft
registered software. This allows you to try out all the features in ASPRunner.NET to confirmthat they work to your satisfaction.
Registration entitles you free technical support for 30 days and free minor upgrades to thesoftware. Registration may also entitle you to discounts on new software releases fromXLineSoft. We will also send you information bulletins by email to let you know aboutwhat’s happening with other XLineSoft products.
Finally, by registering the software, you provide us with the resources and incentive tosupport the software with updates and to develop additional quality software products inthe future.
How can I register?
2 Using ASPRunner.NET
2.1 Working with projects
Project structure
With ASPRunner.NET, you can save all your settings in a single project file and do not haveto go through individual files if you simply need to change a single label or field format.
For each project ASPRunner.NET saves to its own directory with the followingsubdirectories:
1.visual - Contains modified visual templates.2. tmp - Temporary storage of visual templates.3.output - Directory with output files. You can change or rename the Output directory.
The default directory for a new project is projects/project_name. The Project file will besaved in the project directory as project_name.netr.
When you open a project created with a previous version of ASPRunner.NET, you areprompted to choose a project directory. After you select a directory, your project file iscopied to it. Then the next time you open your project it will be from the folder youselected, not from the original location.
If you upload files to the Web server using third party FTP client software, you must uploadthe entire contents of the output directory.
When you make a backup of your project, you should include all files in the projectdirectory together with all subdirectories. At a minimum, you should backup the project fileitself along with all files in the visual directory.
Click the "Project" button and select from the drop down list to open an existing project orto save the current one.
Opening an existing project
ASPRunner.Net manual5
© 2009 Xlinesoft
To open existing project or save a current one, click Project button any time.
Saving a project
If you want to save the current project under a different name - for example, developmentpurposes or to create a backup - select the "Save Project As" option. A new projectdirectory will be created and all necessary project files will be copied to it.
Note: ASPRunner.NET creates a new project automatically upon startup.
2.2 Connecting to the database
ASPRunner.NET supports the following databases:· MySQL· Oracle· Microsoft SQL Server· MS Access
Using ASPRunner.NET 6
© 2009 Xlinesoft
Select your database type and press Next>>. Depending on the selected database typeyou will see one of the database-specific dialog boxes shown below.
Connecting to MySQL - type the Host/Server Name (usually localhost), user name,password and click Connect.
ASPRunner.Net manual7
© 2009 Xlinesoft
Select Database and click Next >>.
Connecting to Oracle, Microsoft SQL Server - type the Database Name, username,password and click Connect.
Connecting to MS Access (ODBC Data Source) - browse for database file. Press Openwhen done.
Using ASPRunner.NET 8
© 2009 Xlinesoft
Check Create a databse copy in App_Data folder if you want relative path to be used indatabase connection string. Please also specify the path name if the database is located ata subfolder from the root. Use this option if you plan to transfer files to the remote Webserver. In this case ASPRunner.NET creates a copy of database in the Output folder. ASP.NET pages will work with this database file copy which means you won't see changes inoriginal database file.
ASPRunner.Net manual9
© 2009 Xlinesoft
Press Next>> when done.
Click the Recent database button to see a list of recently opened databases. You can usethis button to quickly connect to previously opened databases.
After you successfully connected to database, it is time to select datasource tables.
2.3 Datasource tables
Choosing datasource tables and views to build ASP.NET code
After you successfully connected to database, check off all datasource tables you'd like tobuild ASP.NET code for. After that highlight one of selected tables and step through otherscreens in ASPRunner.NET adjusting settings for selected table. You can always see nameof currently selected table in the middle of blue info pane.
NOTE: ASPRunner.NET use SubSonic as a Data Access Layer framework. You can find
Using ASPRunner.NET 10
© 2009 Xlinesoft
more about SubSonic at http://www.subsonicproject.com.
DAL limitations: Every database table needs to have one primary key. Compound primarykeys not supported.
To switch between selected tables use Table list button on the left.
If you'd like to keep default settings for the rest of tables jump to Output directory taband build ASP.NET code.
Using Add new table window you can add a new table to existing database.
ASPRunner.Net manual11
© 2009 Xlinesoft
For each field type name, type, size, scale (applies to DECIMAL datatype in SQL Server,Oracle and MySQL only). Set the Primary key field. Databases created with ASPRunner.NETwill be saved into C:\Program Files\ASPRunner.NET\database.mdb (database1.mdb,database2.mdb etc.)
NOTE: Don't change table settings after you've built the project and added data records.All data will be lost after table modification.
To edit or delete tables right click on the table name in the list.
Add table view
This feature creates an additional view of the same table. This feature is useful when youlike to present several views of the same data.
Example:
Table Cars shows all cars in the database. SQL query: Select * from Cars.
View Active listings displays active listings only. SQL Query: Select * from Cars wherestatus='active'
Using ASPRunner.NET 12
© 2009 Xlinesoft
View Closed listings displays closed listings only. SQL Query: Select * from Cars wherestatus='closed'
SQL query can be modified later on SQL query tab in ASPRunner.NET.
2.4 Master-detail
Setting master-detail relationship between tables
Master-details relationships are very common in applications. An example of this type ofrelationship is an order with a header and line items. In ASPRunner.NET you can join, orlink, two or more data sets that have at least one common field. This topic explains master-details relationships in great details.
ASPRunner.Net manual13
© 2009 Xlinesoft
Using ASPRunner.NET 14
© 2009 Xlinesoft
1. To create master-detail relationship in ASPRunner check off both master and detailtables in the list of datasource tables.
2. Drag and drop master key to detail key.
3. Double click on the relationship line.
4. Choose Master key(s)
5. Choose Details table Foreign key(s) (fields that matches Master key(s) in the Mastertable)
6. If you'd like to display Master record info on the Details page check off correspondingcheckbox.
Master page settings:
1. Preview detail records in popup
ASPRunner.Net manual15
© 2009 Xlinesoft
2. Preview detail records inline
One Master table can have multiple Details tables.
2.5 Choose pages
Choose pages
To create View page, Edit page, Export page, Printer-friendly page, Add new, Copyand Delete record pages check off corresponding checkboxes.
Inline add/Inline edit functions allow you to add/edit multiple records without leaving
Using ASPRunner.NET 16
© 2009 Xlinesoft
the List page. Inline Add/Edit functions use the same Edit as types as the regular Add/Editpages.
In order to update and delete records in the database you have to select key field. You cansee selected key columns on the right. To change key columns click Edit button.
Note: Key column is the database column which lets you query each table rowindividually and modify each row without altering other rows in the same table. Thevalues that compose a key column a unique; no two values are the same.
In MS Access the best choice for key column is autonumber field.
ASPRunner.Net manual17
© 2009 Xlinesoft
Choose fields
On this page you can choose fields to appear on each page. Check off or uncheckcorresponding checkboxes.
Using ASPRunner.NET 18
© 2009 Xlinesoft
2.6 Login page
You can password-protect access to your database with ASPRunner.NET.
You can choose between two following options:
Hardcoded username and password - all your users will use the same login/passwordcombination.
Username and password from database - choose this method if you store username/password combinations in your database. In this case you need to choose database tablewith passwords and fields that store usernames and passwords.
ASPRunner.NET will generate additional ASPX page named login.aspx which containsusername/password validation.
If second option is selected, you can also set Avanced Security Settings.
Click User login settings button to create user self-register page, password reminder,change password pages.
ASPRunner.Net manual19
© 2009 Xlinesoft
2.7 User login settings
Click User login settings button to create user self-register page, password reminder,change password pages, encrypt passwords using MD5 algorithm.
In the Email settings you can enter SMTP settings and email which will be used to sendemails to users.
By clicking Choose fields... button, you can select fields that will appear on theregistration page. Do not forget to choose field where user email is stored if you are goingto use Send email to user option or Remind password page.
Using ASPRunner.NET 20
© 2009 Xlinesoft
Bold fields are required.
Send activation link - email with activation link will be sent after the registration. Thepurpose of the activation link is to ensure that the user signs up with a real, active emailaddress that they own. This limits the number of times someone can sign up, and preventspeople who have been booted off a site from signing up again multiple times with fakeemail addresses. User access is denied until activation link is open in the browser.
You can select one of your fields or create new one where activation flag will be stored. Thisfield needs to be numeric (Number, INT or TINYINT).
Captcha protection - CAPTCHA is a simple test to determine if a user is a computer or ahuman. It is used to prevent spam abuse on the websites. So if you use CAPTCHA in yourapplication, this can help in stopping some bots and making life harder for other bots inaccessing or using your project.
Registration page:
ASPRunner.Net manual21
© 2009 Xlinesoft
Restrict weak password - this option allows to restrict using simple passwords. You canselect minimum password length, number of unique characters, digits or symbols.
Encrypt passwords - passwords are encrypted using MD5 algorithm. If you choose toencrypt password Password reminder page will reset your password and send it to user
Password reminder page:
Using ASPRunner.NET 22
© 2009 Xlinesoft
Change password page:
ASPRunner.Net manual23
© 2009 Xlinesoft
2.8 Avanced Security Settings
1. Users can see and edit other users data
Every user who logged in successfully can view, edit, and delete other users data.
2. Users can see and edit their own data only
This option allows to restrict users to view and edit their own records only. To use thisoption you need to set a relationship between table that holds usernames and passwordsand main data table.
3. Users can see other users data, can edit their own data only
This option is similar to Option 2 however, all users can view other users data but cannotedit or delete them.
Using ASPRunner.NET 24
© 2009 Xlinesoft
Admin User
When Option 2 or Option 3 is selected, you can also define Admin user who can access,edit, and delete all records in the database. To set Admin User, you need choose one ofavailable UserIDs.
Guest login
This option adds guest read only access to the database. If this option selected, "Login asguest" link will be added to the login screen. Guest user cannot edit, delete or add newrecords to the database.
Define user group permissions
Click Define user group permissions button to use group-based permissions model.
ASPRunner.Net manual25
© 2009 Xlinesoft
2.9 User group permissions
This feature allows to assign table level permissions on database tables and views. I.e. userA can add data into table1 and edit data in table2, user B can edit and search data in table1and can delete data in table2 etc.
To use this feature proceed to Security step in ASPRunner.NET, click on "Define usergroup permissions".
On this screen, you can create user groups with assigned set of permissions. To add a newgroup, click "Add group". A dialog box will appear where you can choose username whichdefines this group and define initial set of permissions. Afterwards, you can changepermissions for certain tables.
Apart from this, you can create a default group with a default set of permissions. When auser not belonging to any of specified groups is logged in, the default set of permissionsmentioned above is assigned to him. For example, as shown on the screenshot above, theuser not belonging to any of the groups, is able to edit and delete data, but is not able toadd or search records in any table.
Also you can create a user group based on non-exising GroupID field value (if you plan toadd users to this group later).
To delete selected group, click "Delete group."
To overwrite existing group, click "Add group" and choose the same username.
With this security model you can also use Guest account with readonly access and Admin
Using ASPRunner.NET 26
© 2009 Xlinesoft
user with full permissions on all tables. You can add more permissions to the Guest accounthowever this is not recommended.
2.10 Fields order and totals
This page allows to set fields order on each page. To change fields order on specific page,make this field or several fields selected and click on Up/Down buttons to move it up ordown. Also you can use Drag & Drop to move fields.
- to apply changes to all tables click this button.
Menu tab - Allows to change the order of tables on the menu.asp page. This tab isavailable when more than one table had been chosen for this project. On the &ldots;_list.aspx page Quick jump box will appear which contains list of tables for quick jump betweentables.
ASPRunner.Net manual27
© 2009 Xlinesoft
Also you can add totals calculation to some fields on the list/printer-friendly pages. You canchoose between TOTAL, AVERAGE, and COUNT aggregate functions. To do it, select thefield/fields you want to add totals calculation to and choose function type from drop-downbox.
Using ASPRunner.NET 28
© 2009 Xlinesoft
2.11 Miscellaneous settings
Language
Use the Language drop-down box to choose the Project language. By clicking Multiplelanguage button you can select several Project languages and give the user ability tochoose language while logging in.
ASPRunner.Net manual29
© 2009 Xlinesoft
Regional settings
Choose required country from drop-down box.
Label Editor
Label Editor allows you to edit table and field labels. You can translate labels into severallanguages if multilanguage support turned on in your project.
Table specific settings
Miscellaneous settings that can vary from table to table. Use drop-down box with tablenames to switch between tables.
In the Menu - you can create menu item for this table and rename table in Caption box.
Truncate large text fields ...
This option adds "More ..." link to long text field while first XXXcharacters displayed on the page. "More ..." link displays a popupwith the whole field content.*
*It is undesirable to use this option together with Rich Text Editor
Also you can enter number of records to appear on each list page.
2.12 Choose theme
On this page a user can choose theme for displaying pages.
Theme is the combination of layout and color scheme.
Using ASPRunner.NET 30
© 2009 Xlinesoft
The Choose theme page consists of 3 sections/zones.
Left part: Tables list - files tree. Moving across files, you can view how the selected pagewill look like.
Middle part - themes selection. The user can choose themes either from the predefined listor in the advanced mode - choose layout and colors scheme separately. To switch betweenstyles, click Show advanced mode button.
Note: The theme you've chosen will be applied to all pages of the project.
2.13 Visual Editor
2.13.1 About
Visual Editor built-in in ASPRunner.NET is an editor control that allows the user to editHTML contents in a more user friendly way. The editor control is very flexible and enablesthe user to change the appearance of the pages in design or html mode.
ASPRunner.Net manual31
© 2009 Xlinesoft
Features:· Allows to see what the end result will look like while the pages are being created.· Simply drag and drop objects onto the page and position them freely in the layout.· No html coding is required and you do not need any web experience.· Advanced users can make any changes and then go into the HTML mode and clean up
the HTML code.
Visual Editor Topics:· Toolbars· Page Elements· Formatting Options· Validation Types· Lookup Wizard
2.13.2 Toolbars
Toolbars are the heart of the Visual Editor and provide a plenty of possibilities. The tablesbelow describe the tools that can be found on the Main and Left toolbars along with its use
Using ASPRunner.NET 32
© 2009 Xlinesoft
(some of them are also available from the right-click menu).
Main ToolbarButton Tool Name Description
Reset Cancel all changes on thepage and return allelements to the initialposition.
Design Mode Visual HTML Editor
HTML Mode Edit as HTML code
Undo Undo the last action
Redo Redo the last action
Insert ASP code snippet Insert ASP code snippet
Insert Field Insert a database field
Font Color Change the color of the text
Table Properties Allows to insert a new tableor edit properties of theexisting tables.
Show Borders Show or hide table borders
Image Insert an image
ASPRunner.Net manual33
© 2009 Xlinesoft
Hyperlink Insert a hyperlink
Edit Allows to cut, copy andpaste text, undo changes orinsert custom HTML code
Numbered List Insert a numbered list
Bulleted List Insert a bulleted list
Outdent Accomplish right shift
Indent Accomplish left shift
Left ToolbarButton Tool Name Description
Insert Table When you press this buttonnew window appears inwhich you should specifynumber of rows andcolumns and tableattributes. After that newtable will be inserted in thespecified place.
Insert Row Before Before using this button youhave to set cursor into atable cell. New row will beinserted before the rowwhere specified cell islocated.
Insert Row After Before using this button youhave to set cursor into atable cell. New row will beinserted after the row wherespecified cell is located.
Insert Column Before Before using this button youhave to set cursor into atable cell. New column willbe inserted before thecolumn where specified cellis located.
Insert Column After Before using this button youhave to set cursor into atable cell. New column willbe inserted after the columnwhere specified cell islocated.
Delete Rows Delete specified row
Using ASPRunner.NET 34
© 2009 Xlinesoft
Delete Columns Delete specified column
Merge Right Merge two cells into one.The contents of the right cellis added to contents of theleft one.
Merge Down Merge two cells into one.The contents of the lowercell is added to contents ofthe upper one.
Split Cells This button splits the cellinto two parts.
Table Properties Open new window with tableproperties
Cell Properties Open new window with cellproperties
2.13.3 Page Elements
All changes user has done on the previous steps are immediately reflected on the VisualEditor screen. According to these changes the number of elements on the page may differ.Let's consider the possible types of the elements:
1.Header. The special element on which place the custom code may be inserted (theheader of your pages). For that you should create header.asp file and put it into the Include folder. By default there is no header.
2.Master table info. The special element on which place information about the mastertable may be inserted. For that user should set the corresponding settings on the
ASPRunner.Net manual35
© 2009 Xlinesoft
Datasource Tables tab.3.Custom Event. The special element on which place custom code that user added on
the Events tab may be inserted.4.Pagination. The special element that provides for the numbering of pages. It gives
users the ability to step through a large number of database rows in manageablechunks instead of the whole lot in one go.
5.Footer. The special element on which place the custom code may be inserted (thefooter of your pages). For that you should create footer.asp file and put it into the Include folder. By default there is no footer.
6.Fields. Each field selected on the Choose Fields tab will be presented on the page bycorresponding element and user is able to control its appearance with the help of "View as" or "Edit as" settings.
Sometimes users need to go back to previous steps to make new changes after they havechanged the initial view of the page. In this case after repeating return to the Visual Editorscreen an alert window will appear with the suggestion to reset the page.
2.13.4 "View as" settings
You can customize your data appearance on the list/view/print pages using formattingoptions on the "View as" settings dialog. To control the field appearance on the page clickright button over the field and choose Properties. Depending on selected format you willsee different box-dialogs.
Using ASPRunner.NET 36
© 2009 Xlinesoft
"View as" settings
You can control the field appearance on the list page. Choose between the followingformats:
Short Date - dates will be displayed in short format ( 02/17/2003 )
Long Date - dates will be displayed in long format ( 17 February 2003 )
Time - datetime values will be displayed as time ( 14:22:03 )
Currency - numeric values like 14000 will be displayed as $14 000.00 ( actual formatdepends on your system regional settings like currency symbol, decimal symbol etc.)
Percent - Example: 0.38 will be displayed as 38%.
Hyperlink - choose this format if you store hyperlinks in this database field. Thosehyperlinks will be made clickable automatically.
Email Hyperlink - choose this format if you store email addresses in this database field. Itwill be converted into mailto HTML code automatically.
ASPRunner.Net manual37
© 2009 Xlinesoft
File (available for Text and Binary fields)
Depending on field type (text or binary field) you will be able to choose either URL prefix tofolder where files are located or field name that stores filenames.
Here are some examples of URL prefix usage:
images/ - images folder is located in output directory/images/ - images folder is located under website root../images/ - images folder is located one level above
http://www.abc.com/images/ - full path to images folder
Note: in most cases URL prefix ends with forward slash.
Using ASPRunner.NET 38
© 2009 Xlinesoft
Mercedes-Benz-CL-500.jpg will be automatically converted into <img src="images/Mercedes-Benz-CL-500.jpg" border=0>
In case of Binary field you need to choose a field that stores filename. This filename isrequired to set correct file type when you retrieve uploaded file from the database. If youdon't choose filename field or leave it empty you will be presented with Open with ...dialog every time you download this file from the database.
Image (available for Text and Binary fields)
Binary field - if you store images in the database, ASPRunner.NET creates a code thatextracts images from database on the fly. Supported image formats are JPEG, GIF and BMP.If you want to display the thumbnail then you should select the appropriate checkbox andchoose the field name that holds the thumbnail.
ASPRunner.Net manual39
© 2009 Xlinesoft
Text field - choose image size and URL prefix similar to View as type File. If you want todisplay the thumbnail then you should select the appropriate checkbox and choose thethumbnail prefix. For example, if the original image file's name is example.gif andthumbnail file's name is th_example.gif correspondingly then the thumbnail prefix shouldhave the value of "th_".
Using ASPRunner.NET 40
© 2009 Xlinesoft
If you want to display the images using iBox plugin check corresponding checkbox.
More info about iBox plugin here.
US phone number - formats number as a US phone number. Supports 7-digit or 10-digitnumbers (123) 456-7890 or 123-4567
Number - choose this format if you like to format this field as number. Two digits afterdecimal point implied.
HTML - use this view type when you store formatted HTML code in database field and wishto display this HTML code on the list page.
Checkbox - use view format to present field value as a checkbox. Works best with thefollowing datatypes:
MS Access: Yes/No field
SQL Server: TINYINT or BIT field
MySQL: TINYINT
ASPRunner.Net manual41
© 2009 Xlinesoft
Oracle: NUMBER(1)
2.13.5 "Edit as" settings
You can customize your data appearance on the add/edit/advanced search pages usingformatting options on the "Edit as" settings dialog. To control the filed appearance on thepage click right button over the field and choose Properties. Depending on selected formatyou will see different box-dialogs.
"Edit as" formats· Text field· Text area· Password· Date· Radio button· File/Image· Lookup Wizard· Readonly
Fields format you've chosen is preserved on the Advanced search page, for example, drop-
Using ASPRunner.NET 42
© 2009 Xlinesoft
down boxes, date-pickers, checkboxes formats.
Text field - simple text box
See list of available validation types here.
Text area - mutlitrow text area. For advanced WYSIWYG edit capabilities check off "UseRich Text Editor" checkbox.
ASPRunner.Net manual43
© 2009 Xlinesoft
More info about choosing Rich Text Editor.
Password - password field. All entered characters appear as "*".
Using ASPRunner.NET 44
© 2009 Xlinesoft
Date - date edit control. You can choose between simple edit text box, drop-down boxeswith day, month and year selection, and advanced datepicker.
ASPRunner.Net manual45
© 2009 Xlinesoft
Simple edit box with datepicker also allows to enter time.
Radio-button - use a radio button control to limit a user's selection to a single value withina set of values.
Using ASPRunner.NET 46
© 2009 Xlinesoft
Checkbox - checkbox control. Works best with the following datatypes:
MS Access: Yes/No field
SQL Server: TINYINT or BIT field
MySQL: TINYINT
Oracle: NUMBER(1)
Image/File- depending on field type this control allows to upload images and files to thedatabase (binary field) or to some directory on the Web server (text field). ASPRunner.NETalso makes it possible to create thumbnails on the fly. If you want to do this then youshould select the appropriate checkbox and:
Binary field - choose thumbnail size and the field name in which the thumbnail will besaved.
ASPRunner.Net manual47
© 2009 Xlinesoft
Text field - choose thumbnail size and thumbnail prefix.
For example, if the original image file's name is example.gif and thumbnail file's name isth_example.gif correspondingly then the thumbnail prefix should have the value of "th_".
Note: To work with thumbnails you need to have ASPJpeg component installed on the Webserver. Most Web hosting companies have this component installed.
Lookup wizard - drop-down box with list of values.
Readonly - use this format for a field that should not be edited.
Using ASPRunner.NET 48
© 2009 Xlinesoft
2.13.6 Validation types
You can choose one of the following validation types to validate data that users enter onthe add/edit page. If field value doesn't match defined format, web page users will seemessage box saying what need to be changed. Here is a sample message box:
ASPRunner.Net manual49
© 2009 Xlinesoft
List of validation types
Credit Card - valid credit card number.
Currency - numeric value. Decimal point is allowed. Examples: 13, 24.95, ...
Email - field value should be a valid email address.
Number - field value should be a number.
Password - password field cannot be blank, cannot be 'Password' and should be at least 4characters long.
US Phone Number - numbers, spaces, hyphens and parenthesises are allowed. Examples:(123) 456-7890, 123 456 7890, 123 4567, ...
US SSN - nine digit US social security number. Valid formats: 123-45-6789 or 123 45 6789
US State - this field should be two letter US state abbreviation. Examples: AK, AL, CA, MN,...
US Zip Code - five or ten digit number. Valid formats: 12345, 12345-6789 or 123456789
Using ASPRunner.NET 50
© 2009 Xlinesoft
2.13.7 Lookup wizard
Lookup wizard - dropdown box with list of values. List of values can be entered manuallyor retrieved from database table (Lookup table).
Custom Display field
Also you can use Custom Expression for Display field to display in dropdown box severalvalues from different fields with custom design.
ASPRunner.Net manual51
© 2009 Xlinesoft
How it looks in browser:
WHERE expression
The WHERE expression allows to sort dropdown box content. In our example if you put"phone like '%555%'" into WHERE box only Contacts with 555 in phone number will bedisplayed.
Add new items on the fly
This option puts Add new link next to dropdown box allowing to add new items right on
Using ASPRunner.NET 52
© 2009 Xlinesoft
Edit/Add page.
Lookup wizard as Edit box with AJAX popup
This feature is explained in the following article
Lookup wizard as list with search
Once Select button is clicked user is presented with the searchable lookup table. Lookuptable appearance is fully customizable in Visual Editor.
List of values
ASPRunner.Net manual53
© 2009 Xlinesoft
Multiline
If you set Multiline to any value greater then one this field will appear as a listbox on Add/Edit pages. To select multiple entries hold Ctrl key while choosing values.
Using ASPRunner.NET 54
© 2009 Xlinesoft
Linked dropdown boxes
You can use dependent dropdown boxes, where values shown in the second dropdown boxdepend on the value you’ve chosen in the first one.
To do it, check in the dependent dropdown box This dropdown is dependent on ...
Choose Category control - field, defining list of categories and Category field – field fromdependent table, containing category value.
After setup press Test it button, to check how it will work.
ASPRunner.Net manual55
© 2009 Xlinesoft
Edit page with dependent dropdown boxes:
You can also use chain of dependent dropdown boxes. For example, Supplier field contentcan depends on Products field, which in its turn depend on Products category field.
Using ASPRunner.NET 56
© 2009 Xlinesoft
Also you can have more than one dependent dropdown box tied to the same masterdropdown control.
2.14 Events
Events are the fragements of ASP.NET code executed before or after record was added,edited, deleted, when new user registers etc. Typical events are: send an email with old ornew data record, save data in another table, check record uniqueness, show related tocurrent record info.
Double click on the Event name to choose one of the predefined actions.
More about events, actions and sample code
Choose from one of predefined actions and click OK.
ASPRunner.Net manual57
© 2009 Xlinesoft
Modify sample event code putting correct email addresses, table and field names etc.
2.15 Output directory settings
Select output directory where you like to put generated ASP.NET files and include files. If youare running Internet Information Server (IIS) on your machine, you can choose existingvirtual directory where you like to put files or create new virtual directory.
Using ASPRunner.NET 58
© 2009 Xlinesoft
Here is the full list of files to be created ( <TABLE_NAME> will be replaced with theactual table name, Cars in this example):
- index.htm: redirects user to the login page or to the list page
- <TABLE_NAME>_list.aspx, <TABLE_NAME>_list.aspx.*: displays list of recordsand search boxes
- <TABLE_NAME>_edit.aspx, <TABLE_NAME>_edit.aspx.*: edit record page
- <TABLE_NAME>_add.aspx, <TABLE_NAME>_add.aspx.*: add record page
- <TABLE_NAME>_search.aspx, <TABLE_NAME>_search.aspx.*: advancedsearch page
- login.aspx, login.aspx.*: contains username/password validation code
- imager.aspx, imager.aspx.*: displays database images (JPEG, GIF, BMP)
ASPRunner.Net manual59
© 2009 Xlinesoft
- uploader.aspx, uploader.aspx.*: uploads binary images and files into database
- getfile.aspx, getfile.aspx.*: extracts and downloads binary files from database
- <TABLE_NAME>_print.aspx, <TABLE_NAME>_print.aspx.*: display printer-friendly version of the page
- <TABLE_NAME>_export.aspx, <TABLE_NAME>_export.aspx.*: exports data toWord, Excel, XML or CSV
- Web.config: Application Configuration Files
- build.bat: Batch file for project compilation
- Include\style.css: cascading style sheet for the application
- Include\ts_picker.js: javascript-based datepicker
- Images\icon_delete.gif: DELETE icon
- Images\icon_edit.gif: EDIT icon
- Images\icon_key.gif: KEY FIELD icon
- Images\icon_required.gif: REQUIRED FIELD icon
- Images\cal.gif: calculator image icon
- Images\next.gif: next month icon
- Images\prev.gif: previous month icon
- Images\printer.gif: "printer-friendly version" icon
- Images\word.gif: Export to Word icon
- Images\excel.gif: Export to Excel icon
- Images\xml.gif: Export to XML icon
- Images\csv.gif: Export to CSV icon
2.16 After you done
After you successfully built ASP.NET files you have the following options:
Using ASPRunner.NET 60
© 2009 Xlinesoft
Testing ASP.NET pages locally
View in browser - view how your ASP.NET application works. This button will be disabledif you don't have Internet Information Server or Personal Web Server running on your box.It will be disabled also if you didn't choose any virtual directory on the previous step.
Open Output Folder - open Windows Explorer to browse the folder with generated ASP.NET files.
Testing ASP.NET pages on the remote Web server
To upload files to the remote Web server you can use builtin FTP client. If your websitesupports Frontpage Extensions use Frontpage publishing feature.
Also you can open a Demo Account with us and publish your project to our demo webserver with a single mouse click.
If you prefer to use third-party tools to upload generated applications check the followingarticles:
ASPRunner.Net manual61
© 2009 Xlinesoft
Uploading generated application using third-party FTP client
Uploading generated application using Frontpage
If you having problems using ASPRunner.NET or like to learn some advanced techniquesyou can check ASPRunner.NET Frequently Asked Questions or ask your own question insupport forum. Also you can read ASPRunner.NET's "How-to" articles to learn more how youcan customize generated ASP.NET code.
Also you can send an email to our support team to get an answer on your questions.
2.17 FTP upload
To upload files to FTP you need to setup FTP location properties.
Enter Host name, User, Password to make Browse button enabled. Click Browse to choosedirectory to upload generated files.
If your web hosting provider has a designated folder for databases you need to movedatabase file to that directory. Connection string will be updated to match new databasefolder automatically.
If you have connected to database succesfully but can't create folder or upload files you canuse Passive mode.
Fill Remote Web site URL textbox to open downloaded pages in browser for testpurposes.
To upload files choose FTP location and click Upload button. You can stop upload at anytime by clicking Stop button.
Using ASPRunner.NET 62
© 2009 Xlinesoft
You can choose between the following File options:
Upload changed files only - to upload files that were changed since previous upload.
Upload all files - to upload all generated files.
Upload all files in the output directory (including all files that weren't t created byASPRunner.NET).
2.18 FrontPage Publishing
To upload files with FrontPage Server Extension you need to setup FrontPage locationproperties.
Enter Host name, User, Password to enable Browse button. Click Browse to choosedirectory to upload generated files.
If your web hosting provider has a designated folder for databases you need to movedatabase file to that directory. Connection string will be updated to match new databasefolder automatically.
ASPRunner.Net manual63
© 2009 Xlinesoft
Fill Remote Web site URL textbox to open downloaded pages in browser for testpurposes.
To upload files choose FrontPage location and click Upload button. You can stop upload atany time by clicking Stop button.
You can choose between the following File options:
Upload changed files only - to upload files that were changed since previous upload.
Upload all files - to upload all generated files.
Upload all files in the output directory (including all files that weren't t created byASPRunner.NET).
Advanced topics 64
© 2009 Xlinesoft
3 Advanced topics
3.1 Master-details relationship
A one-to-many relationship, often referred to as a "master-detail" or "parent-child"relationship, is the most usual relationship between two tables in a database.
Common scenarios include customer/purchase data, patient/medical-record data, andstudent/course-result data. For example, each customer is associated with at least oneorder record. Valued customers have many order records involving significant sums andoften a user needs to view one in connection with the other. In a one-to-many relationship,a record in Table A can have (none or one or) more than one matching record in Table B,but for every record in Table B there is exactly one record in Table A.
For example, say you have Orders table and Order Details table , where order numberis a common field in each. You can create a master-detail relationship that will enable youto navigate through the Orders and jump to Order Details that belong to current order only.
3.2 AJAX-based Functionality
ASPRunner.NET comes with AJAX-based functionality added. Now you can searchinformation more easily than ever with google-like auto-suggest feature. Web pages withAJAX driven dependent dropdown boxes are loaded faster. If you want to see details records
ASPRunner.Net manual65
© 2009 Xlinesoft
you just need to mouse over the link, and you don't need to proceed to the Details page.Also new feature for lookup fields was added. Now you can choose the variant from suggestlist which is refreshed each time while you are typing in the text box instead of searchingthrough all values in the dropdown boxes.
AJAX-based Auto-Suggest
This feature comes in two versions and is enabled on the Basic and Advanced search pages.It is similar in fashion to that of Google Suggest using AJAX technologies.
Search suggest makes your site much more user friendly. To see how it will look like justbegin to type in the search box.
The picture below demonstrates the search suggest feature on the basic search page:
On the Advanced search page search suggest looks like this:
Advanced topics 66
© 2009 Xlinesoft
By default, search suggest results include only those values that begin with the searchphrase. If you want to be shown all values in which the search phrase presents to be shownyou should change the suggestAllContent variable value in the dbcommon.asp file to True.In this case the search phrase in the search suggest results will be highlighted as shown onthe picture below:
AJAX-based dependent dropdown boxes
In ASPRunner dependent dropdown boxes are AJAX Driven. This feature works similar as inthe previous version but now dropdown boxes content is loaded in the real time using AJAXtechnologies instead of loading all the content on the web page load. This means web pagesare loaded more faster now.
ASPRunner.Net manual67
© 2009 Xlinesoft
Details Records Preview
In ASPPRunner.NET you can see details records preview directly on the list page. All youneed to do is to mouse over the link. The following picture demonstrates how the detailspreview looks like:
The number of records in the details preview is limited. Only first ten details are displayed. Ifthere is an image in the details then only first five details are displayed.
Lookup wizard as Edit box with AJAX popup
This feature is added to lighten the search among the large amount of data. Now you canchoose the variant from AJAX popup which is refreshed each time you type in the text box,instead of searching through all the values in the dropdown boxes.
To turn on this feature, you should select the appropriate checkbox on the "Edit as"settings tab.
Advanced topics 68
© 2009 Xlinesoft
After you build your project, you can see how it works on the Edit, Add, and Search pages.When you begin to type in the edit box AJAX popup appears and you can choose the neededvalue from the suggest list. If you type in the text box the value which doesn't exist in thedatabase and move to another form control then the border of the text box will changecolour into red. When you correct the value, it will change back to usual.
ASPRunner.Net manual69
© 2009 Xlinesoft
If you try to submit the form with wrong value entered in the text box then the form will besubmitted with the previous correct value entry.
3.3 Connecting to database
3.3.1 Connecting to MS Access database
Run ASPRunner.NET and choose MS Access option on database connection screen.Click Next >>.
Advanced topics 70
© 2009 Xlinesoft
Browse to find your MS Access database (*.mdb) and click OK.
ASPRunner.Net manual71
© 2009 Xlinesoft
If connection is successful, you will see list of datasource tables on the next screen.
Advanced topics 72
© 2009 Xlinesoft
3.3.2 Connecting to MS SQL Server database
Run ASPRunner.NET and choose Microsoft SQL Server option on database connectionscreen.Click Next >>.
ASPRunner.Net manual73
© 2009 Xlinesoft
Choose SQL Server ODBC driver from the list of available ODBC drivers and click Next >>.
Select server name from drop-down list. Type User and Password. Click Connect andchoose required database name from drop-down list. Click Next >>.
Advanced topics 74
© 2009 Xlinesoft
If connection is successful, you will see list of datasource tables on the next screen.
ASPRunner.Net manual75
© 2009 Xlinesoft
3.3.3 Connecting to MySQL database
Before connecting to MySQL database make sure you have MySQL ODBC driver installed.This driver available on the Web here.
Run ASPRunner.NET and choose MySQL option on database connection screen.Click Next >>.
Advanced topics 76
© 2009 Xlinesoft
Type host name (usually localhost), database name, user name, password and click OK toconnect.
ASPRunner.Net manual77
© 2009 Xlinesoft
If connection is successful, you will see list of datasource tables on the next screen.
Advanced topics 78
© 2009 Xlinesoft
3.3.4 Connecting to Oracle database
Run ASPRunner.NET and choose Oracle option on database connection screen.Click Next >>.
ASPRunner.Net manual79
© 2009 Xlinesoft
Choose Microsoft ODBC for Oracle from the list of available ODBC drivers and click Next>>.
Type user name, password, server name and click OK to connect.
Advanced topics 80
© 2009 Xlinesoft
If connection is successful, you will see list of datasource tables on the next screen.
ASPRunner.Net manual81
© 2009 Xlinesoft
3.4 Publishing ASP.NET application to the remote Web server
3.4.1 Using FTP client to publish ASP.NET pages to the remote Web server
When you have created a set of ASP.NET pages with ASPRunner.NET Professional, you mayuse any FTP client to upload them on a remote Web server. We will show you how to do itusing popular FTP client WS_FTP Pro as an example.
Advanced topics 82
© 2009 Xlinesoft
First of all, create your FTP server connection using WS_FTP Pro Connection Wizard. Followthe directions in the Connection Wizard - type in server name or IP address, username andpassword. Set connection type to FTP and connect to remote FTP server.
ASPRunner.Net manual83
© 2009 Xlinesoft
On the left panel (your local box) proceed to the directory you have chosen as outputdirectory in ASPRunner.NET Professional (C:\Program files\ASPRunner.NET\Output inour example).On the right panel you may see folders of your remote Web server. Create anew folder on the remote server, name it ASPRunner.NET and open it. Select all files on theleft panel (menu Edit - Select All) and click the Upload button.
When all necessary files have been copied to the Web server, start browser, type the nameof your Web site in the address line and add "/the name of the folder you just made" afterit. In our example, it will be: http://www.xlinesoft.com/test/ASPRunner.NET/
Advanced topics 84
© 2009 Xlinesoft
3.4.2 Using FrontPage to publish ASP.NET pages to the remote Web server
Here is how files generated by ASPRunner.NET can be published on the Web usingFrontpage:
· Run ASPRunner.NET. Point it to your database and create your ASP.NET pages. Letsassume that your output folder is C:\Program files\ASPRunner.NET\Output
ASPRunner.Net manual85
© 2009 Xlinesoft
· Start Frontpage. Select "File - New - Web".· Select "Import Web Wizard". Enter your Web site address in the address box (i.e.
http://www.yourservername.com/ASPRunner.NET) and click "Ok".· On the "Import Web Wizard" dialog, select ASPRunner.NETs' output directory (C:
\Program files\ASPRunner.NET\Output) as a source. Include subfolders and click"Next".
· Exclude files that you don't need and click "Next".· Click "Finish". Now your Web site is up and running at http://www.
yourservername.com/ASPRunner.NET
Advanced topics 86
© 2009 Xlinesoft
3.5 Demo Account
3.5.1 What is the Demo Account
Demo Account is a free service provided by Xlinesoft.com to ASPRunner.NET customers.By using Demo Account you agree to the following Terms and Conditions.
Demo Account allows you quickly put ASP.NET application generated by ASPRunner.NET toour demo web server (http://demo.asprunner.net) for testing purposes.
You may find this feature useful if:· you don't have a web server on your local box to test ASP.NET pages· you don't have a webhosting account yet· you need to show generated application to your boss, friends or to support staff
To open and use Demo Account proceed to the Finished tab in ASPRunner.NET and clickDemo Account button. To create an account enter your email and password. You will needthis info to manage your account online. After account is created use Upload button totransfer ASP.NET application to the web server. After successfull upload this application willopen in browser.
Demo Account transfers generated pages and your database to the server. Currentlysupported databases are MS Access, SQL Server, MySQL.
To manage your account online proceed to http://demo.asprunner.net/Account/AccountView.aspx. You can browse uploaded projects, delete projects etc.
Demo account limitations:· Since this account is designed for demo purposes only first 100 data records in each
tables with be transferred to the server.· Maximum disc space per account is 5Mb.
If you are interested in opening a full featured webhosting account that supports one clickpublishing rigth from ASPRunner.NET contact our support team for more details.
ASPRunner.Net manual87
© 2009 Xlinesoft
3.5.2 Terms and conditions
Xlinesoft.com Demo Account Terms and Conditions
Agreement between User and Xlinesoft.com
A violation of any of the below Terms and Conditions will result in the termination of youraccount, with or without warning.
We provides free demo account for our users. Xlinesoft.com reserves the right to cancel anyaccount for any reason or no reason at all. Xlinesoft.com provides this service to any userthat abides to our terms and conditions. Failure to abide to these rules will result in accounttermination. Furthermore, any one who conducts illegal activities may be prosecuted andpersonal information disclosed to the appropriate authority. Xlinesoft.com reserves the rightto change the terms and conditions at any time and it is the member’s responsibility tocheck for any updates of these terms. You are entirely liable for all activities conductedthrough your account.
Your use of the Xlinesoft.com Demo Account is conditional upon your acceptance withoutmodification of the terms, conditions and notices contained herein. Your use of our Servicesconstitutes your agreement to all such terms, conditions and notices.
The following rules apply while using Xlinesoft.com Demo Account:
1. Sign Up - Basic Terms
1.1 Upon after creating a Demo Account through Xlinesoft.com software you will become auser of Xlinesoft.com Demo Account.
1.2 Xlinesoft.com does not issue credits for outages incurred through service disablementresulting from Terms and Conditions violations.
2. Modification of Terms of Service
2.1 We reserve the right to change the terms and conditions of this agreement at any timewithout prior notice. Such changes will be posted on our web site at www.xlinesoft.com.You agree to review any changes to this agreement and, if such changes are not acceptableto you, immediately terminate your use of the Xlinesoft.com Demo Account. If you continueto use the Xlinesoft.com service after the effective date of such changes, such use willconstitute acceptance of the changes.
3. Modifications to Xlinesoft.com Demo Account
3.1 By accepting this Agreement, you hereby acknowledge and agree that, in our solediscretion, we may modify or discontinue, temporarily or permanently, any aspect of theXlinesoft.com Demo Account at any time with or without prior notice, including, withoutlimitation, modification or discontinuance of advertising, content and applications appearingas part of the Xlinesoft.com Demo Account. You agree that we will not be liable to you or toany third party for any modification, suspension or discontinuance of the Xlinesoft.comDemo Account.
4. Privacy
4.1 Xlinesoft.com adheres to a Privacy Statement and will not release any confidential
Advanced topics 88
© 2009 Xlinesoft
information about you unless required by law or regulatory authority or while assisting aninvestigation concerning fraud.
5. No Unlawful or Prohibited Use, Spam and Termination
5.1 Xlinesoft.com Demo Account may be used for lawful purposes only. As a condition ofyour use of the Xlinesoft.com Demo Account, you agree that you will not use our Websitefor any purpose that is unlawful, illegal or prohibited by these Terms of Services, or ourother terms, conditions or notices. You agree that you will not modify, copy, distribute,transmit, reproduce, publish, license, transfer, store, sell or create derivative works from,any data, software, Services or products obtained through our Website. This includes, but isnot limited to: copyrighted material; trademarks; trade secrets or other intellectualproperty rights used without proper authorization; material that is obscene, defamatory,constitutes an illegal threat, or violates export control laws. Examples of unacceptablecontent or links include: pirated software, hacker programs or archives, Warez sites, MP3,and IRC bots. Such misuse can result in the cancellation of your entire account and theblacklisting of your domains without notice. You or Xlinesoft.com may terminate your DemoAccount at any time for any reason.
5.2 You agree that you will not use our Services to conduct any activity or solicit theperformance of any activity that is prohibited by law or by regulatory authorities. Youfurther agree that you will not use our Services in any manner that could disable, damage,overburden or impair our Website. We reserve the right, at our sole discretion, to denyaccess at any time to users who breach our policies or cause other abuses which we deemdisruptive to the Xlinesoft.com or the Internet community at large.
5.4 The following are grounds for immediate termination of service without notice:
5.4.1 Sending unsolicited mass e-mails (i.e., to more than 10 individuals, generally referredto as spamming) which provokes complaints from any of the recipients; or engaging inspamming from any provider and using a Xlinesoft.com Demo Account. Xlinesoft.com willbe the sole arbiter as to what constitutes a violation of this provision. Violators may beassessed a minimum administration fee of $250 and will face immediate suspension.
5.4.2 Using a Xlinesoft.com Demo Account to point to or otherwise direct traffic to anymaterial that, in the sole opinion of Xlinesoft.com, is associated with spamming, bulk e-mail, e-mail harvesting, warez (or links to such material), is in violation of copyright law, orcontains material judged, in the sole opinion of Xlinesoft.com, to be threatening or obsceneor inappropriate is considered misuse of service.
5.4.3 Xlinesoft.com Demo Account membership will be revoked and legal action taken ifany of the following activities occur:
a) Adult or Pornographic related
b) Warez Software related
c) Music Piracy Related
e) Hacking Related
ASPRunner.Net manual89
© 2009 Xlinesoft
f) Making available copyrighted software which has been "cracked" (e.g., copyrightprotection for the software has been removed)
g) Making available serial numbers for software, which can be used to illegally validate orregister software.
h) Making available tools that can be used for no purpose other than "cracking" software.
i) Containing or dealing with viruses
j) Spamming
k) Anything related to illegal activity
5.4.4 We do not allow any type of programs, software, or MP3 files on our server.
5.4.5 Accounts that utilize an abnormal amount of our resources will be removed. Thisincludes, CPU, memory, bandwidth, and excessive use of auto refresh.
5.4.6 Accounts that do not have any activity for 2 months are removed from our networ
5.4.7 Violations of system or network security are prohibited and may result in criminal andcivil liability. Examples include but are not limited to the following: unauthorized access,use, probing, or scanning of systems security or authentication measures, data, or traffic;interference with service to any user, host, or network including, without limitation, mailbombing, flooding, deliberate attempts to overload a system, broadcast attacks; forging ofany TCP-IP packet header or any part of the header information in an email or a newsgroupposting.
5.5 We reserve the right, in our sole discretion, to suspend or terminate your access toXlinesoft.com Demo Account at any time, without notice. We will terminate for any breachof our terms of service or for any activity that constitutes an unlawful or prohibited use asdescribed herein.
5.6 We do whatever we can to prevent the sending of unsolicited bulk e-mail messages. Ifyou intend to use Xlinesoft.com Demo Account to spam the Internet community, please donot register with us.
5.7 Xlinesoft.com reserves the right to reject any e-mail to or passing through a Xlinesoft.com Demo Account that engages in, permits, or allows itself to be used for spamming.
6. No Warranties/Limited Liability/Indemnification
6.1 The Xlinesoft.com Demo Account and each portion thereof is provided "as-is" withoutany warranties of any kind, whether express, implied, statutory or otherwise including butnot limited to, any warranty that the The Xlinesoft.com Demo Account will meet yourrequirements, the The Xlinesoft.com Demo Account will be uninterrupted, timely, secure orerror-free, or any implied warranties of merchantability, fitness for any particular purposeor non-infringement. Your use of the The Xlinesoft.com Demo Account is entirely at yourown risk. You understand and agree that any content downloaded or otherwise obtainedthrough the use of The Xlinesoft.com Demo Account is done at your own discretion and riskand that you will be solely responsible for any damages to your computer system or loss ofdata that results in the download of such data content. Because some jurisdictions do not
Advanced topics 90
© 2009 Xlinesoft
allow the exclusion or limitation of implied warranties, aspects of the above exclusion maynot apply to you. In such jurisdictions, any warranties will be limited to the maximumextent permitted by applicable law.
6.2 Indemnification. You agree to defend, indemnify and hold Xlinesoft.com and all of theirrespective current and former officers, directors, members, shareholders, agents, andemployees harmless from any claims, losses, damages, causes of action, liabilities andexpenses (including attorneys’ fees) related to or arising out of acts or omissions of you oryour employees, directors, shareholders, members, officers, agents, subsidiaries, affiliates,and/or breach of any of the foregoing representations and warranties.
3.6 Events
3.6.1 More about events
Events are pieces of ASP.NET code that executed before or after record was added, edited,deleted, when new users registers etc. Typical events send an email with old or new datarecord, save data in another table, check record uniqueness, show related to current recordinfo.
Typical parameters passed to events
e - OleDbParameterCollection.
Each field on the Add/Edit form represented as 'Field type'-'Field value' pair
Example of usage:
VB.NET
Page.Response.Write("Field1 - "+ e["Field1"].ToString())
Where - WHERE clause that points to current record to be edited or deleted
Example of usage:
VB.NET
ASPRunner.Net manual91
© 2009 Xlinesoft
Dim sSQLSelect As String = "select * from [Order details] where " & where
Dim cn As New OleDbConnection(func.GetConnectionStr())
Dim cmdSelect As OleDbCommand = New OleDbCommand(sSQLSelect, cn)
cmdSelect.CommandType = CommandType.Text
...
ASPRunner.NET comes with set of handy predefined code snippets that you can use inEvents.
Sample code snippets
Send simple email
Send email with new data
Save new data in another table
Insert a record into another table
Check if specific record exist
Display a message on the WEB page
Redirect to another page
Custom code
Here are some real life events
Show list of customer orders
Check if start date is ealier than end date
Before deleting a record check if related records exist
Speed up data entry using events
3.6.2 Predefined actions
3.6.2.1 Send simple email
How to send simple email
Advanced topics 92
© 2009 Xlinesoft
Choose Send simple email
ASPRunner.Net manual93
© 2009 Xlinesoft
Advanced topics 94
© 2009 Xlinesoft
Modify this sample code using correct email address, message subject and body.
Send simple email
C#
public static bool BeforeEdit(System.Web.UI.Page Page, IDictionary e)
{
// Send simple email
// do not forget to setup email parameters like From, SMTP server etc
// on "Security->User login settings" dialog
func.SendMail("[email protected]", "Sample subject", "Sample body");
ASPRunner.Net manual95
© 2009 Xlinesoft
return true;
// return true if you like to proceed with editing this record
// return false in other case
}
3.6.2.2 Send email with new data
How to send email with new data
Choose Send email with new data
Advanced topics 96
© 2009 Xlinesoft
ASPRunner.Net manual97
© 2009 Xlinesoft
Send email with new data
C#
public static bool BeforeEdit(System.Web.UI.Page Page, IDictionary e)
{
// Send email with new data
// do not forget to setup email parameters like From, SMTP server etc
// on "Security->User login settings" dialog
string message = "";
message = e["Field1"].ToString();
Advanced topics 98
© 2009 Xlinesoft
message += ", ";
message += e["Field2"].ToString();
message += "\n";
func.SendMail("[email protected]", "Sample subject", message);
return true;
// return true if you like to proceed with editing this record
// return false in other case
}
3.6.2.3 Save new data in another table
How to save new data in another table
ASPRunner.Net manual99
© 2009 Xlinesoft
Choose Save new data in another table
Advanced topics 100
© 2009 Xlinesoft
ASPRunner.Net manual101
© 2009 Xlinesoft
Save new data in another table
C#
public static bool BeforeEdit(System.Web.UI.Page Page, IDictionary e)
{
//Save new data in another table
AnotherAcme anotherAcme = new AnotherAcme();
anotherAcme.Field1 = e["Field1"];
anotherAcme.Field2 = e["Field2"];
try
{
Advanced topics 102
© 2009 Xlinesoft
anotherAcme.Save("username");
}
finally
{
}
return true;
// return true if you like to proceed with editing this record
// return false in other case
}
3.6.2.4 Insert a record into another table
How to insert a record into another table
ASPRunner.Net manual103
© 2009 Xlinesoft
Choose Insert a record into another table
Advanced topics 104
© 2009 Xlinesoft
ASPRunner.Net manual105
© 2009 Xlinesoft
Insert a record into another table
C#
public static bool BeforeEdit(System.Web.UI.Page Page, IDictionary e)
{
//Insert a record into another table
AnotherAcme anotherAcme = new AnotherAcme();
anotherAcme.Field1 = e["Field1"];
anotherAcme.Field1 = e["Field2"];
try
{
Advanced topics 106
© 2009 Xlinesoft
anotherAcme.Save("username");
}
finally
{
}
return true;
// return true if you like to proceed with editing this record
// return false in other case
}
3.6.2.5 Check if specific record exist
How to check if specific record exist
ASPRunner.Net manual107
© 2009 Xlinesoft
Choose Check if specific record exist
Advanced topics 108
© 2009 Xlinesoft
ASPRunner.Net manual109
© 2009 Xlinesoft
Check if specific record exist
C#
public static bool BeforeEdit(System.Web.UI.Page Page, IDictionary e)
{
//Check if specific record exists
Query query = new Query(AntTable.Scema).WHERE("AnyColumn",e["columnToLookFor"]);
int count=0;
try
Advanced topics 110
© 2009 Xlinesoft
{
count = query.GetRecordCount();
if (count > 0)
{
// if record exist do something
}
else
{
// if don't exist do somthing else
}
}
finally
{
}
return true;
// return true if you like to proceed with editing this record
// return false in other case
}
3.6.2.6 Display a message on the WEB page
How to display a message on the WEB page
ASPRunner.Net manual111
© 2009 Xlinesoft
Choose Display a message on the WEB page
Advanced topics 112
© 2009 Xlinesoft
ASPRunner.Net manual113
© 2009 Xlinesoft
Display a message on the WEB page
C#
public static bool BeforeEdit(System.Web.UI.Page Page, IDictionary e)
{
// Display a message on the Web page
Page.Response.Write("Your message here");
return true;
// return true if you like to proceed with editing this record
// return false in other case
}
Advanced topics 114
© 2009 Xlinesoft
3.6.2.7 Redirect to another page
How to redirect to another page
Choose Redirect to another page
ASPRunner.Net manual115
© 2009 Xlinesoft
Advanced topics 116
© 2009 Xlinesoft
Redirect to another page
C#
public static bool BeforeEdit(System.Web.UI.Page Page, IDictionary e)
{
// Redirect to another page
Page.Response.Redirect("anypage.aspx");
return true;
// return true if you like to proceed with editing this record
// return false in other case
}
ASPRunner.Net manual117
© 2009 Xlinesoft
3.6.2.8 Custom code
Choose Custom code
Advanced topics 118
© 2009 Xlinesoft
ASPRunner.Net manual119
© 2009 Xlinesoft
Custom code
C#
public static bool BeforeEdit(System.Web.UI.Page Page, IDictionary e)
{
//Custom code
'/put your custom code here
return true;
// return true if you like to proceed with editing this record
// return false in other case
Advanced topics 120
© 2009 Xlinesoft
}
3.6.3 Sample code
3.6.3.1 Show list of customer orders
Show list of all orders placed by this customer on Orders Edit page (Sample Northwinddatabase in MS Access).
C#
public static void EditOnLoad(System.Web.UI.Page Page)
{
// get customer id
string customerID = Page.Request["value_CustomerID"];
if (!string.IsNullOrEmpty(customerID))
{
ordersCollection ordersCollection = new ordersCollection();
Query qry = new Query(orders.Schema).WHERE("CustomerID", customerID);
ordersCollection.LoadAndCloseReader(qry.ExecuteReader());
if (ordersCollection.Count > 0)
{
Page.Response.Write("All orders for '" + customerID + "'<br>");
foreach (orders order in ordersCollection)
{
Page.Response.Write(String.Format("<a target=_blank href=Orders_edit.aspx?editid1={0}> {0}</a>{1}<br>", order.OrderID, order.OrderDate.Value.ToShortDateString()));
}
}
}
} // EditOnLoad
ASPRunner.Net manual121
© 2009 Xlinesoft
3.6.3.2 Before deleting a record check if related record exist
Before deleting a record in Orders tabe check if related records exist in Order Details table(Sample Northwind database in MS Access)
C#
public static bool BeforeDelete(System.Web.UI.Page Page, IDictionary e)
{
string orderID = (string)e["key"];
// orderID - id pointing to record to be deleted.
if (!string.IsNullOrEmpty(orderID))
{
Order_DetailsCollection details = new Order_DetailsCollection();
Query qry = new Query(Order_Details.Schema).WHERE("OrderID", orderID);
details.LoadAndCloseReader(qry.ExecuteReader());
//Check if specific record exists
if (details.Count > 0)
{
//if record exists tell about it
Page.Response.Write("You can't delete this record. Try to delete all order details for thisorder before");
return false;
}
return true;
}
//return true if you like to proceed with deleting record
//return false in other case
return false;
} // BeforeDelete
Advanced topics 122
© 2009 Xlinesoft
3.6.3.3 Check if start date is earlier then end date
On Edit page check if start date is ealier than end date. (Framework 1.1, VB.NET)
C#
public static bool BeforeEdit(System.Web.UI.Page Page, IDictionary e)
{
string strOrderDate = (string)e["OrderDate"];
string strRequiredDate = (string)e["RequiredDate"];
if (!string.IsNullOrEmpty(strOrderDate) && !string.IsNullOrEmpty(strRequiredDate))
{
DateTime orderDate = DateTime.Parse(strOrderDate);
DateTime requiredDate = DateTime.Parse(strRequiredDate);
if (orderDate > requiredDate)
{
Page.Response.Write("<br>Error: OrderDate is more that RequiredDate");
return false;
}
return true;
}
//return true if you like to proceed with saving record
//return false in other case
return false;
} // BeforeEdit
3.6.3.4 Speed up data entry using events
On ADD page you might want to prepopulate some edit boxes with recently used values.This can be done using combination of Default values and BeforeAdd Event.
ASPRunner.Net manual123
© 2009 Xlinesoft
Let's say at the end of day you need to enter several data records for each Order. Toprepopulate EmployeeID, ShipVia and Freight fields with last entered values you need tothe following:
1. Set Default values of those fields to Page.Session("EmployeeID"), Page.Session("ShipVia") and Page.Session("Freight") respectively. This can be done on theFormatting tab.
2. Use BeforeEdit Event to save EmployeeID, ShipVia and Freight values in Sessionvariables
C#
Page.Session["EmployeeID"] = (string)e["EmployeeID"];
Page.Session["ShipVia"] = (string)e["ShipVia"];
Page.Session["Freight"] = (string)e["Freight"];
4 Order ASPRunner.NET online
ASPRunner.NET may be ordered through our online store seven days a week, 24 hours aday.
Click here to order your copy now!
Visit ASPRunner.NET online