473,398 Members | 2,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Wrong Code-Behind Page being referenced

Hey Folks,

I have a bunch of aspx pages in a solution. One of these pages, call it
header1.aspx, has it's code behind in header1.aspx.vb. Another,
header2.aspx, has header2.aspx.vb. When I double-click a web control on
header1.aspx, it brings me to the code behind for header2! In fact, the
code behind page header1.aspx.vb doesn't even recognize the controls on page
header1.aspx.

BUT, header2.aspx.vb recognizes the controls from header1.aspx.

The @ Page tag at the top of each page has the correct vb file listed
(header1.aspx has CodeBehind="header1.aspx.vb" and header2.aspx has
CodeBehind="header2.aspx.vb").

Earlier, I notice something got messed up and the header1.aspx Page tag had
it's code behind pointing to header2.aspx.vb, but I changed that and now the
proper vb files (with their proper resx files) are under ther respective
aspx pages in the Solution Explorer.

Anyone know if there is some other tag/setting/whatever to get an aspx page
pointing to the right vb file?

Thanks,

Jeff
Nov 17 '05 #1
3 2072
Hi Jeff,

Is it possible that the src attribute in the .aspx file is pointing to the
right place but the inherits is looking at the wrong class? I've made that
mistake when doing a copy/paste file within VS.NET.
"Jeff Cooper" <js******@compudude.com> wrote in message
news:UW*******************@newsread1.news.atl.eart hlink.net...
Hey Folks,

I have a bunch of aspx pages in a solution. One of these pages, call it
header1.aspx, has it's code behind in header1.aspx.vb. Another,
header2.aspx, has header2.aspx.vb. When I double-click a web control on
header1.aspx, it brings me to the code behind for header2! In fact, the
code behind page header1.aspx.vb doesn't even recognize the controls on page
header1.aspx.

BUT, header2.aspx.vb recognizes the controls from header1.aspx.

The @ Page tag at the top of each page has the correct vb file listed
(header1.aspx has CodeBehind="header1.aspx.vb" and header2.aspx has
CodeBehind="header2.aspx.vb").

Earlier, I notice something got messed up and the header1.aspx Page tag had
it's code behind pointing to header2.aspx.vb, but I changed that and now the
proper vb files (with their proper resx files) are under ther respective
aspx pages in the Solution Explorer.

Anyone know if there is some other tag/setting/whatever to get an aspx page
pointing to the right vb file?

Thanks,

Jeff

Nov 17 '05 #2
The Codebehind attribute doesn't do anything at runtime. This just tells
VS.NET what source files to compile into code-behind classes in the .dll for
your bin folder. What matters is the Inherits attribute which tells ASP.NET
which class to use from that dll. You might have the same Inherits attribute
on both pages, causing both pages to inherit from the same page class.

"Jeff Cooper" <js******@compudude.com> wrote in message
news:UW*******************@newsread1.news.atl.eart hlink.net...
Hey Folks,

I have a bunch of aspx pages in a solution. One of these pages, call it
header1.aspx, has it's code behind in header1.aspx.vb. Another,
header2.aspx, has header2.aspx.vb. When I double-click a web control on
header1.aspx, it brings me to the code behind for header2! In fact, the
code behind page header1.aspx.vb doesn't even recognize the controls on page header1.aspx.

BUT, header2.aspx.vb recognizes the controls from header1.aspx.

The @ Page tag at the top of each page has the correct vb file listed
(header1.aspx has CodeBehind="header1.aspx.vb" and header2.aspx has
CodeBehind="header2.aspx.vb").

Earlier, I notice something got messed up and the header1.aspx Page tag had it's code behind pointing to header2.aspx.vb, but I changed that and now the proper vb files (with their proper resx files) are under ther respective
aspx pages in the Solution Explorer.

Anyone know if there is some other tag/setting/whatever to get an aspx page pointing to the right vb file?

Thanks,

Jeff

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Jerry Krinock | last post by:
I've declared a class that has some std::vector data members like this: class MyClass { public: ... std::vector<Apples> apples ; ... private: ...
5
by: titan0111 | last post by:
#include<iostream> #include<iomanip> #include<cstring> #include<fstream> using namespace std; class snowfall { private: int ft;
1
by: Matthew Wilson | last post by:
I need to write a function crc(msg, len) that gets a char array of length len and then calculates the crc32 for the code. I don't understand what's going wrong in the code I have. It goes...
2
by: chiara | last post by:
Hi! This is a piece of a code I wrote. It was perfectly working but now it is giving me some problems I can not understand. I scan a directory (ss_data) and I count its alaments. then I print...
0
by: Miquel | last post by:
Hi all. I felt frustrated when developing an 'UserControl' derivated from textBox, because sequence event (and Validate event) seems to fail. I Always thought my code was wrong. But after...
10
by: bob | last post by:
Hello, I use Microsoft Visual C++ .NET (version 7.1.3088) Sometimes (with big codes?) when I get a compile error and click on the error, the cursor is placed next to the wrong piece of code. The...
8
by: Dmitry Korolyov | last post by:
ASP.NET app using c# and framework version 1.1.4322.573 on a IIS 6.0 web server. A single-line asp:textbox control and regexp validator attached to it. ^\d+$ expression does match an empty...
3
by: belton180 | last post by:
CODE]../* Program function: Simulate the stack using a stack limit of 10. Display a menu for the the following. Create a stack Insert an item in the stack Pop an item from the stack ...
9
by: Pyenos | last post by:
import cPickle, shelve could someone tell me what things are wrong with my code? class progress: PROGRESS_TABLE_ACTIONS= DEFAULT_PROGRESS_DATA_FILE="progress_data" PROGRESS_OUTCOMES=
20
by: Daniel.C | last post by:
Hello. I just copied this code from my book with no modification : #include <stdio.h> /* count characters in input; 1st version */ main() { long nc; nc = 0;
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.