views:

692

answers:

0

I hope someone can offer a little assistance with this.

I have a button which when clicked presents a javascript generated OK or Cancel. Once the user clicks on OK it fires a __DoPostBack clientside and targets an UpdatePanel which processes the postback asynchronously. I then use ScriptManager.RegisterStartupScript() and pass in a javascript (alert) to say "clicked OK". This works perfect from a normal web form, however when I put this code into a user control and drop that into a webpart zone on a webform (so to make a webpart) this doesnt work correctly. I have attached the code below:

EDIT: - OK, I couldnt get the source code highlighter to show the HTML so I have uploaded my sample to pastebin:

Default Page

UserControl Markup

UserControl Code

Or see my duplicate post at ASP.NET Forums

Hopefully someone can suggest something that I cant see - maybe it just wont work with webparts!?

Thanks in advance.

James.