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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:42:57+00:00 2026-06-03T17:42:57+00:00

I have an ASPX file with this button: <asp:button id=cmdPartnerInfo runat=server Font-Bold=True Text=Partner Info

  • 0

I have an ASPX file with this button:

<asp:button id="cmdPartnerInfo" runat="server" Font-Bold="True" 
    Text="Partner Info" TabIndex="3">
</asp:button>

And in the ASPX.VB file I have this Sub:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    cmdPartnerInfo.Attributes.Add("onclick", "return ShowPartnerContatcInfo();")
    imgStaff.Attributes.Add("onclick", "return AddStaffSelection();")
    lblDt.Text = ""

... snip ...

End Sub

However, there is a squiggly line under cmdPartnerInfo and the message is:

Error 38 'cmdPartnerInfo' is not declared. It may be inaccessible due to its 
protection level.

So it looks like the code in the vb file doesn’t see the asp control in the aspx page.

Any help figuring out why this is happening is appreciated.

Thanks!
Eric

UPDATE:
These are the two directives at the top of the ASPX page.

<%@ Register TagPrefix="Card" TagName="Banner" Src="~/banner.ascx" %>
<%@ Page Language="vb" AutoEventWireup="false" CodeFile="projectpartlog.aspx.vb" Inherits="Project_and_Partners_Log" %>
  • 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-06-03T17:42:58+00:00Added an answer on June 3, 2026 at 5:42 pm
    <%@ Page Language="vb" AutoEventWireup="false" CodeFile="projectpartlog.aspx.vb" Inherits="Project_and_Partners_Log" %>
    

    This directive means:

    1. The file name for your “code behind” should be projectpartlog.aspx.vb
    2. The Class name in the projectpartlog.aspx.vb file should be Project_and_Partners_Log

      Partial Class Project_and_Partners_Log
          Inherits System.Web.UI.Page
      
          Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
      
          End Sub
      
          Protected Sub cmdPartnerInfo_Click(sender As Object, e As System.EventArgs) Handles cmdPartnerInfo_Click.Click     
      
            'Code.....
      
           End Sub
      
      End Class
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ListView in my aspx file like this: <asp:ListView ID=ListView1 runat=server></asp:ListView> and
I created this datagrid in my .aspx file. <asp:datagrid id=Computerchange runat=server AllowPaging=True PageSize=2 AutoGenerateColumns=False
I have a standard button in my default.aspx page. <asp:Button ID=Search_Button runat=server Text=Search onclick=Search_Button_Click
If I put a control in a .aspx file like this; <asp:TextBox ID=protectedTextBox runat=server>Some
in aspx file I have <asp:DropDownList ID=DropDownList1 runat=server > </asp:DropDownList> <asp:DropDownList ID=DropDownList2 runat=server> </asp:DropDownList>
I have an XML file that looks like this: <SiteMenuItems> <SiteMenuItem text=Home navigateurl=/Default.aspx tooltip=Return
I have this line in a button click method on my aspx.cs file ClientScript.RegisterStartupScript(this.GetType(),
So, I have an .aspx webpage as follows: .. <form id=frm runat=server> <asp:FileUpload runat=server
This is the code from .aspx file <html xmlns=http://www.w3.org/1999/xhtml> <head runat=server> <title>Login Again</title> <script
I have this: <textarea name=content></textarea> and in javascript code in the same aspx file

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.