Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 681145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:27:04+00:00 2026-05-14T01:27:04+00:00

This is my first time doing VB :-) I’ve inherited a web site, which

  • 0

This is my first time doing VB 🙂 I’ve inherited a web site, which I’ve converted into a web application in VS2008. The conversion has worked for everything except a Gallery control.

The compile error I’m getting is:

Type ‘Gallery’ is not defined in file: gallery_oct07.aspx.designer.vb

Option Strict On
Option Explicit On

Partial Public Class gallery_oct07

    '''<summary>
    '''Gallery1 control.
    '''</summary>
    '''<remarks>
    '''Auto-generated field.
    '''To modify move field declaration from designer file to code-behind file.
    '''</remarks>
    Protected WithEvents Gallery1 As Global.Gallery
End Class

with squiggly lines under Global.Gallery.

The gallery_oct07.aspx.vb is:

Partial Class gallery_oct07
    Inherits System.Web.UI.Page

End Class

And the gallery_oct07.aspx file:

<%@ page language="VB" masterpagefile="~/MasterPage.master" autoeventwireup="false" inherits="WebApplication1.gallery_oct07" title="2007 Trip Photos" Codebehind="~/gallery_oct07.aspx.vb" %>

<%@ Register Src="Gallery.ascx" TagName="Gallery" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<script language="javascript" type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script language="javascript" type="text/javascript" src="js/thickbox.js"></script>
    <p class="title">
        Koru Care Christchurch Charitable Trust</p>
    <img src="images/green_space.gif" />
    <p class="title">
        Trip Photos</p>
    <p class="subTitle">
        Los Angeles 2007</p>
    <p class="text">
        Click for larger Image</p>
    <uc1:Gallery ID="Gallery1" runat="server" ImageFolder="images/oct2007/"  />    
</asp:Content>

Gallery.ascx is:

<%@ Control Language="C#" AutoEventWireup="true" Codebehind="Gallery.ascx.cs" Inherits="WebApplication1.Gallery"%>

<asp:Repeater runat="server" ID="rptGallery">
    <HeaderTemplate>
        <ul class='<%#CssClass%>'>
    </HeaderTemplate>
    <ItemTemplate>
        <li><a href='<%#ImageFolder + Eval("Name") %>' class="thickbox" rel="gallery"><img src='<%#ImageFolder + "thumb/" + Eval("Name") %>' /></a></li>
            </ItemTemplate>
    <FooterTemplate>
        </ul></FooterTemplate>
</asp:Repeater>

and the code behind is:

using System;
using System.IO;

namespace WebApplication1
{
    public partial class Gallery : System.Web.UI.UserControl
    {
        public string _ImageFolder;
        public string ImageFolder
        {
            get
            {
                return _ImageFolder;
            }
            set
            {
                _ImageFolder = value;
            }
        }

        private string _cssClass = "gallery";

        public string CssClass
        {
            get
            {
                return _cssClass;
            }
            set
            {
                _cssClass = value;
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {

            DirectoryInfo dir = new DirectoryInfo(MapPath(ImageFolder));
            FileInfo[] images = dir.GetFiles("*.jpg");

            rptGallery.DataSource = images;
            rptGallery.DataBind();

        }

        protected void Page_PreRender(object sender, EventArgs e)
        {

        }
    }
}

The feels like a namespace issue.. My project namespace is WebApplication1.

Cheers!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T01:27:05+00:00Added an answer on May 14, 2026 at 1:27 am

    It seems like the code for the Gallery isn’t being found, which means it’s either not getting build, or has a namespace that isn’t what you’re expecting.

    Download reflector, open up the DLL, and see if you can figure out where the control lives, namespace wise.

    Other things to check:

    • does your project have any global namespace or DLL settings that might change things?
    • are you sure the build action for the control is the correct one? (i.e. make sure it’s not being ignored, or included as content)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my first time doing this sort of project so apologies if the
This is my first time doing mobile development with twitter. I'm using Adobe Flash
This is my first time using this site and I am quite new to
first of all sorry if this isn't formatted correctly, first time doing this. I've
ok, this is really my first time doing my first class with javaScript, I
HI, this is my first time doing this. I've read The definitive guide to
I have never collected DOB before. This is the first time i am doing
I dont know what im doing wrong this is my first time seperating .cpp
First time posting in Stack Overflow, hope I'm doing this right. I'm writing an
This is my first time doing these things. Basically I am creating a batch

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.