473,382 Members | 1,480 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Trigger ImageButton Click with a HttpWebRequest

Hello all

I have been experimenting with System.Net.HttpWebRequest.

No problems with "normal" GET's and POST's. I can pass form data and I
receive the result correctly, as if a user browsed the site.

My problem is, that I can't figure out, how to trigger the clickevent from a
serverside ImageButton. We use them in one of our apps and my testcases also
have to cover this.
It's quite clear that I can't simulate a mouseclick with a HttpWebRequest.
But even the mouseclick has to end in an HTTP-Request to transmit it to the
server.
There has to be a way to simulate this.

Has anyone ever done this? Has anyone any idea?

Thanx

Benjamin Schwitter
Nov 18 '05 #1
3 1257
Hi,

you are not the first one to ask that question :-).

check out this post on my blog :
Send data from non browser client (using HttpWebRequest) that can be
used by access web page controls.

http://weblogs.asp.net/ngur/archive/...11/129951.aspx

HTH

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2
Hi,

you are not the first one to ask that question :-).

check out this post on my blog :
Send data from non browser client (using HttpWebRequest) that can be
used by access web page controls.

http://weblogs.asp.net/ngur/archive/...11/129951.aspx

HTH

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3
Thanx for the reply! That will do the trick! We will consider this option.

Benjamin Schwitter
"Natty Gur" <na***@dao2com.com> wrote in message
news:uB*************@TK2MSFTNGP10.phx.gbl...
Hi,

you are not the first one to ask that question :-).

check out this post on my blog :
Send data from non browser client (using HttpWebRequest) that can be
used by access web page controls.

http://weblogs.asp.net/ngur/archive/...11/129951.aspx

HTH

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)58-888377
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: J McD | last post by:
Hi I have a DataGrid with an ImageButton column. When I click on an imagebutton I get a postback but it doesn't run the OnImgBtnClick method. I can actually comment out the line where I add this...
3
by: tshad | last post by:
I was trying to change my asp:button to asp:ImageButton, but got a message saying that ImageButton does not have an onClick function. How do I get the ImageButton call a function? Thanks, ...
1
by: Jonathan Wood | last post by:
I'm trying to convert some old HTML pages to ASP.NET. I'm experimenting with code that responds to a button click. But although the mouse turns into a hand pointer when it is over the button,...
2
by: Nathan Sokalski | last post by:
I have an ImageButton inside a Repeater control. However, the ImageButton does not trigger the Repeater's ItemCommand event. For the moment, I am nesting an Image control inside a LinkButton, which...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.