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
Shirley2 Trusted Contributor.
Trusted Contributor.
523 views

web application painting a form

I am trying to edit the default.aspx.designer.cbl in my cobol web application and finding it quite challenging.

Is it possible to create a form (much easier) and then use that instead of the default.cbl?

Failing that where can I find help editing the landing page? My cobol program was displaying a screen but this does not work with the web application.

I will have many screens to design and there must be an easier way.

Any help will be appreciated.

Shirley

0 Likes
4 Replies
Micro Focus Expert
Micro Focus Expert

RE: web application painting a form

For an ASP.NET application the file with the name .designer.cbl should never be edited manually. This file is generated by the WebForms Designer.

The WebForms Designer is a bit more cumbersome to use than the other designers for desktop applications such as WinForms or WPF. You basically drag controls from the Toolbox onto the form and then position them using standard spacing with linefeeds, etc. Because HTML pages can be rendered different depending on the browser or resolution, etc. It is normally recommended that you format the html pages using controls such as Panels or Tables that will resize automatically.

The Forms Designer is part of Visual Studio and as such is documented by Microsoft, not Micro Focus.

You might take a look at some of the on-line videos or docs such as this.

0 Likes
Shirley2 Trusted Contributor.
Trusted Contributor.

RE: web application painting a form

Hi Chris

I figured out how to code a new .aspx page and even managed to get it to call the first program.
This program will call various other programs in turn and each program called will have its own screen.

So I got it to call the next program but now I have another question that I hope you can help me with.

Looking at all the help forums online it seems I can create a windows form and call that from the legacy program? Is that correct?
It says I can put " invoke form1::ShowDialog." into the COBOL program

But I get an error COBCH0012 form1 is not declared.

Do you know where I declare it?

Thanks again
Shirley
0 Likes
Micro Focus Expert
Micro Focus Expert

RE: web application painting a form

I don't understand what it is that you are trying to do. You mention you are using aspx pages and then you mention Windows Forms which is a completely different thing. .aspx pages are for creating a web application which will run under IIS and will display the UI in a browser. Windows forms are for creating desktop applications that will run directly on a users computer. Which of these is it that you are trying to do, create a web application or a desktop application?

If you wish to display a new Web Form then you should use something like:

Response.Redirect("TestNew.aspx");

If you really want to display a Dialog Box using a ShowDialog type of approach then you will have to use a different method such as implementing it with JavaScript.

There is an article that touches on this here.

0 Likes
Highlighted
Shirley2 Trusted Contributor.
Trusted Contributor.

RE: web application painting a form

Hi Chris
I am trying to write a web application. The first .aspx page calls the first cobol program and that in turn calls the next program. This program displays a screen which gives the user options to choose the next program each of which will have their own screen or page. This works fine for a desktop application but not a web application. This is my problem.
As I said before I am an old Cobol Programmer so this is all new territory for me.
0 Likes
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.