Re: AJAX error with GridView

Tech-Archive recommends: Fix windows errors by optimizing your registry



the popup extender must be declared in the row/col template, so instead of a link column, put a link and the extender in the row/column template.

-- bruce (sqlwork.com)

srinivas wrote:
Hi All,
I'm having a grid view(GridView1) with a hyperlink column.It's ID is Link1
I want to show a popup on hyperlink click.
I'm using ajaxToolkit:ModalPopupExtender for that.
But when i'm using TargetControlID="Link1" for ajaxToolkit:ModalPopupExtender
I'm getting an error

System.InvalidOperationException: The TargetControlID of 'ModalPopupExtender1' is not valid. A control with ID 'Link1' could not be found.

My ajaxToolkit syntax is

<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="GridView1"
PopupControlID="Panel1"
BackgroundCssClass="modalBackground"
DropShadow="true"
CancelControlID="CancelButton" />

Thanks in advance



.


Quantcast