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 7627193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:25:37+00:00 2026-05-31T05:25:37+00:00

There is an existing site with no compiled DLLs, it’s all .aspx.vb and .aspx

  • 0

There is an existing site with no compiled DLLs, it’s all .aspx.vb and .aspx files.

First question is that I can see

<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master"
MaintainScrollPositionOnPostback="true" AutoEventWireup="true"
CodeFile="ThisPageName.aspx.vb" Inherits="ThisPageName" %>

But where is the file that it is inheriting from? I work in C# more and in the compiled variety, I can see this other source file

Partial Class ThisPageName

But where is the other half of the partial class to be found?

The reason for the question is that I’m trying to activate a commented out <asp:button> but when I add the event handler:

Protected Sub btnWasHidden_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Handles btnWasHidden.Click

I get this:

Compiler Error Message: BC30506: Handles clause requires a WithEvents variable
defined in the containing type or one of its base types.

And

E:\path\path\htdocs\ThisPageName.aspx.vb(304) : error BC30451:
Name 'btnWasHidden' is not declared.
  • 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-31T05:25:37+00:00Added an answer on May 31, 2026 at 5:25 am

    I am not sure about non-compiled sites, but normally the “other half” of the page class is kept in the pagename.aspx.designer.vb file, which VS updates as you modify the markup (.aspx) page.

    If you are doing this outside of the context of Visual Studio, you might need to add the member variable for the control to the class manually in either the designer file or your main class file (code behind).

    EDIT: Here is how the .aspx.designer.vb file typically generates member variables for server-side controls:

    Protected WithEvents <control_id> As <full namespace and type of control>
    

    e.g.

    Protected WithEvents TextBox1 As Global.System.Web.UI.WebControls.Button
    

    Just follow that pattern in the normal code-behind .vb file and it should work.

    In your case I believe it will be:

    Protected WithEvents btnWasHidden As Global.System.Web.UI.WebControls.Button
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

An existing Java site is designed to run under / on tomcat and there
Is there existing software for discriminative reranking, such as that used by the Charniak
Are there any existing libraries in existence that will parse a datetime from a
I have an existing site that I'd like to convert to use routing, and
I compiled php 5.4, and am trying to get an existing site ported to
There is an existing site h*tp://www.oldsite.com/ which I need to redirect to the new
I have an existing site build in c# 3.5 using asp.net mvc 1. There
I'm working on a site in asp.net (my first) which is all going very
I have an aspx page that used a method in a class in the
I have an existing site that has a bunch of different models and controllers.

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.