tariqanis
asked on
Is there a way to perform Click even with code in ASP.net
Hi,
In Visual Basic I can perform the Click event with code using some thing like this:
Button1.PerformClick()
I tried doing the same in ASP.Net Code-behind page but found that it was not supported, does any one know of a way around this?
Thanks
In Visual Basic I can perform the Click event with code using some thing like this:
Button1.PerformClick()
I tried doing the same in ASP.Net Code-behind page but found that it was not supported, does any one know of a way around this?
Thanks
The key things here are the signature of the method and the handles clause.
If you're using visual studio 2005 you can just double click the button in design view and it will generate the click method for you...
If you're using visual studio 2005 you can just double click the button in design view and it will generate the click method for you...
ASKER
Hi TShortland:,
I guess I didn't make myself clear. What I needed was this:
Click on button1 where is code to raise a click event for button2
In other words: instead of asking the user to click on button2 to perform a certain action, I use code to tell button2 to perform the required action.
Sorry if my question was not expressed clearly.
Thanks
I guess I didn't make myself clear. What I needed was this:
Click on button1 where is code to raise a click event for button2
In other words: instead of asking the user to click on button2 to perform a certain action, I use code to tell button2 to perform the required action.
Sorry if my question was not expressed clearly.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot
Response.Write("Hello World!")
End Sub