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

Question regarding code behind mode.

Hi all,

I am new to asp.net. I have one question regarding code- behind model.

I have written page_load event in code behind as well as in aspx page.

Means i am doing mixing of code-behind as well as single file model.
Is it possible to write some code in code behind and some in aspx page
itself.

what i observerd is page_load event which is there in code-behind gets
exeucted. But page_load event present in aspx page is not executed.

Can any one tell me whether it is possible or not.

Please correct me if i am wrong.

thanks in advance.

Mar 8 '07 #1
1 1230
Hi,

It doesnt make any difference whether you write code in aspx file or in
aspx.vb. When you write code in aspx, at runtime server will seperate that
server side code from aspx. if you write code in code behind file you must
specify it in page directive of aspx file otherwise server will look for the
code written on same aspx file. so you cannot write code in both aspx &
aspx.vb file

Regards
Chetan Chaphekar


"archana" wrote:
Hi all,

I am new to asp.net. I have one question regarding code- behind model.

I have written page_load event in code behind as well as in aspx page.

Means i am doing mixing of code-behind as well as single file model.
Is it possible to write some code in code behind and some in aspx page
itself.

what i observerd is page_load event which is there in code-behind gets
exeucted. But page_load event present in aspx page is not executed.

Can any one tell me whether it is possible or not.

Please correct me if i am wrong.

thanks in advance.

Mar 8 '07 #2

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

Similar topics

4
by: 0to60 | last post by:
I have a question about socket programming in general. Exactly what happens behind the scenes when I one socket connects to a different socket in listen mode? Using the dotnet framework, I...
3
by: Andrew Jocelyn | last post by:
Hi I have a simple ASP.NET web page with a single label control: <%@ Page Language="vb" AutoEventWireup="false" Codebehind="default.aspx.vb" Inherits="proj.TheTime" EnableViewState="false"...
3
by: Prince | last post by:
I have strange problem. If in Design Mode and I drag a Web Server Control onto the form, Visual Studio automatically declares the control for me in the code behind page. However, if I'm...
1
by: Julien Lefebvre | last post by:
Hello all, When we add a new component in default.aspx in the designer mode, it automitically adds a line declairing the component in the codebehind. We dont want the declaration of this component...
1
by: mac | last post by:
Hi, I dont have sql 2005 express on my machine. Instead i have sql server 2005 CTP. When i build and run the website, i get following error. What are necessory steps required to run site. ...
5
by: Brian | last post by:
Hello, I was just playing around with Visual Web Developer 2005 Express (still using Web Matrix) and I added a few controls but I can't seem to code the controls when I double click on one (I.E....
42
by: mellyshum123 | last post by:
I need to read in a comma separated file, and for this I was going to use fgets. I was reading about it at http://www.cplusplus.com/ref/ and I noticed that the document said: "Reads characters...
2
by: stamyo | last post by:
Hello to everyone, i'm facing the following problem: I have a form which is used for both insert or update data.. The situation is like that: when the user fills the form, press the submit button...
8
by: Goran | last post by:
Hi all, I have a question regarding operator <<. A lib of mine contains a class with an overloaded operator << as NON- class member. This would look like: #include <iostream> #include...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...

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.