This is absolutely impossible, but you actually don't need it. You can fire some events only in the class or structure where this event is declared, not even in derived class. This is one of important fool-proof features of events as opposed to "regular" delegate instances. For more information, please see my past answer:
Since we have multicast delegates, why do we need events?[
^].
In real life, there are no situations where you need to fire an event from outside the declaring type, and this is why .NET events are designed the way they are designed. In fact, you merely need to call some method which would do exactly the same as some event handler of your
Click
event. Here is the very general recipe: create a separate method with required parameters and call it from two or more different places in you code: one from the event handler (and this is all the code of your event handler should do) and elsewhere, where you wanted to "simulate the click". That's is. Simple, isn't it?
[EDIT]
[EDIT2]
By mistake, I though that the comment by Swetha Garlapati (see below) was from OP, so I tried to reply in this wrong assumption. Therefore, the next paragraph is "scratched out". However, the portion of the text below illustrates how this problems looks in JavaScipt..[END EDIT2]
You should have explained that you are talking about HTML and JavaScript. You question is tagged as "C#".
OK, JavaScript has much less limitations, but the idea is the same:
<html>
<head>
<title>...</title>
<script type="text/javascript"><!--
function clickHandler() {
window.location.href="http://www.codeproject.com";
}
--></script>
</head>
<body>
<input type=button onclick="clickHandler()" value="Click here">
</body>
</html>
—SA