开发者

Modalpopup not working properly asp.net ajax

I have an updatepanel,a modal popup extender inside that and an image button to open the pop up(it has not any click event). The 'div' for the modal pop up is outside the updatepanel. In the modal pop u开发者_StackOverflowp the records come in a table with a link in each table row.When the link is clicked,a javascript function causes a hidden control to postback and fetch values from database.First time it is working fine,but next time the image button(TargetControlID for modal pop up extender) does not work and it is causing a postback and loading the page.Help plz... Thanks in advance. Mohak


Are you using myLink.ClientID or did you hardcoded the ID of the link in the Javascript function?

The ID of the link is probably changed when doing the first postback, the second time ASP.NET has generated a new ID (not visible in the HTML because of the AJAX-request) for your link and this doesn't match anymore with the ID in your Javascript function.

The solution would be to use myLink.ClientID

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜