boatdrinks
IS-IT--Management
I am using this code to close the browser window when button2 is clicked, but it only works after I click the button twice. I have tried putting it in the Page_Load, and in the If(Not Ispostback) and If(Ispostback). I have also tried putting it in the Sub button2_click, which runs a few other things and still the same problem.
Button2.Attributes.Add("onClick", "javascript:self.close();")
Button2.Attributes.Add("onClick", "javascript:self.close();")