Home > Net >  Ashx how to compile DLL
Ashx how to compile DLL

Time:01-04


Try to search an article come with this, although the final code didn't complain, but I don't carry out the business logic of the page,
"Ashx compiled into a DLL file code solution" article address: https://blog.csdn.net/luby/article/details/7329734

Original NEWS. ASHX code is as follows:
 
<% % @ WebHandler Language="c #" & gt;
Using System;
Using System. The Data;
Using System. Web. SessionState;

Public class NewsListHandler: BaseHandler
{
//here is my logic,
}



After transforming
 
<% @ WebHandler Language="c #" CodeBehind="NewsListHandler. Cs" % & gt;
Using System. Web. SessionState;

Public partial class NewsListHandler: BaseHandler
{
//logic judgment here all move to NewsListHandler. The cs inside
}


NewsListHandler. Cs code intact copy NEWS. ASHX original code

 
Using System;
Using System. The Data;
Using System. Web. SessionState;


Public partial class NewsListHandler
{
}


My question is: according to the article, the use of partial splicing, although the process is not an error, but I had NEWS. ASHX logic judgment does not perform, excuse me I wrong in what place?
Thank you,

CodePudding user response:

After transforming the original line, NewsListHandler. The class does not inherit your BaseHandler in cs
  • Related