Using SRC attribute with Visual Studio.NET

D

Dave

Hi,

I understand that the CodeBehind= is designed to be used
by VS and not actually part of the .NET framework

However, in my BenefitsVB project to test how the SRC
works, I created a simple aspx and codebind (below) and
added Src="WebFormSrc.aspx.vb" to the page directive.

I then tried to browse the page and got:

Parser Error Message: The base
type 'BenefitsVB.WebFormSrc' does not exist in the source
file 'WebFormSrc.aspx.vb'.

To get this to work, I had to change my inherits to
Inherits="WebFormSrc" and it ran OK. However when I
edited the code behind VS.NET put the project name back
into the Inherits attribute.

1.) Is the SRC designed to NOT be used with Visual Studio?
2.) When the SRC compiles the codebehind where does it put
the compiled version.
3.) If I want to tweak one codebehind file in VS.NET
project instead of recopiling the whole project to a
new .DLL is this possible using the SRC?

<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="WebFormSrc.aspx.vb"
Inherits="BenefitsVB.WebFormSrc" Src="WebFormSrc.aspx.vb"%>
<html>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post"
runat="server">
</form>
</body>
</html>


Public Class WebFormSrc
Inherits System.Web.UI.Page

Private Sub Page_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles MyBase.Load
Response.Write(System.DateTime.Now)
End Sub

End Class
 

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,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top