VB.NET webbrowser コントローラーはテキストボックスに値を設定できません
<input name="ctl00$ContentPlaceHolder1$txtUsername" type="text" id="ctl00_ContentPlaceHolder1_txtUsername" style="width:95%;" class="TextBoxWatermark" autocomplete="off">
詳しくは
var Page_Validators = new Array(document.getElementById("ctl00_ContentPlaceHolder1_RequiredFieldValidator1"), document.getElementById("ctl00_ContentPlaceHolder1_RequiredFieldValidator2"));
詳しくは
document.getElementById('ctl00_ContentPlaceHolder1_RequiredFieldValidator1').dispose = function() {
Array.remove(Page_Validators, document.getElementById('ctl00_ContentPlaceHolder1_RequiredFieldValidator1'));
}
詳しくは
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.TextBoxWatermarkBehavior, {"ClientStateFieldID":"ctl00_ContentPlaceHolder1_txtUsernameWatermarkExtender_ClientState","WatermarkCssClass":"TextBoxWatermark","WatermarkText":"ตัวอย่าง mj99u53xxxxxxxx","id":"ctl00_ContentPlaceHolder1_txtUsernameWatermarkExtender"}, null, null, $get("ctl00_ContentPlaceHolder1_txtUsername"));
});
もっと
document.getElementById('ctl00_ContentPlaceHolder1_RequiredFieldValidator2').dispose = function() {
Array.remove(Page_Validators, document.getElementById('ctl00_ContentPlaceHolder1_RequiredFieldValidator2'));
}
私はこのコードを試しました
webBrowser1.Document.All.GetElementsById("ctl00_ContentPlaceHolder1_txtUsername").SetAttribute("Value", "xxxxx");
それはうまくいかない