onClick
is work on server side.
OnClientClick
will work on client side, after rendering the page,
OnClientClick
is a equivalent method for client side
onclick
event. As you know normally, client side events occur before the server side events. So that the "
OnClientClick
" event occurs before the
OnClick
event.
Regarding your requirement, you have to change your code. Basically you have to remove the "
OnClientClick
" attribute. And then after the postback (when the
OnClick
" event occurs you have to register the following script.
javascript:window.open('Default6.aspx','List','scrollbars=no,resizable=no,width=420,height=330');
Please check the following link for more detail
http://msdn.microsoft.com/en-us/library/ms178207(v=vs.80).aspx[
^]
basically you should look
RegisterClientScriptBlock
and
RegisterStartupScript
Please try, if you are still having issue, please let me know I'll provide the sample.
if you want to open this without window.open you have to use the DIV popup. following link will help you
http://lokeshdhakar.com/projects/lightbox2/[
^]
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ModalPopup/ModalPopup.aspx[
^]
http://proudmonkeycontrols.codeplex.com/documentation[
^]
See this also
http://forums.asp.net/p/1382753/2938303.aspx#2938303[
^]