Advertisement
Guest User

Example

a guest
Feb 4th, 2013
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script language="javascript">
  2. function confirm_logout()
  3. {
  4. if (confirm("Are you sure you want to logout?")==true)
  5. return true;
  6. else
  7. return false;
  8. }
  9. </script>
  10.  
  11. Then, in the Code behind, Page_Load, add
  12.  
  13. btnl_logout.Attributes.Add("onclick", "return confirm_logout();")
  14.  
  15. Then, for the LinkButton Click event,
  16.  
  17. Private  Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs)
  18.    Response.Redirect("http://hk.yahoo.com")
  19. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement