0

I have an ordinary form with a post URL and runat server. Inside this form I have ordinary HTML fields but also a few ASP controls These ASP Controls are for a captcha I made, however when I press my captcha submit button then it submits the whole form rather than just the onClick code-behind event. I've tried using LinkButtons and so on rather than ordinary buttons to avoid it confusing the form but it still isn't working.

内部にあるフォームを投稿せずに、ポストバックとすべてで onClick イベントを作成する方法はありますか?

4

1 に答える 1

0

それが ASP.NET のしくみです。コード ビハインド イベント ハンドラーはサーバー上で実行されるため、それを処理するには送信、ポストバック、再レンダリングの完全なサイクルが必要です。

UpdateControl を使用して、AJAX スタイルの部分的なページ更新を行うことができます。送信、ポストバック、再レンダリングのサイクル全体は引き続き実行されますが、ページの一部のみが更新されることに注意してください。

于 2013-11-14T14:14:47.890 に答える