Want to avoid the Web.UI.Page lifecycle for Ajax requests

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DotNetNewbie

    Want to avoid the Web.UI.Page lifecycle for Ajax requests

    Hi,

    I am implement ajax in a web application, and I want to avoid having
    to go through the entire asp.net page lifecycle since I will be simply
    return back html/xml, and I have no need of the .net page lifecycle
    events.

    What do you suggest is the best way of doing this?

    I am thinking I could put all ajax related code in a seperate folder
    like:

    /wwwroot/web/
    /wwwroot/web/callbacks/ <---- contains the .aspx pages that will
    return back the html or xml from Ajax calls.


    I guess my only choice is to create a HttpModule? How would I do it
    so it only fires for ajax calls? Would I just override the begin
    request even then?
  • =?Utf-8?B?S0g=?=

    #2
    RE: Want to avoid the Web.UI.Page lifecycle for Ajax requests

    Would a simple http handler - .ashx file - would work?


    "DotNetNewb ie" wrote:
    Hi,
    >
    I am implement ajax in a web application, and I want to avoid having
    to go through the entire asp.net page lifecycle since I will be simply
    return back html/xml, and I have no need of the .net page lifecycle
    events.
    >
    What do you suggest is the best way of doing this?
    >
    I am thinking I could put all ajax related code in a seperate folder
    like:
    >
    /wwwroot/web/
    /wwwroot/web/callbacks/ <---- contains the .aspx pages that will
    return back the html or xml from Ajax calls.
    >
    >
    I guess my only choice is to create a HttpModule? How would I do it
    so it only fires for ajax calls? Would I just override the begin
    request even then?
    >

    Comment

    Working...