Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Adding Class .cs Files to Inline ASPX Site?

Reply
Thread Tools

Adding Class .cs Files to Inline ASPX Site?

 
 
lucius
Guest
Posts: n/a
 
      07-18-2007

I am working with a site that uses inline code in .aspx files and C#
code in the header area. I would like to add some HTTPModules and
HttpHandlers but am not sure where to put the .cs files and how to
reference them in the web.config - can anyone show a sample?

Thanks.
 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      07-18-2007
Hi Lucius,

As for ASP.NET 2.0 website application, you can create a custom httphander
or httpModule in App_Code folder and use them in your application direclty.
What you need to do is the same a define a custom handler/module in an
external assembly. e.g.

Suppose you've created a "SimpleHandler" custom httphandler class in
App_code folder, you can reference it in webconfig as below:

=============
<httpHandlers>
<add verb="*" type="SimpleHandler, App_Code"
path="simplehandler.aspx"/>
............
=======================

Also, do not forget to add the extension mapping to aspnet_isapi.dll if the
extension is not originally mapped to ASP.NET runtime engine.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      07-20-2007
Hi Lucius,

Does the suggestion helps you? If you have any further questions on this,
please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tool which expands implicitly inline inline functions tthunder@gmx.de C++ 3 06-16-2005 12:54 AM
adding main.aspx.vb & main.aspx.resx under aspx John M ASP .Net 1 05-29-2005 09:27 PM
To inline or not to inline? Alvin C++ 7 05-06-2005 03:04 PM
testing for existence of an inline file with Inline::Files Sven Wolf Perl Misc 7 12-03-2004 10:17 PM
inline or not to inline in C++ Abhi C++ 2 07-03-2003 12:07 AM



Advertisments