バージョン

AutoSubmit プロパティ

コントロールがクリックされたときにフォームを自動的に送信します (サーバーにポストバックします)。
シンタックス
'宣言
 
Public Property AutoSubmit As Boolean
public bool AutoSubmit {get; set;}
使用例
' Example to trigger postback manually.
Me.WebImageButton1.AutoSubmit = False
Me.WebImageButton1.ClientSideEvents.Click = "clickButton1"

' Below are codes in aspx (or any other script file loaded to client)

<script language="javascript">

// function called before WebImageButton1 gets the click event
function clickButton1(oButton, oEvent)
{
	// Trigger postback only if button was clicked by mouse
	if(oEvent.action == "0")
		oEvent.needPostBack = true;
	// Next line would trigger post back on any click event (Space, Enter, AccessKey)
	//oEvent.needPostBack = true;
}
</script>
// Example to trigger postback manually.
this.WebImageButton1.AutoSubmit = false;
this.WebImageButton1.ClientSideEvents.Click = "clickButton1";

// Below are codes in aspx (or any other script file loaded to client)

<script language="javascript">

// function called before WebImageButton1 gets the click event
function clickButton1(oButton, oEvent)
{
	// Trigger postback only if button was clicked by mouse
	if(oEvent.action == "0")
		oEvent.needPostBack = true;
	// Next line would trigger post back on any click event (Space, Enter, AccessKey)
	//oEvent.needPostBack = true;
}
</script>
参照