Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Creating web applications using Visual COBOL and ASP.NET

Creating web applications using Visual COBOL and ASP.NET

Getting Started with Visual COBOL for Visual Studio

Creating Web Applications


In this tutorial, we task you through the steps to create an ASP.NET web application.

Start Visual Studio and from the file menu, create a new project.

Under the COBOL templates and select Web and ASP.NET Web Application.

Give the project a name and location and click OK

Click the design tab in the bottom left of the main window to switch to the HTML design view.

Ensure the toolbox window is visible from the View menu

And then drag a button from the toolbox on to the form.

Add a textbox too.

Your screen should look similar to this:

Double-click the button to add an event handler.

Add the following code:

class-id WebApplication1._Default is partial
inherits type System.Web.UI.Page public.
working-storage section.

method-id Page_Load protected.
local-storage section.
procedure division using by value sender as object by value e as type EventArgs.

end method.

method-id Button1_Click protected.
procedure division using by value sender as object e as type System.EventArgs.

set TextBox1::Text to "hello world!"

end method.

end class.

In the solution explorer window, right-click default.aspx and select "set as start page"

Press F5 to build and run your application.

Using JQuery and Web Services

Take this a step further by downloading the project here which shows how to use JQuery and web services to produce rich applications for mobile devices.


Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Version history
Revision #:
1 of 1
Last update:
‎2012-12-14 07:17
Updated by:
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.