⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 debugging.aspx

📁 掌握学习.net开发的非常好的资料
💻 ASPX
字号:
<%@ Import Namespace="System.Drawing" %>
<%@ Register TagPrefix="dotnet"  Namespace="dotnetCHARTING" Assembly="dotnetCHARTING"%>
<%@ Page Language="VB"  debug="true" Description="dotnetCHARTING Component" %>

<script runat="server">

Function getRandomData() As SeriesCollection
   Dim SC As New SeriesCollection()
   Dim myR As New Random()
   Dim a As Integer
   For a = 1 To 4
      Dim s As New Series()
      s.Name = "Series " + CStr(a)
      Dim b As Integer
      For b = 1 To 4
         Dim e As New Element()
         e.Name = "Element " + CStr(b)
         'e.YValue = -25 + myR.Next(50);
         e.YValue = myR.Next(50)
         s.Elements.Add(e)
      Next b
      SC.Add(s)
   Next a
   
   
   Return SC
End Function 'getRandomData



Sub Page_Load(sender As [Object], e As EventArgs)
   
   Chart.Type = ChartType.Combo 'Horizontal;
   Chart.TempDirectory = "temp"
   
   ' Set this property in order to get error messages when the chart has problems:
   Chart.Debug = True
   
   
   ' If there is a problem with the data engine, we can also debug it with the following:
   ' We setup a dataengine object and cause an error.
   Dim de As New DataEngine()
   de.ConnectionString = "error causing connection string"
   de.SqlStatement = "error causing statement"
   Dim sc As SeriesCollection = de.GetSeries()
   
   ' Now assign the error message to a label on the page.
   Label.Text = "DataEngine ErrorMessage: " + de.ErrorMessage
   
   
   Chart.YAxis.Scale = Scale.Time
   
   
   ' Add the random data.
   Chart.SeriesCollection.Add(getRandomData())
End Sub 'Page_Load 

</script>
<HTML>
	<HEAD>
		<TITLE>Debugging Sample</TITLE>
	</HEAD>
	<BODY>
		<DIV align="center">
			<dotnet:Chart id="Chart" runat="server" /><br>
			<asp:Label id="Label" runat="server" />
		</DIV>
	</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -