Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Emulating a button click event


Message #1 by "Mats Boberg" <Mats.Boberg@n...> on Tue, 23 Oct 2001 13:44:17 +0200
Hi,



I'm coding a framework for testing aspx pages. It's a simple program

that checks that:

 - The requested page is the same as the received.

 - If an exception occurred creating the response html.

 - If the requested page contains an errorLabel.



Some pages contain events with code behind functionality e.g. a button

click event.

I want to simulate the button click. Does anybody know how to do that?



I use the HttpWebRequest class to call the pages to test.



HttpWebRequest webReq =3D (HttpWebRequest )WebRequest.Create(url);

HttpWebResponse webResp =3D (HttpWebResponse )webReq.GetResponse();


  Return to Index