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
Sam HobbsPosted Jan 18, 2012, 5:33 AM
VulpesPosted Jan 18, 2012, 5:18 AM
Sam HobbsPosted Jan 18, 2012, 3:55 AM
Csharp NinjaPosted Jan 17, 2012, 5:01 PM
VulpesPosted Jan 17, 2012, 4:03 PM
Csharp NinjaPosted Jan 17, 2012, 3:02 PM
@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??
Datta KharadPosted Jan 17, 2012, 5:54 AM
//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/
AartiPosted Jan 17, 2012, 12:03 AM
Set IsChecked="True" property of checkbox.
<CheckBox Content="CheckBox" Height="16" HorizontalAlignment="Left" Margin="118,117,0,0" Name="checkBox1" VerticalAlignment="Top" IsChecked="True" />Csharp NinjaPosted Jan 16, 2012, 5:18 PM