PowerTools InputMan for ASP.NET 8.0J
InvalidInput イベント (BaseEditControl)
使用例 

[ASP.NET AJAX専用]無効な文字が入力されたときに発生します。
構文
Public Event InvalidInput As EventHandler
public event EventHandler InvalidInput
解説
このメンバは、コントロールがASP.NET AJAXのUpdatePanelコントロールに配置されているときのみ有効です。
InvalidInputイベントは、コントロールに入力が許可されていない文字をキーボードから入力、またはクリップボードからコピーしたときに発生します。

ASP.NET AJAXでの注意点については「ASP.NET AJAXの使用」を参照してください。
使用例
次のサンプルコードは、InvalidInputイベントの使用方法を示します。
※テキストコントロールおよびメッセージボックスコントロールがUpdatePanelコントロール上に配置されていることを前提としています。
Imports GrapeCity.Web.Input.Core

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    GcTextBox1.Format = "J"
    GcTextBox1.AutoConvert = False
End Sub

Protected Sub GcTextBox1_InvalidInput(ByVal sender As Object, ByVal e As System.EventArgs)
    GcGcMessageBox1.Show("ひらがな以外の入力はできません。", DialogType.Alert)
End Sub
using GrapeCity.Web.Input.Core;

protected void Page_Load(object sender, EventArgs e)
{
    GcTextBox1.Format = "J";
    GcTextBox1.AutoConvert = false;
}

private void GcTextBox1_InvalidInput(object sender, System.EventArgs e)
{
    GcGcMessageBox1.Show("ひらがな以外の入力はできません。", DialogType.Alert);
}
参照

BaseEditControl クラス
BaseEditControl メンバ

 

 


© 2005-2015 GrapeCity inc. All rights reserved.