アプリケーションを実行すると、Visual Studio上で動作しますが、サーバー上で、私は私が使用されるボタンについて(System.Web.UI.WebControls.Button)は、コントロールの種類(System.Web.UI.HtmlControls.HtmlButton)と互換性がありません
The base class includes the field 'hiddenButton', but its type(System.Web.UI.WebControls.Button) is not compatible with the type of control (System.Web.UI.HtmlControls.HtmlButton).
のエラーが表示されます。
<button id="hiddenButton" runat="server" onserverclick="btnClick_Click" style="display:none;" ></button>
C#コードは次のとおりです。
protected void btnClick_Click(object sender, EventArgs e)
{
DownloadAsPDF();
}
public void DownloadAsPDF()
{
あなたのご質問はありますか?エラーはかなりまっすぐ進むようです。 – sous2817
これを見てくださいhttps://stackoverflow.com/questions/19502307/asp-net-error-type-is-not-compatible-with-the-ype-of-control – LiverpoolOwen
@ sous 2817これはVisual Studioで動作しますサーバー上では実行されません。 – Naive