Databases Reference
In-Depth Information
Figure 7-78
The last line of code redirects the web application to the second web form called
GaugeReport_Viewer.aspx:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As _
System.EventArgs) _Handles Button1.Click
'-- The gauge value is hard-coded in the example
'-- In production, this would come from data or user-input
Me.GaugeContainer1.LinearGauges(0).Pointers(0).Value = 65
Me.GaugeContainer1.SaveAsImage(“C:\inetpub\wwwroot\report_images\Gauge1.png”, _
Dundas.Gauges.WebControl.GaugeImageFormat.Png)
Response.Redirect(“GaugeReport_Viewer.aspx”)
End Sub
There is no need to show you the second page because it's completely blank. The only program code
runs on the page Load event, which runs as the page object is loaded into memory on the web server
and before the page content is sent to the client's web browser. First, take a look at the entire block of
code. After this, I'll step you through each section of code separately and explain what's going on:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles MyBase.Load
'***************************************************************
' Replace report image with any custom image content.
' Paul Turley, 2005
'***************************************************************
'-- Instantiate ReportingService object from web service reference:
Search WWH ::




Custom Search