Question regarding code behind mode.

  • Thread starter Thread starter archana
  • Start date Start date
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.
 
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
 
Back
Top