// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Web; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; namespace Arne { public class RanNum : Page { protected Label rannum; protected Label errmsg; public void Page_Load(Object src, EventArgs e) { try { rannum.Text = NumGen.GenOne().ToString(); errmsg.Text = ""; } catch(NumException ex) { rannum.Text = ""; errmsg.Text = ex.Message; } } } }