How to send email with ASNA Visual RPG
The full source for this article is available here. It is very easy to send email with ASNA Visual RPG. The core enablers are baked into the .NET Framework in these two namespaces: System.Net.Mail.SmtpClient System.Net.Mail.MailMessage The documentation for the System.Net.Mail.SmtpClient class says that because this class "doesn’t support many modern protocols" it is deprecated and that you should use the Nuget MailKit package to send emails. However, the System.Net.Mail.SmtpClient has worked fine for me for a long time with the SMTP services I use. It appears to be obsolete only when used with Xamarin. Read more about this issue here. The code is at this GitHub repo and provides everything […]
A simple date picker for AVR for .NET ASP.NET websites
In the early days of Web development, we had to scrounge around to find solutions to what seemed like the most basic of things. Date input, for example, was a challenging thing to handle manually. To solve the challenge, we often turned to UI libraries. The jQueryUI library offered a date picker component that many used. Back in the day, this library solved lots of Web development issues. It also provided tabs, menus, and dialogs. Today, though, most of the reasons that we used jQueryUI and its sibling, jQuery have been resolved by HTML and CSS becoming so much more capable. For example, HTML acquired a native date picker many […]
AVR Classic upgrade guide: version 2
AVR Classic is ASNA’s original RPG compiler for Windows. Its core codebase is nearly thirty years old. Windows 7 (supported October 22, 2009 through January 14, 2020) introduced many internal changes over Windows XP that didn’t play well with AVR 4.x. In 2012, we spent a lot of time moving our AVR 4.x code from a very old C++ compiler to the (then) latest MS C++ compiler. Recompiling AVR 4.x with this much newer compiler added stability and compatibility with Windows 7. We released this recompiled AVR Classic version as AVR 5.0. This was a lateral upgrade and beyond support for Windows 7/8, it didn’t add any new features to […]
Browsers and mobile clients supported for ASNA products
Our general recommendation is to use the latest editions of: Chrome MS Edge FireFox Safari Chrome and MS Edge are both based on the open-source Chromium engine. There are many other Chromium-based browsers (including Brave, Opera, and Vivaldi) and you may get a good user experience with these other Chromium-based browsers. MS Internet Explorer went out of support in 2022 and we no longer test with it or recommend its use. More details For any platform, you’ll get the best results with browsers that support the latest HTML/CSS/JavaScript standards. These standards are updated very frequently so it’s very important to keep your developer and end-user browsers current. We define current […]
Preserving application state in ASP.NET
Application state is the data that links the various parts of an application together. This data may be scalar values, binary values, or even open files that provide information to the application’s various Windows forms or display file record formats. One substantial difference between Web applications and desktop-bound fat Windows programs or green-screen RPG programs is how application state is managed. With traditional desktop-bound Windows apps and RPG applications, application state is easy to manage–so easy that it’s usually taken for granted. Through a (usually very large) set of global variables, the program moves the user easily to other forms or record formats. ASP.NET Web applications impose a substantial constraint […]
How to calculate date/time differences in Visual RPG for .NET
Back in the halcyon days of RPG II/III, calculating differences between two dates or times was enormously complex and took tons of code (does anyone else remember Paul Conte’s multi-part "Ultimate Date Routines" series in NEWS/400 magazine?). Well, that was then and this is now. .NET offers superb date calculation capabilities. Let’s take a brief look at how to use them. Let’s say you wanted to know how long it’s been since the Beatles’ US debut on Ed Sullivan’s stage on February 9th, 1964 and the last time they played together live on that blustery rooftop in London (with the late, great Billy Preston on the organ) on January 30th, […]
Working with the ASP.NET ListView and row and column clicks
See code on GitHub The ListView is a worthy alternative to the GridView control. With the ListView control, you are 100% in charge of the markup produced. This makes the ListView much better suited to pages where you need complete control over the markup, such as when you’re using a CSS framwork like BootStrap. However, the ListView’s model for determining row clicks is quite different from the GridView. This article shows how to determine what row and column got clicked with the ListView. The ListView’s OnItemCommand property The OnItemCommand binds an event handler subroutine to the ListView’s OnItemCommand event. Unlike a GridView, the ListView’s internal controls (those defined in the […]
Using FTP to send and receive IBM i source members
Occasionally you might need to send or receive a source member from/to your Windows PC and the IBM i. Assuming your IBM i has FTP enabled, it’s a snap to perform this task with Windows’ built-in FTP client. To further explore FTP on Windows, see the list of Windows FTP commands . To start FTP on Windows, open a DOS command line and type FTP and press enter. Use the following commands to receive or a send a member from and to the IBM i. Use these FTP commands to retrieve an IBM i source member to a PC file:
1 2 3 4 5 6 |
ftp open <IP address or server name> (Enter user ID and password as prompted) quote site namefmt 0 ascii get library/file.member pcfilename put pcfilename file.member |
The quote site namefmt 0 command enables the library/file.member naming for the ftp […]
Printing to PDF with ASNA Visual RPG for .NET
Distributing reports as PDF files is a very common practice in the enterprise. ASNA’s DataGate print files are designed to print to one of your installed Windows printers. Printing to PDF with AVR is therefore a pretty simple task of using a PDF print driver and then printing to that virtual printer. These drivers redirect print file output to a PDF file. For use with fat client Windows programs, you may get by with low-end, or even free, PDF print drivers. There are many of these available. However, in every case, these low-end drivers are single-threaded and not for use in the multi-threaded world of IIS. Alas, then, these drivers […]
The .NET Saga: From .NET Framework to .NET
In early 2002, Microsoft officially released .NET Framework 1.0 to the world. This was a big bet from Microsoft that aimed to replace the aging and ailing COM development model. .NET Framework was part: a competitive response to Java an amalgam of various languages and integrated developer tools an attempt to make it much easier to create enterprise Websites and Web services At its launch in 2002, Bill Gates described it as "the first fully integrated development environment for building XML Web services and next-generation Internet applications." As with everything else Microsoft did back then, .NET Framework ran only on the Windows platform. .NET Framework compilers don’t generate processor-specific instructions, […]