run button click from load

Q:how to fire button click event on page load in asp.net automatically

A: you can directly call your webpage onload event like this.

<!–

<body onload=”document.getElementById(‘fit’).click();”>
<form id=”form1″ runat=”server”>

 <button id=’rotate_left’ type=’button’ title=’Rotate left’> &lt; </button>
<button id=’zoom_out’ type=’button’ title=’Zoom out’> – </button>
<button id=’fit’ type=’button’ title=’Fit image’> [ ] </button>
<button id=’zoom_in’ type=’button’ title=’Zoom in’> + </button>
<button id=’rotate_right’ type=’button’ title=’Rotate right’> &gt; </button>

</div></div>–>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: