Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 11th, 2007, 04:59 AM
Registered User
Join Date: Apr 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default in browsers (such as IE) how can emulate a button

hi ...

in browsers (such as IE) how can emulate a button click event ?

for example
suppose a dictionary webpage :
i want to make an application that automatically textBox control and the click the "translate" button.

tanks a lot

Old April 11th, 2007, 08:41 AM
planoie's Avatar
Friend of Wrox
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

There is no emulation needed. Simply create a button on your page, and give it a onclick event handler. If you need help with asp.net basics, try google for some beginner tutorials.

Old August 6th, 2007, 05:41 PM
Registered User
Join Date: Aug 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

the moderator completely missed the point here:
this guy is talking about (for want of a better expresion)
hi-jacking the browser to emulate mouse clicks and text entry
in order to simulate a user - using the webpage.

First you must use .net 2.0 - the classes are there for 1.1 but it does not seem to work.
Second I cannot say this will work in 7.0 upwards of IE. untested.

Third use namespace System.Diagnostics and Threading for:


the sleep just makes sure things are not moving too fast.
let me know if youneed more help.
Craig Kelly-Soens

Old August 6th, 2007, 05:50 PM
Wrox Author
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons

Why did you ressuerect a post that was 4 Months old? In any event, the OP was not very clear in what they wanted (a more forward thing to say would of been: How do i create a bot to simulate a button click against X website) and emulation can mean different things to different people. In any event, se la vi.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET

Professional IIS 7 and ASP.NET Integrated Programming

================================================== =========

Similar Threads
Thread Thread Starter Forum Replies Last Post
in browsers (such as IE) how can emulate a button abdollahzadeh.b ASP.NET 2.0 Professional 0 April 11th, 2007 05:02 AM
Emulate autopostback from asp to jsp firephoenix Javascript 0 April 9th, 2007 04:51 AM
DataGrid's Events & Browsers Back Button Mr.PankajKhare General .NET 0 March 16th, 2007 04:09 AM
xslt 2.0 in browsers ramarc XSLT 1 April 26th, 2006 11:14 AM
Emulate Access AfterUpdate Event Kenny Alligood VB Databases Basics 1 July 7th, 2004 11:16 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.