Image viewer application problsm...

  • Thread starter Thread starter Al Murphy
  • Start date Start date
A

Al Murphy

Folks,

I'm trying to write a little VB.NET Web image-essay application. You
know the ones - a "next/previous" button etc... However due to the
fact that I am new to VB.NET I have bugs.
Could you a look at the code below and tell me where I'm going
wrong. Suggestions/commetns/code samples much appreciated.

Thanks
Al

****CODE AS FOLLOWS****

Imports System.Drawing


Public Class WebForm1
Inherits System.Web.UI.Page
Protected WithEvents Button1 As System.Web.UI.WebControls.Button
Protected WithEvents Button2 As System.Web.UI.WebControls.Button
Protected WithEvents Button3 As System.Web.UI.WebControls.Button
Protected WithEvents Image1 As System.Web.UI.WebControls.Image

Dim count As Integer = 1


Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form
Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here


End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click

' Increment the counter
count = count + 1

Image1.ImageUrl() = "C:\sample\" & count & ".jpg"
Image1.Visible() = True


End Sub 'Button1 - Next


Private Sub Button2_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button2.Click

' Increment the counter
count = count - 1

Image1.ImageUrl() = "C:\sample\" & count & ".jpg"

End Sub 'Button2 - Previous




End Class
 
Hi Al,

What is the message or the error?

You know you can not use this code on Internet?

Cor
 
Back
Top