We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Error--May be minor

Last post 04-09-2008 7:02 AM by Markand. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 04-09-2008 7:02 AM

    • Markand
    • Not Ranked
    • Joined on 04-09-2008
    • India
    • New Member
    • Points 15

    Error--May be minor

    hi
    i have taken this code from one website. but it shows some errors.
    here is the code.
    These are some import statements.

    Imports System.IO
    Imports System.Drawing
    Imports System.Drawing.Bitmap
    Imports System.Drawing.Drawing2D
    Imports System.Data
    Imports System.Data.SqlClient


    and here is the PageLoad event..

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
           Me.Title = "USS Isherwood DD-520"


           Dim files() As String
           Dim i As Integer
           files = Directory.GetFiles(Server.MapPath("~\Images"), "*.jpg")

           If Page.IsPostBack Then
               Me.imgMain.ImageUrl = Request.QueryString("Img")
           End If

           Dim arrIbs(files.Length) As ImageButton
           For i = 0 To files.Length - 1
               Dim image As New Bitmap(files(i).ToString)
               arrIbs(i) = New ImageButton()
               arrIbs(i).ImageUrl = files(i).ToString()
               arrIbs(i).Width = 160
               arrIbs(i).Height = 100
               arrIbs(i).BorderStyle = BorderStyle.Inset
               arrIbs(i).BorderWidth = 2
               arrIbs(i).AlternateText = _
                   System.IO.Path.GetFileName(files(i).ToString())
               arrIbs(i).PostBackUrl = "default.aspx?Img=" & _
                                       files(i).ToString()
               Me.pnlThumbs.Controls.Add(arrIbs(i))
               Dim lbl As New Label
               lbl.Text = "<br/>"
               pnlThumbs.Controls.Add(lbl)
           Next

       End Sub

    it shows ERROR at  Me.pnlThumbs.Controls.Add(arrIbs(i))-- error of pnlThumbs
    and at pnlThumbs.Controls.Add(lbl)--error of pnlThumbs
    Me.imgMain.ImageUrl = Request.QueryString("Img")-- error of imgMain

    it says "pnlThumb is not a member of _Default."
    and "imgMain is not a member of _Default."

    hoping for a good and quick reply..
    thank you
    Markand

    • Post Points: 5
Page 1 of 1 (1 items)