开发者

ASP.NET update Panel losses dyamically added controls on ImageButton Click event

greeting programs,

Im working on app that queries another website, and pulls back an xml, I then populate a result panel with ImageButton(s), and time in a click event, when the image is click I want to popup a div box using the jquery ui, that will show more information, about the picture clicked on. however whenever id this this seems to wipe out my results panel(Panel Control) and the div box never appears and as far as I can tell the imagebutton click event never fires. I've tried doing this two ways one with an update panel and again without, I would appreciate any help on this.Im wonder开发者_开发技巧ing if I'm doing to much long on my search button click, Im wonder if I should just let the post pack handle populating the result panel and ditch the update panel.

(and yes my div tag is set to runat server)

I'm also up for suggestions maybe there is a better way to do this, I thought creating hidden div tags for each item, and then running javascript for when the image is clicked and showing it that way, However that seems stupid, in my opinion it seems to make more sense to make my div control once and then update the labels inside it on each image click and then show or hide it.


Without looking at your code if I had to guess I would say that a post back occurs and wipes out all of your data since that doesn't match whatever viewstate may think things should have. If you're using jQuery and jQuery UI on the page already I would suggest you also do your "more information popup" with jquery.

If you already have the information on the page and you're just trying to show it to the user why bother using an imagebutton's onclick function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜