Hi friends. I am a newbie about C# programming language. I want to make a Profile bot for xoops based sites. I've learned auto fill the textbox and autoclick the buttons in C# today.. But I don't know how to auto tick ...
This checkbox has no "id" in pagesource.
Help me please. Thanks
Loading

Csharp Ninja96 reputationPosted Jan 16, 2012, 12:18 PM EST
AartiRank #2,383 · 594 reputationPosted Jan 16, 2012, 7:03 PM EST
Set IsChecked="True" property of checkbox.
<CheckBox Content="CheckBox" Height="16" HorizontalAlignment="Left" Margin="118,117,0,0" Name="checkBox1" VerticalAlignment="Top" IsChecked="True" />Datta KharadRank #2,135 · 668 reputationPosted Jan 17, 2012, 12:54 AM EST
//Write javascript method
function checkAll(field)
{
for (i = 0; i < field.length; i++)
field[i].checked = true ;
}
I don't know where(which event) you want to check agree checkbox checked, anyway i am doing on button event.
onClick="checkAll(document.myform.agree_disc)">
//More detail see below link:-
http://www.developerfusion.com/code/2065/automatically-checkuncheck-multiple-checkboxes/
Csharp Ninja96 reputationPosted Jan 17, 2012, 10:02 AM EST
@Aarti thanks but I can't understand you.. I can't it.. Look my code is:
"namespace WindowsFormsApplication13
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
webBrowser1.Navigate("http://www.1928bcp.com/register.php");
}
private void button1_Click_1(object sender, EventArgs e)
{
SendData();
}
private void SendData()
{
webBrowser1.Document.GetElementById("uname").SetAttribute("value", textBox1.Text);
webBrowser1.Document.GetElementById("email").SetAttribute("value", textBox2.Text);
webBrowser1.Document.GetElementById("pass").SetAttribute("value", textBox3.Text);
webBrowser1.Document.GetElementById("vpass").SetAttribute("value", textBox3.Text);
}
"
I want to auto tick the checkbox when I click button1 ..... what code should I add in this form and where to add??
VulpesRank #55 · 29.2K reputationPosted Jan 17, 2012, 11:03 AM EST
Csharp Ninja96 reputationPosted Jan 17, 2012, 12:01 PM EST
Sam HobbsRank #107 · 20.5K reputationPosted Jan 17, 2012, 10:55 PM EST
VulpesRank #55 · 29.2K reputationPosted Jan 18, 2012, 12:18 AM EST
Sam HobbsRank #107 · 20.5K reputationPosted Jan 18, 2012, 12:33 AM EST