Reputation: 11330
Recently created my first httpmodule. It drops and manages a user cookie. This all works fine.
I now need to drop another cookie relating to site affiliates.
The question is, is is better practice to create 2 entirely separate httpmodules or add extra code to the existing one. The reason I ask is because the functionality is closely related (they both drop a cookie).
Upvotes: 0
Views: 70
Reputation: 54628
Why not write a Class Library that deals with cookies, then write your HttpModules that use the Cookies Class Library?
I don't believe you should join them, because they set cookies for different reasons, and it's easier to disable them individually if they aren't in the same module.
Upvotes: 1