HighTechTalks DotNet Forums  

Programatically adding an HTTPHandler

ASP.net Building Controls microsoft.public.dotnet.framework.aspnet.buildingcontrols


Discuss Programatically adding an HTTPHandler in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Steve C. Orr [MVP, MCSD]
 
Posts: n/a

Default Programatically adding an HTTPHandler - 05-30-2006 , 06:52 PM






When my custom control is dropped onto a web page at design time, I want an
associated HTTPHandler reference to be automatically added to the project's
web.config file if it's not already there.
I see some other controls do this, such as the ReportViewer control so I
know it is possible. But how is it done? Does anybody know?




Reply With Quote
  #2  
Old   
CaffieneRush (AT) gmail (DOT) com
 
Posts: n/a

Default Re: Programatically adding an HTTPHandler - 05-31-2006 , 06:04 PM






I haven't tried this yet but how about overriding the Initialize method
of the ControlDesigner associated with your control and modifying the
reference in web.config?

The MSDN sample 'How to: Use Services and Action Lists with Control
Designers' contains code on how to access web.config from the VS host
environment.

Some of the class code are missing on the online docs. So look at the
docs installed with VS rather than the docs @ msdn2.microsoft.com.

By the way, debugging control designers requires 2 instances of VS. One
instance to run the designer and another to debug the original
instance.

Regards,
Andy

Steve C. Orr [MVP, MCSD] wrote:
Quote:
When my custom control is dropped onto a web page at design time, I want an
associated HTTPHandler reference to be automatically added to the project's
web.config file if it's not already there.
I see some other controls do this, such as the ReportViewer control so I
know it is possible. But how is it done? Does anybody know?


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.