ValidationHtmlAttributeProvider.AddAndTrackValidationAttributes Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
İstemci doğrulaması etkinse ve geçerli <formda> bunun expression
için doğrulama öznitelikleri attributes
henüz eklenmediyse, öğesine doğrulamayla ilgili HTML öznitelikleri ekler.
public:
virtual void AddAndTrackValidationAttributes(Microsoft::AspNetCore::Mvc::Rendering::ViewContext ^ viewContext, Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExplorer ^ modelExplorer, System::String ^ expression, System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ attributes);
public virtual void AddAndTrackValidationAttributes (Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, System.Collections.Generic.IDictionary<string,string> attributes);
abstract member AddAndTrackValidationAttributes : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string * System.Collections.Generic.IDictionary<string, string> -> unit
override this.AddAndTrackValidationAttributes : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string * System.Collections.Generic.IDictionary<string, string> -> unit
Public Overridable Sub AddAndTrackValidationAttributes (viewContext As ViewContext, modelExplorer As ModelExplorer, expression As String, attributes As IDictionary(Of String, String))
Parametreler
- viewContext
- ViewContext
ViewContext Geçerli kapsam için bir örnek.
- modelExplorer
- ModelExplorer
ModelExplorer için.expression
- expression
- String
geçerli modele göre ifade adı.
- attributes
- IDictionary<String,String>
Dictionary<TKey,TValue> doğrulama özniteliklerini almak için. Doğrulama özniteliği adlarını değerleriyle String eşler. Değerler bir HTML belgesine veya yanıtına yazılmadan önce HTML kodlanmış olmalıdır.
Açıklamalar
expression
Yinelenen doğrulama öznitelikleri oluşturmaktan kaçınmak için geçerli FormContext içindeki öğesini izler. Başka bir ifadeyle, doğrulama öznitelikleri yalnızca formda> bu ada <sahip bir alan için önceki bir çağrı eklenmediyse eklenir.
Şunlara uygulanır
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin