chobo
chobo

Reputation: 32291

Would it be better to handle request in global.asax?

I am making a simple request parses that takes in urls with querystring parameters and spits back xml.

Right now this is all handled in a default.aspx page, so I don't have to much around with url rewriting and such. Would it be better to keep the default.aspx page, but have the requests handled in the global.asax page?

Would it be more optimized that way?

Upvotes: 0

Views: 457

Answers (3)

Jordão
Jordão

Reputation: 56477

For requests that don't need a full-blown ASP.NET page, you should take a look at the IHttpHandler interface, or just create ashx files.

Upvotes: 2

pseudocoder
pseudocoder

Reputation: 4392

It sounds like what you are trying to do is what a HTTPHandler is designed for. Here is the reference if you are unfamiliar:

MSDN- HTTPHandler

Upvotes: 0

Chad
Chad

Reputation: 1562

I usually implement a BasePage class that inherits System.Web.UI.Page then have all of my pages inherit BasePage.

Put in methods that you want to use through out the site in the base page.

Upvotes: 0

Related Questions