﻿using System;
using Composite.Functions;

public partial class C1Function : Composite.AspNet.UserControlFunction
{
    public override string FunctionDescription
    {
        get 
        { 
            return "A demo function that outputs a hello message read from the query string parameter."; 
        }
    }

    [FunctionParameter(DefaultValue = "World")]
    public string Name { get; set; }

    protected void Page_Load(object sender, EventArgs e)
    {
        string Param1 = Request.QueryString["Param1"];

		// fall back to the default value if no query parameter is specified
        if(!String.IsNullOrEmpty(Param1))
            Name = Param1;
    }
}