code behind/ page inherits?

G

Guest

Why is it that many reference books list "src" as an acceptable method to
inherit the code behind page but Visual Studio doesn't support it? I've had
trouble using the auto-populated tag so I've started using "src" and my pages
work fine. The only problem is that I loose the Design view because it says
that "src" is not supported.

My method:
<%@ Page Inherits="concern" src="concern.aspx.vb"
CodeBehind="concern.aspx.vb" Language="vb"%>

auto-populated VS code:
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb"
Inherits="qc2005.WebForm1"%>
 
K

Kevin Spencer

"src" is used with non-compiled ASP.Net apps, to indicate at run-time where
the CodeBehind class file is located. "CodeBehind" is used by Visual
Studio.Net to indicate at design-time where the CodeBehind file is located.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
Joined
Jun 11, 2009
Messages
9
Reaction score
0
Difference between Inherits vs Src vs Codebehind & AutoEventWireUp

If you are curious to know what Inherits, Src, Codebehind attributes of ASP.NET Page class, you can go through the following link that might help you

shailkpatel.blogspot.com/2008/03/difference-between-inherits-vs-src-vs.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top