hi Bruce
Thanks for the reply.
I tried the way you suggested.But still i'm getting the same error.
System.InvalidOperationException: The TargetControlID of
'ModalPopupExtender1' is not valid. A control with ID 'lnkOrigin' could not
be
found.
Here's the my code
<asp:GridView ID="gvLaneDetails" runat="server" AutoGenerateColumns="False"
Width="90%" AllowSorting=True BorderStyle="Solid" CellPadding="4"
ForeColor="#333333" GridLines="None" BorderColor="White" BorderWidth="1px" >
<Columns >
<asp:TemplateField>
<ItemTemplate>
<a href="javascript
penPopup('NewCity.aspx?LaneID=<%#
DataBinder.Eval(Container.DataItem, "LaneID") %> &Type=0')" id='lnkOrigin'
name='lnkOrigin'>Add New</a>
<div>
<asp
anel ID="Panel1" runat="server" CssClass="modalPopup"
Style="display: none" Width="233px">
<table style="width: 336px; font-family: Tahoma; height:9em"
border="1" bordercolor="black">
<tr style="background-color:#507CD1" >
<td align="center" colspan="3" style="font-size: 9pt;
border-top-style: none; border-right-style: none; border-left-style: none;
border-bottom-style: none; color: white; ">
Enter a City</td>
</tr>
<tr>
<td align="center" colspan="3" style="border-top-style:
none; border-right-style: none; border-left-style: none; border-bottom-style:
none">
<input id="txtCity" type="text" style="width: 236px"
/><br />
<input id="chkAllCities" type="checkbox" /><label
id="lblAll" style="font-family:Tahoma; font-size:small">Apply to all cities
with same error</label></td>
</tr>
<tr>
<td align="center" colspan="3" style="border-top-style:
none; border-right-style: none; border-left-style: none; border-bottom-style:
none" >
<input id="btnAdd" type="button" value="Add"
onclick="win();" style="width: 75px" />
<asp:Button ID="Button1" runat=server />
</td>
</tr>
</table>
<div align="center">
<asp:Button ID="OkButton" runat="server" Text="OK" />
<asp:Button ID="CancelButton" runat="server" Text="Cancel" />
</div>
</asp
anel>
<br />
<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server"
TargetControlID="lnkOrigin"
PopupControlID="Panel1"
BackgroundCssClass="modalBackground"
DropShadow="true"
CancelControlID="CancelButton" />
</div>
</ItemTemplate>
<ItemStyle Width="50px" BorderStyle="None" />
<HeaderStyle BorderColor="White" BorderStyle="None" />
</asp:TemplateField>
</Columns>
<AlternatingRowStyle BackColor="White" BorderStyle="Solid"
Wrap="True" BorderColor="White" BorderWidth="1px" />
<HeaderStyle BackColor="#507CD1" BorderColor="White"
BorderStyle="Solid" BorderWidth="2px" Height=10px Font-Bold="True"
ForeColor="White" HorizontalAlign="Center" />
<RowStyle height="10px" BackColor="#EFF3FB" BorderColor="White"
BorderStyle="Solid" BorderWidth="1px" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True"
ForeColor="#333333" />
<FooterStyle BackColor="#507CD1" Font-Bold="True"
ForeColor="White" />
<EditRowStyle BackColor="#2461BF" />
<PagerStyle BackColor="#2461BF" ForeColor="White"
HorizontalAlign="Center" />
</asp:GridView>
Thanks
Srinivas
: