Question regarding code behind mode.

A

archana

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.
 
G

Guest

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
 

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,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top