May 14, 2005 #1 bclt Programmer Mar 13, 2005 363 GR Hi, how can i execute a javascript function when i press a button ? Notice that the button is System.Web.UI.WebControls.button, not an HTML button. Tnx!
Hi, how can i execute a javascript function when i press a button ? Notice that the button is System.Web.UI.WebControls.button, not an HTML button. Tnx!
May 15, 2005 #2 RTomes Programmer Apr 19, 2005 357 US Only way I know of is in the code behind file like this example: btnDelete.Attributes("OnClick")="return confirm('Are you sure your sure that your sure the you want to delete this?'); Upvote 0 Downvote
Only way I know of is in the code behind file like this example: btnDelete.Attributes("OnClick")="return confirm('Are you sure your sure that your sure the you want to delete this?');
May 15, 2005 #3 ca8msm Programmer May 9, 2002 11,327 GB Code: Button1.Attributes.Add("onclick", "alert('hello');") -------------------------------------------------------------------------------------------------------------------------------------------- Need help finding an answer? Try the search facility (http://www.tek-tips.com/search.cfm) or read FAQ222-2244 on how to get better results. Upvote 0 Downvote
Code: Button1.Attributes.Add("onclick", "alert('hello');") -------------------------------------------------------------------------------------------------------------------------------------------- Need help finding an answer? Try the search facility (http://www.tek-tips.com/search.cfm) or read FAQ222-2244 on how to get better results.
May 16, 2005 Thread starter #4 bclt Programmer Mar 13, 2005 363 GR I saw this before a couple of minutes. Tnx both! Upvote 0 Downvote