IEditableTextControl.TextChanged Kejadian
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Terjadi ketika konten teks berubah antara posting ke server.
public:
event EventHandler ^ TextChanged;
event EventHandler TextChanged;
member this.TextChanged : EventHandler
Event TextChanged As EventHandler
Contoh kode berikut menunjukkan implementasi TextChanged peristiwa.
public partial class customeditablebox : System.Web.UI.UserControl, IEditableTextControl
{
private static readonly object EventCustomTextChanged = new Object();
public event EventHandler TextChanged
{
add
{
Events.AddHandler(EventCustomTextChanged, value);
}
remove
{
Events.RemoveHandler(EventCustomTextChanged, value);
}
}
public string Text
{
get
{
// Provide implementation.
return String.Empty;
}
set
{
// Provide implementation.
}
}
}
Public Class customeditablebox
Inherits System.Web.UI.UserControl
Implements System.Web.UI.IEditableTextControl
Private Shared ReadOnly EventCustomTextChanged As New Object
Public Custom Event TextChanged As EventHandler _
Implements System.Web.UI.IEditableTextControl.TextChanged
AddHandler(ByVal value As EventHandler)
Events.AddHandler(EventCustomTextChanged, value)
End AddHandler
RemoveHandler(ByVal value As EventHandler)
Events.RemoveHandler(EventCustomTextChanged, value)
End RemoveHandler
RaiseEvent(ByVal sender As Object, ByVal e As EventArgs)
End RaiseEvent
End Event
Public Property Text() As String _
Implements System.Web.UI.IEditableTextControl.Text
Get
' Provide implementation.
Return String.Empty
End Get
Set(ByVal value As String)
' Provide implementation.
End Set
End Property
End Class
Peristiwa TextChanged terjadi ketika Text properti berubah antara posting ke server. Implementasi peristiwa ini dapat ditemukan baik di TextBox atau ListControl kontrol.
Produk | Versi |
---|---|
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Umpan balik .NET
.NET adalah proyek sumber terbuka. Pilih tautan untuk memberikan umpan balik: