Author: Dasa | Posted on: 7/16/2009 3:51:20 AM | Views : 357

 Hi,
I'd like to perform some task (add data to db) on click on image and then open new window. But I don't know how to mix server script and javascript
Thanks for any help
<asp:ImageButton runat="server" ImageUrl="img.jpg" OnClick="Image_Click" /> <script runat="server"> Sub Image_Click(ByVal Src As Object, ByVal Args As ImageClickEventArgs) ' here is some code - eg add data to db ' and then I need to open new window, window.open("myrul"); ' this code doesn't work 'Response.Write("<script language='javascript'> window.open('myurl,'_blank') ; <script>") End Sub </script>
 
...

Go to the complete details ...