473,395 Members | 1,526 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,395 software developers and data experts.

What is the difference detween SRC and CODEBEHIND Tags?

Hello,

What is the difference between SRC and CODEBEHIND Tags?

Example

<%@ Page Language="vb" ValidateRequest="false" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" %>

or

<%@ Page Language="vb" Src="WebForm1.aspx.vb" Inherits="WebForm1" %>

Thanks,

Jack
Nov 19 '05 #1
7 2201
From MSDN Library @Page Directive page:

SRC specifies the source file name of the code-behind class to dynamically
compile when the page is requested. You can choose to include programming
logic for your page either in a code-behind class or in a code declaration
block in the .aspx file

CODEBEHIND specifies the name of the compiled file that contains the class
associated with the page. This attribute is used by the Visual Studio .NET
Web Forms designer. It tells the designer where to find the page class so
that the designer can create an instance of it for you to work with at
design time. For example, if you create a Web Forms page in Visual Studio
called WebForm1, the designer will assign the Codebehind attribute the value
of WebForm1.aspx.vb, for Visual Basic, or WebForm1.aspx.cs, for C#. This
attribute is not used at run time.

DalePres
MCAD, MCDBA, MCSE
"Jack" <jo***@webfoxmail.com> wrote in message
news:OA*************@TK2MSFTNGP15.phx.gbl...
Hello,

What is the difference between SRC and CODEBEHIND Tags?

Example

<%@ Page Language="vb" ValidateRequest="false" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" %>

or

<%@ Page Language="vb" Src="WebForm1.aspx.vb" Inherits="WebForm1" %>

Thanks,

Jack

Nov 19 '05 #2
Hello,

So it codebehind better for speed?

Thanks,

Jack

"DalePres" <don-t-spa-m-me@lea-ve-me-a-lone--.com> wrote in message
news:OJ**************@TK2MSFTNGP14.phx.gbl...
From MSDN Library @Page Directive page:

SRC specifies the source file name of the code-behind class to dynamically
compile when the page is requested. You can choose to include programming
logic for your page either in a code-behind class or in a code declaration
block in the .aspx file

CODEBEHIND specifies the name of the compiled file that contains the class
associated with the page. This attribute is used by the Visual Studio .NET
Web Forms designer. It tells the designer where to find the page class so
that the designer can create an instance of it for you to work with at
design time. For example, if you create a Web Forms page in Visual Studio
called WebForm1, the designer will assign the Codebehind attribute the
value of WebForm1.aspx.vb, for Visual Basic, or WebForm1.aspx.cs, for C#.
This attribute is not used at run time.

DalePres
MCAD, MCDBA, MCSE
"Jack" <jo***@webfoxmail.com> wrote in message
news:OA*************@TK2MSFTNGP15.phx.gbl...
Hello,

What is the difference between SRC and CODEBEHIND Tags?

Example

<%@ Page Language="vb" ValidateRequest="false" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" %>

or

<%@ Page Language="vb" Src="WebForm1.aspx.vb" Inherits="WebForm1" %>

Thanks,

Jack


Nov 19 '05 #3
No.

Everything gets compiled to an assembly after the first
page call, so there's no difference between a compiled
page, a codebehind-compiled page, or an assembly.

*Everything* runs from ram after the first call.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaol
=====================

"Jack" <jo***@webfoxmail.com> wrote in message
news:uy**************@TK2MSFTNGP09.phx.gbl...
Hello,

So it codebehind better for speed?

Thanks,
Jack "DalePres" <don-t-spa-m-me@lea-ve-me-a-lone--.com> wrote in message
news:OJ**************@TK2MSFTNGP14.phx.gbl...
From MSDN Library @Page Directive page:

SRC specifies the source file name of the code-behind class to
dynamically compile when the page is requested. You can choose to include
programming logic for your page either in a code-behind class or in a
code declaration block in the .aspx file

CODEBEHIND specifies the name of the compiled file that contains the
class associated with the page. This attribute is used by the Visual
Studio .NET Web Forms designer. It tells the designer where to find the
page class so that the designer can create an instance of it for you to
work with at design time. For example, if you create a Web Forms page in
Visual Studio called WebForm1, the designer will assign the Codebehind
attribute the value of WebForm1.aspx.vb, for Visual Basic, or
WebForm1.aspx.cs, for C#. This attribute is not used at run time.

DalePres
MCAD, MCDBA, MCSE
"Jack" <jo***@webfoxmail.com> wrote in message
news:OA*************@TK2MSFTNGP15.phx.gbl...
Hello,

What is the difference between SRC and CODEBEHIND Tags?

Example

<%@ Page Language="vb" ValidateRequest="false" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" %>

or

<%@ Page Language="vb" Src="WebForm1.aspx.vb" Inherits="WebForm1" %>

Thanks,

Jack



Nov 19 '05 #4
Code behind will compile quicker on application startup because large parts
of the code are pre-compiled into the dll. Of course, this only occurs for
the first user of the application as long as the application stays loaded so
it is a rather trivial performance boost in the big scheme of things.

You might find this article interesting:

http://msdn.microsoft.com/library/de...sualStudio.asp

DalePres
"Jack" <jo***@webfoxmail.com> wrote in message
news:uy**************@TK2MSFTNGP09.phx.gbl...
Hello,

So it codebehind better for speed?

Thanks,

Jack

"DalePres" <don-t-spa-m-me@lea-ve-me-a-lone--.com> wrote in message
news:OJ**************@TK2MSFTNGP14.phx.gbl...
From MSDN Library @Page Directive page:

SRC specifies the source file name of the code-behind class to
dynamically compile when the page is requested. You can choose to include
programming logic for your page either in a code-behind class or in a
code declaration block in the .aspx file

CODEBEHIND specifies the name of the compiled file that contains the
class associated with the page. This attribute is used by the Visual
Studio .NET Web Forms designer. It tells the designer where to find the
page class so that the designer can create an instance of it for you to
work with at design time. For example, if you create a Web Forms page in
Visual Studio called WebForm1, the designer will assign the Codebehind
attribute the value of WebForm1.aspx.vb, for Visual Basic, or
WebForm1.aspx.cs, for C#. This attribute is not used at run time.

DalePres
MCAD, MCDBA, MCSE
"Jack" <jo***@webfoxmail.com> wrote in message
news:OA*************@TK2MSFTNGP15.phx.gbl...
Hello,

What is the difference between SRC and CODEBEHIND Tags?

Example

<%@ Page Language="vb" ValidateRequest="false" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" %>

or

<%@ Page Language="vb" Src="WebForm1.aspx.vb" Inherits="WebForm1" %>

Thanks,

Jack



Nov 19 '05 #5
just posted a question on this. thank you this was a big help

"DalePres" wrote:
Code behind will compile quicker on application startup because large parts
of the code are pre-compiled into the dll. Of course, this only occurs for
the first user of the application as long as the application stays loaded so
it is a rather trivial performance boost in the big scheme of things.

You might find this article interesting:

http://msdn.microsoft.com/library/de...sualStudio.asp

DalePres
"Jack" <jo***@webfoxmail.com> wrote in message
news:uy**************@TK2MSFTNGP09.phx.gbl...
Hello,

So it codebehind better for speed?

Thanks,

Jack

"DalePres" <don-t-spa-m-me@lea-ve-me-a-lone--.com> wrote in message
news:OJ**************@TK2MSFTNGP14.phx.gbl...
From MSDN Library @Page Directive page:

SRC specifies the source file name of the code-behind class to
dynamically compile when the page is requested. You can choose to include
programming logic for your page either in a code-behind class or in a
code declaration block in the .aspx file

CODEBEHIND specifies the name of the compiled file that contains the
class associated with the page. This attribute is used by the Visual
Studio .NET Web Forms designer. It tells the designer where to find the
page class so that the designer can create an instance of it for you to
work with at design time. For example, if you create a Web Forms page in
Visual Studio called WebForm1, the designer will assign the Codebehind
attribute the value of WebForm1.aspx.vb, for Visual Basic, or
WebForm1.aspx.cs, for C#. This attribute is not used at run time.

DalePres
MCAD, MCDBA, MCSE
"Jack" <jo***@webfoxmail.com> wrote in message
news:OA*************@TK2MSFTNGP15.phx.gbl...
Hello,

What is the difference between SRC and CODEBEHIND Tags?

Example

<%@ Page Language="vb" ValidateRequest="false" AutoEventWireup="false"
Codebehind="WebForm1.aspx.vb" %>

or

<%@ Page Language="vb" Src="WebForm1.aspx.vb" Inherits="WebForm1" %>

Thanks,

Jack



Nov 19 '05 #6
Roy
FWIW, me not having Visual Studio.NET I have become very familiar with
src=...

In a nutshell, the only difference I can perceive between them is that
codebehind is only used in the VS.NET development environment. If
you're coding using notepad, you use src.

Nov 19 '05 #7
TJS
Thank you this is the short correct answer

also please note visual studio products and SDK products are not compatible
"Roy" <ro**********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
FWIW, me not having Visual Studio.NET I have become very familiar with
src=...

In a nutshell, the only difference I can perceive between them is that
codebehind is only used in the VS.NET development environment. If
you're coding using notepad, you use src.

Nov 19 '05 #8

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

Similar topics

3
by: nazim | last post by:
Hi, As a real novice trying to get to grips with c#.NET and html. I have created a simple showdialogbox which is called from within a webpage.aspx, I pass values to it from the main page and i...
3
by: Marcos MOS | last post by:
Hi there! I'm following this article (http://www.codeproject.com/aspnet/ctrlreuse.asp -> "Share your user control across multiple web applications". It explains how to share user control with...
3
by: Leo Muller | last post by:
Hi, How can I write text from code behind without getting HTML tags added to it? Up till now I used the label control. But when I call the label.text = "something" then the HTML will output...
37
by: Alan Silver | last post by:
Hello, Newbie here, so please forgive what is probably a basic question ... I see a lot of discussion about "code behind", which if I have understood correctly, means that the script code goes...
5
by: rodchar | last post by:
hey all, what's the difference between span and div tags? thanks, rodchar
2
by: archana | last post by:
Hi all, I want to clear my doubt related to tags provided in codebehind file. I am using summay tag to store information about parameter of function in function definitation. So initially...
1
by: keithb | last post by:
What is the difference between code that exists inside the <html><script runat="server" > tag and code that exists in a code-behind file? Thanks, Keith
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
6
by: =?Utf-8?B?d2lsbGlhbQ==?= | last post by:
Hi, I posted this in wrong group, so just re-post here. There are two ways to create web-based application or web service, from VS start page, click on File and New, two options you can choose,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.