これはできますか?そしてどうやって?
私は成功せずに次のことを試しました:
Method1 using
BuildManager.CreateInstanceFromVirtualPath
- 公開後に機能しません。(厳密な名前のアセンブリの事前コンパイルを使用しているため、失敗すると思いますが、わかりません)。次のコードを使用したMethod2 :
Page page = new SchedulerTest(); // An ASPX Page class (note: CodeBehind) page.AppRelativeVirtualPath = context.Request.AppRelativeCurrentExecutionFilePath; page.ProcessRequest(context);
ここにあるように-実行時にページクラス名がわからないため、機能しません。