So far I believe I have the code right to open the connection to the xml file and I have the code right to make the image. All I need to do is figure out how to get the first line of the 10 line xml file to display in the spot I want it to.
If you need more info I can give you just about all the info anybody who doesn't suck at ASP.net (unlike me) could need. Thanks.
Code:
<%@ Page ContentType="image/gif" %>
<%@ Import namespace="System.Drawing" %>
<%@ Import namespace="System.Drawing.Imaging" %>
<%@ Import namespace="System.Data" %>
<Script Runat="Server">
Sub Page_Load
Dim objBitmap As Bitmap
Dim objGraphics As Graphics
Dim myDataSet as New DataSet()
' create data connection
myDataSet.ReadXML(Server.MapPath("test.xml"))
dgMBM.DataSource = myDataSet
dgMBM.DataBind()
' Create Bitmap
objBitmap = New Bitmap( 600, 20 )
' Initialize Graphics Class
objGraphics = Graphics.FromImage( objBitmap )
objGraphics.Clear(Color.White)
' Display Bitmap
objGraphics.DrawString("Time:", New Font("Times New Roman", 12, FontStyle.Regular), SystemBrushes.WindowText, New PointF(0, 0))
objGraphics.DrawString("Case Temp:", New Font("Times New Roman", 12, FontStyle.Regular), SystemBrushes.WindowText, New PointF(110, 0))
objGraphics.DrawString("CPU Temp:", New Font("Times New Roman", 12, FontStyle.Regular), SystemBrushes.WindowText, New PointF(230, 0))
objGraphics.DrawString("60gig hd Temp:", New Font("Times New Roman", 12, FontStyle.Regular), SystemBrushes.WindowText, New PointF(340, 0))
objGraphics.DrawString("Cpu Fan:", New Font("Times New Roman", 12, FontStyle.Regular), SystemBrushes.WindowText, New PointF(480, 0))
objBitmap.Save( Response.OutputStream, ImageFormat.Gif )
End Sub
</Script>
<asp:datagrid id="dgMBM" runat="server" />
If you need more info I can give you just about all the info anybody who doesn't suck at ASP.net (unlike me) could need. Thanks.