UpdatePanelでResponse.WriteするとSys.WebForms.PageRequestManagerParserErrorException

プログラミング
スポンサーリンク

UpdatePanel で Response.Write するとエラーになって実行できないんです。

( Sys.WebForms.PageRequestManagerParserErrorException)

 

 

ちょっと理由を調べてみました。

スポンサーリンク

UpdatePanel で Response.Write するとSys.WebForms.PageRequestManagerParserErrorException

 

この現象は、ここに答えが書いてありました。

 

Response.Write and UpdatePanel
I generate a vcard that I send to the client using the following code snippet:Response.AddHeader("Content-Disposition", string.Format("attachment; filename={0}"...

You can't use Response.Write during an asynchronous postback. Whatever control executes that code needs to be added as a PostBackTrigger in the update panel:

 

非同期ポストバック(asynchronous postback) の途中で

Response.Write

を使うことは出来ません。

 

もし、このようなことをしたいなら、

PostBackTrigger

を追加する必要があります。

 

 

 

これ追加すると、確かにエラーはなくなりました!

 

 

プログラミングの無料レッスン体験

 

約8,000名の受講生と80社以上の導入実績のあるプログラミングやWebデザインのオンラインマンツーマンレッスンCodecamp

<Codecampの特徴>

1 現役エンジニアによる指導

2オンラインでのマンツーマン形式の講義

3大手企業にも導入されている実践的なカリキュラム

↓無料体験レッスン実施中です。

プログラミングのオンラインスクールCodeCamp

 

 

 

コメント

タイトルとURLをコピーしました