Question regarding code behind mode.

Discussion in 'ASP .Net' started by archana, Mar 8, 2007.

  1. archana

    archana Guest

    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.
     
    archana, Mar 8, 2007
    #1
    1. Advertisements

  2. archana

    Guest 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
     
    Guest, Mar 8, 2007
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.