- C#
- A WebBrowser Control
I'm trying to fill a text field with a variable (The variable works fine, everything checks out, but the text will not go into the field's value)
This is the html of the text field
[HTML]<div id="couponFormElement">
<div class="instructions">If you wish to apply a coupon code to your account, enter the coupon code in the field below, then click <strong>Apply</strong>.</div>
<div id="couponCode">
<input tabindex="21" type="text" name="coupon" value="" />
</div>[/HTML]
I've tried all three of these:
Expand|Select|Wrap|Line Numbers
- this.webBrowser1.Document.GetElementById("couponCode").SetAttribute("value", coupon);
- this.webBrowser1.Document.GetElementById("coupon").SetAttribute("value", coupon);
- this.webBrowser1.Document.GetElementById("couponFormElement").SetAttribute("value", coupon);
https://rhapreg.real.com/rhapsody_ac...eal&page=login
If you could please give me some help, I've been scouring the internet for hours and tried everything i could find. Finally I got he nerve to join and post here.
Thanks ahead of time