FORMが次のようなColdFusionWebページからPOSTされるASP.NetHTTPHandlerがあります。
<form name="sendToHandler" action="http://johnxp/FileServiceDemo2005/UploadHandler.ashx" method="post">
<input type="hidden" name="b64fileName" value="fileservice.asmx.xml" />
<input type="hidden" name="strDocument" value="Document" />
<input type="submit" name="submitbtn" value="Submit" />
この.Netハンドラーが文字列をPOSTINGColdFusionページに返すための最良の方法は何ですか?
編集更新2009年8月14日:
.ashxファイルで思いついた解決策は、ハンドラーをPOSTした.cfmファイルのURLを保存し、ColdFusionに通信する結果文字列をクエリ文字列に追加することです。私のCFの同僚は、このクエリ文字列データの有無を使用して、それに応じて.cfmWebページをフォーマットします。
public void ProcessRequest(HttpContext context)
{
string returnURL = context.Request.ServerVariables["HTTP_REFERER"]; // posting CFM page
string message = UploadFile(context); // handles all the work of uploading a file
StringBuilder msgReturn = new StringBuilder(returnURL);
msgReturn.Append("?n=");
msgReturn.Append(HttpUtility.UrlEncode(TRIMrecNumAssigned));
msgReturn.Append("&m="); // this is just a msg with performance data about the upload operation (elapsed time, size of file, etc.)
msgReturn.Append(HttpUtility.UrlEncode(message));
context.Response.Redirect(msgReturn.ToString());
}