Click here to Skip to main content
12,451,093 members (42,070 online)
Click here to Skip to main content

Stats

56.2K views
1.1K downloads
39 bookmarked
Posted

A simple thermometer chart for ASP.NET

, 15 May 2007 Ms-PL
A simple thermometer chart for ASP.NET.
<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
    '---Page accepts these querystring values:
    '   MIN: Value displayed at bottom of thermometer.
    '   MAX: Value displayed at top of thermometer
    '   IV:  Value indicated on the thermometer.
    '   T:   Title displayed at top of the thermometer
    '   VT:  Type of values (1=currency, 2=decimal, 3=integer)
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim dMinValue As Decimal = 0 : If IsNumeric(Request.QueryString("MIN")) Then dMinValue = Request.QueryString("MIN")
        Dim dMaxValue As Decimal = 100 : If IsNumeric(Request.QueryString("MAX")) Then dMaxValue = Request.QueryString("MAX")
        Dim dIndicatedValue As Decimal = 50 : If IsNumeric(Request.QueryString("IV")) Then dIndicatedValue = Request.QueryString("IV")
        Dim sTitle As String = "Thermometer Chart" : If IsNumeric(Request.QueryString("T")) Then sTitle = Request.QueryString("T")
        Dim iValueType As JThermometer.ValueType = JThermometer.ValueType.Integer : If IsNumeric(Request.QueryString("VT")) Then iValueType = Request.QueryString("VT")
        
        Dim oThermometer As New JThermometer( _
                dMinValue:=dMinValue, _
                dMaxValue:=dMaxValue, _
                dIndicatedValue:=dIndicatedValue, _
                sTitle:=sTitle, _
                iValueType:=iValueType)
    End Sub
</script>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)

Share

About the Author

Joe Lynds
Web Developer
United States United States
Joe is a software engineer. He lives in Pennsylvania where he develops software for manufacturing and human services when he is not at the park with his three boys.

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160826.1 | Last Updated 15 May 2007
Article Copyright 2007 by Joe Lynds
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid