开发者

Asmx dynamic compilation

If I want to compile the source (cs) file of the web page, i simply use Src attribute instead of CodeBehind attribute in the Page directive, e.g.

<%@ Page Language="C#" AutoEventWireup="true" Src="XXX.aspx.cs" Inherits="Namespace.Path.To.XXX" %>

which works perfectly with a source file that has the BuildAction set to Content. Is it possib开发者_如何学JAVAle to do the similar thing for an asmx web service ? The WebService directive doesn't support the Src attribute and when I use CodeBehind it simply can't find the class..


I've figured out it's enough to simply leave out the CodeBehind attribute and put the source directly in the asmx file - it is then compiled dynamically.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜