Activating AspxCodeGen 4.0

Similar documents
Overview... 7 Tabs... 8 Selected Tables... 8 Load Tables Button Selected Views... 8 Load Views Button Clear Selection Button...

ASP.NET Security. 7/26/2017 EC512 Prof. Skinner 1

Arena: Edit External Web Templates (Course #A217)

Lab 5: ASP.NET 2.0 Profiles and Localization

Remote Web Server. Develop Locally. foldername. publish project files to

Integrate WebScheduler to Microsoft SharePoint 2007

You can call the project anything you like I will be calling this one project slide show.

Hands-On Lab. Lab 05: LINQ to SharePoint. Lab version: Last updated: 2/23/2011

How to create a simple ASP.NET page to create/search data on baan using baan logic from the BOBS client sample.

Hands-On Lab. Lab 02: Visual Studio 2010 SharePoint Tools. Lab version: Last updated: 2/23/2011

Step 7 How to convert a YouTube Video to Music As I mentioned in the YouTube Introduction, you can convert a Video to a MP3 file using Free Video To

GSU Alumni Portal. OPUS Open Portal to University Scholarship. Governors State University. Vemuri Vinusha Chowdary Governors State University

CST272 Getting Started Page 1

EL-USB-RT API Guide V1.0

MOSS2007 Write your own custom authentication provider (Part 4)

Online Activity: Debugging and Error Handling

The first program we write will display a picture on a Windows screen, with buttons to make the picture appear and disappear.

MVC :: Understanding Models, Views, and Controllers

CS708 Lecture Notes. Visual Basic.NET Object-Oriented Programming. Implementing Client/Server Architectures. Part (I of?) (Lecture Notes 5A)

Quick Guide for the ServoWorks.NET API 2010/7/13

CS708 Lecture Notes. Visual Basic.NET Programming. Object-Oriented Programming Web Technologies and ASP.NET. (Part I) (Lecture Notes 5B)

Chapter 2 How to develop a one-page web application

ASP.net. Microsoft. Getting Started with. protected void Page_Load(object sender, EventArgs e) { productsdatatable = new DataTable();

Start Visual Studio, start a new Windows Form project under the C# language, name the project BalloonPop MooICT and click OK.

Telerik Corp. Test Studio Standalone & Visual Studio Plug-In Quick-Start Guide

Conventions in this tutorial

3 Customer records. Chapter 3: Customer records 57

3-tier Architecture Step by step Exercises Hans-Petter Halvorsen

Web Forms User Security and Administration

Working with Data in ASP.NET 2.0 :: Displaying Binary Data in the Data Web Controls Introduction

COOKBOOK Creating an Order Form

Working with Data in ASP.NET 2.0 :: Uploading Files Introduction

IDoc based adapterless communication between SAP NetWeaver Application Server (SAP NetWeaver AS) and Microsoft BizTalk Server

TRAINING GUIDE FOR OPC SYSTEMS.NET. Simple steps to successful development and deployment. Step by Step Guide

This is the empty form we will be working with in this game. Look under the properties window and find the following and change them.

ONSITE.NET API. The ScientiaMobile Support Forum is open to all WURFL users, both commercial license holders and evaluation users.

Instructions for writing Web Services using Microsoft.NET:

Silverlight Business Application

Lab 4: Introduction to Programming

To start we will be using visual studio Start a new C# windows form application project and name it motivational quotes viewer

Security overview Setup and configuration Securing GIS Web services. Securing Web applications. Web ADF applications

Final Documentation. Created By: Ahnaf Salam Adam Castillo Sergio Montejano Elliot Galanter

Form Properties Window

Getting Started Guide

Web Forms ASP.NET. 2/12/2018 EC512 - Prof. Skinner 1

pinremote Manual Version 4.0

Walkthrough: Creating a Measurement Studio Application with Web Forms Controls and Analysis

ArtOfTest Inc. Automation Design Canvas 2.0 Beta Quick-Start Guide

Pentatonic Labs Final Documentation

Walkthrough: Creating a Measurement Studio Application with Web Forms Controls and Analysis

Bringing Together One ASP.NET

CHAPTER 2 Understanding URL Routing

This walkthrough assumes you have completed the Getting Started walkthrough and the first lift and shift walkthrough.

TxEIS on Internet Explorer 8

CSC 415 ONLINE PHOTOALBUM: THE SEQUEL ASP.NET VERSION

Use Document-Level Permissions for browser-based forms in a data view

Developing Desktop Apps for Ultrabook Devices in Windows 8*: Getting Started

In the previous chapter we created a web site with images programmed into HTML page code using commands such as: <img src="images/train.

What You Need to Use this Book

How to create an Add-In extension.dll file and make it available from Robot pull down menu. (language C#)

ASP.NET Pearson Education, Inc. All rights reserved.

How to install HDRestaurant CS(Client Server)?

Syncfusion Report Platform. Version - v Release Date - March 22, 2017

Hands-On Lab. Getting Started with Office 2010 Development. Lab version: Last updated: 2/23/2011

Actual4Test. Actual4test - actual test exam dumps-pass for IT exams

Hands-On Lab. Lab 13: Developing Sandboxed Solutions for Web Parts. Lab version: Last updated: 2/23/2011

Final Documentation Solutions Inc TEAM SOLUTION Micheal Scott Trevor Moore Aurian James Wes Bailoni

How to install HDSME Client Server?

See how cloud templates provide default diagnostic monitoring setup.

SelectSurvey.NET Developers Manual

WebSharpCompiler. Building a web based C# compiler using ASP.NET and TDD. Author: Dominic Millar Tech Review:Matt Rumble Editor:Cathy Tippett Feb 2011

Linking Reports to your Database in Crystal Reports 2008

Build Your Own ASP.NET 4 Website Using C# & VB. Chapter 1: Introducing ASP.NET and the.net Pla;orm

Visual C++ Tutorial. For Introduction to Programming with C++ By Y. Daniel Liang

IBSDK Quick Start Tutorial for C# 2010

Advanced UI Customization for Microsoft CRM

EXAMGOOD QUESTION & ANSWER. Accurate study guides High passing rate! Exam Good provides update free of charge in one year!

Chapter 9. Web Applications The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill

Introduction to ASP.NET

Android Studio is google's official IDE(Integrated Development Environment) for Android Developers.

Hands-On Lab. Lab: Client Object Model. Lab version: Last updated: 2/23/2011

Lab 1: Introduction to C Programming. (Creating a program using the Microsoft developer Studio, Compiling and Linking)

WHAT YOU WILL LEARN IN THIS CHAPTER:

The Open Core Interface SDK has to be installed on your development computer. The SDK can be downloaded at:

PRACTICALES:- Navigation control

Accessing Databases 7/6/2017 EC512 1

Yet Another Forum Integration

Create your own Meme Maker in C#

Engr 123 Spring 2018 Notes on Visual Studio

INFORMATICS LABORATORY WORK #2

Blackbird Books and Supplies

Getting Started with the Bullhorn SOAP API and C#/.NET

It is necessary to follow all of the sections below in the presented order. Skipping steps may prevent subsequent sections from working correctly.

Hands-On Lab. Introduction to SQL Azure. Lab version: Last updated: 12/15/2010

PHEWR Installation Guide (version 3)

Weather forecast ( part 1 )

Quick Start - WPF. Chapter 4. Table of Contents

SAS STUDIO. JUNE 2014 PRESENTER: MARY HARDING Education SAS Canada. Copyr i g ht 2014, SAS Ins titut e Inc. All rights res er ve d.

TOP SERVER V5 CLIENT CONNECTIVITY ROCKWELL FACTORYTALK VIEW STUDIO. Table of Contents

8 Library loan system

Transcription:

Activating AspxCodeGen 4.0 The first time you open AspxCodeGen 4 Professional Plus edition you will be presented with an activation form as shown in Figure 1. You will not be shown the activation form when using the Express edition. Figure 1 Activation Form You need to enter the Serial Number and Activation Code that we provided you in the respective text boxes. The Serial Number and Activation Code contains dashes -, make sure to include these dashes when entering them. Then click the Activate button. See Figure 2. Figure 2 If you enter an invalid Serial Number or Activation Code a warning pops up. When this happens, click the Ok button (See Figure 3), then re-enter the Serial Number and Activation Code Again. Figure 3 Invalid Serial Number or Activation Code If you enter a valid Serial Number and Activation Code, you will be presented with the main window of the application, see Figure 4. You will only see the activation form once. After that, you will always go straight to the main window.

Figure 4 Main Window A Simple Interface To keep AspxCodeGen 4.0 simple, there s only one main interface as shown in Figure 4. The main window consists of six (6) tabs. 1. Selected Tables: AspxCodeGen generates code from all the tables in your database by default. You can choose to generate from selected tables only from the Code Settings tab, and then select just the tables to generate from on this tab. This is a new feature for AspxCodeGen 4.0. 2. Selected Views: You can choose to generate from selected views only from the Code Settings tab, and then select just the views to generate from on this tab. This is a new feature for AspxCodeGen 4.0. 3. Database Settings: This is where you enter the database you want to generate code from and whether you want to generate stored procedures or dynamic SQL. This is probably going to be your most used tab.

4. Code Settings: You ll find a selection here on where to generate your objects from: all tables, all views (new), selected tables (new), or selected views (new). This is also where you set the web site name, the root directory where you want the website to be generated, the namespace for your code, and most of all the language (either C# or VB.NET) you want the generated code to be in. 5. App Settings: These are application settings. Almost all generated code/web forms are overwritten every time you use AspxCodeGen 4.0. However, you can choose not to overwrite some key files from here. You can also reset all settings to its original default from here. This is a new feature for AspxCodeGen 4.0. That seems like a lot of features, you re probably asking where s the One Click feature? Since AspxCodeGen 4.0 remembers the last settings you used such as, e.g. server, database name, directory, namespace, language etc., the next time you open AspxCodeGen 4.0, you can just click the Generate button, that simple. A Quick Tour Let s learn how to generate ASP.NET 4.0 Web Forms, middle-tier, and data-tier codes using AspxCodeGen 4.0. We re going to use Microsoft s Northwind database for this demo. Please google and download it. Or you can use your own database, just follow the steps shown below. 1. Click the Generate Code for All Tables button. Notice that an error pops up showing us the required fields to fill. See Figure 5. Figure 5 Error Message

2. Click the OK button to close the pop up. Go to the Database Settings tab and start filling the required fields. Do the same in the Code Settings tab. See Figures 6 and 7. Figure 6 Database Settings Tab Figure 7 Code Settings Tab

3. You can see the descriptions of each of these fields in the Complete Guide tutorial. For now, simply hover over the Question Mark image if you need information from the respective fields. Note that I have a directory in my desktop named NorthwindCode. 4. Click the Generate Code for All Tables button. AspxCodeGen 4.0 will start generating objects. See Figure 8. Figure 8 Generating Code 5. Wait for a few seconds. When AspxCodeGen 4.0 is done generating objects, a message pops up. See Figure 9. Figure 9 Done Generating Objects

6. Click the OK button to close the message. Then close AspxCodeGen 4.0 by clicking the Close button. 7. We re not going to go into any details on how to operate MS SQL Server Management Studio, but if you want to see the generated Stored Procedures, fire up MS SQL Server Management Studio, versions 2000, 2005, or 2008, then click on the Stored Procedures node of your respective database, for this example the Northwind database, you will see a list of generated stored procedures. See Figure 10. Figure 10 Generated Stored Procedures 8. To view the generated code simply go to the directory you specified from the Code Settings tab of AspxCodeGen 4.0. You will see a list like the one shown in Figure 11.

Figure 11 Generated Code 9. To see the generated code in action you need to have a client application (e.g. web forms, win forms, web services, Silverlight, etc.). For this demo, we will create a web site (web forms) application. Fire up Visual Studio 2010. From the File menu click New Web Site as shown in Figure 12. Figure 12 Visual Studio 2010, Create New Web Site 10. The new web site dialog pops-up. Choose the Language, web location, and the ASP.NET Empty Web Site template, and then click OK. See in Figure 13. Figure 13 Visual Studio 2010, New Web Site Dialog

11. An empty web site is created with just a web.config file. See Figure 14. Figure 14 Empty Web Site 12. Add the App_Code folder by right-clicking on the web site, and then choose Add ASP.NET Folder, then click App_Code. See Figure 15. Figure 15 Adding the App_Code Folder 13. Copy and paste all the generated code into the App_Code folder except for the GeneratedCode.htm file. See Figures 16 and 17. Figure 16 Copy Generated Code Figure 17 Paste Code to App_Code Folder

14. Do the same for the GeneratedCode.htm, but copy it in the web site s root directory instead. See Figure 18. Figure 18 Web Site with Copied Code 15. For now let s see the list of all the generated code by right-clicking on the GeneratedCode.htm and then choosing View in Browser. See Figure 19. Figure 19 Partial List of the Generated Code 16. Close the browser. Let s add a new web form. See Figures 20 and 21. Figure 20 Add New Item

Figure 21 Add New Item Dialog 17. Click the Add button in Figure 21. 18. Go to the Example folder under the App_Code folder. Expand the CategoriesExample class file. And then copy the code snippet in the SelectByPrimaryKey method. Paste the code in the Default.aspx.cs (or.vb) code behind file, in the page load event. See Code Below. CategoriesExample class SelectByPrimaryKey in C# private void SelectByPrimaryKey() // select a record by primary key(s) Categories objcategories = Categories.SelectByPrimaryKey(1); if (objcategories!= null) // if record is found, a record is returned int categoryid = objcategories.categoryid; string categoryname = objcategories.categoryname; string description = objcategories.description; CategoriesExample class SelectByPrimaryKey in VB.NET Private Sub SelectByPrimaryKey() ' select a record by primary key(s) Dim objcategories As Categories = Categories.SelectByPrimaryKey(1) If objcategories IsNot Nothing Then ' if record is found, a record is returned Dim categoryid As Integer = objcategories.categoryid Dim categoryname As String = objcategories.categoryname Dim description As String = objcategories.description End If End Sub Default.aspx (.cs or.vb) Code Behind (C# Code Shown Below) using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) // select a record by primary key(s) Categories objcategories = Categories.SelectByPrimaryKey(1); if (objcategories!= null) // if record is found, a record is returned int categoryid = objcategories.categoryid; string categoryname = objcategories.categoryname; string description = objcategories.description; 19. Make sure to add a reference to the Northwind.BusinessObject. And then change the code so that it can write the retrieved category on the page. See Code below. In C# using System; using Northwind.BusinessObject; public partial class _Default : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) // select a record by primary key(s) Categories objcategories = Categories.SelectByPrimaryKey(1); if (objcategories!= null) // if record is found, a record is returned Response.Write("ID: " + objcategories.categoryid + "<br/>"); Response.Write("Name: " + objcategories.categoryname + "<br/>"); Response.Write("Desc: " + objcategories.description); In VB.NET Imports System Imports Northwind.BusinessObject Partial Class _Default Inherits System.Web.UI.Page Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load ' select a record by primary key(s) Dim objcategories As Categories = Categories.SelectByPrimaryKey(1) If objcategories IsNot Nothing Then ' if record is found, a record is returned Response.Write("ID: " & objcategories.categoryid & "<br/>") Response.Write("ID: " & objcategories.categoryname & "<br/>") Response.Write("ID: " & objcategories.description) End If End Sub End Class

20. Run Visual Studio by pressing F5. You may see a warning about modifying the Web.config to enable debugging, just click the OK button. Then you should see the web page with the specific category on it. See Figure 22. Figure 22 Default.aspx Web Page 21. Close the web page. Note: Some features shown here are not available in the Express Edition. End of tutorial.