Hi. How Can I Open Jquery Dialog with and image button that putted in Gridview Template Field?
<asp:TemplateField HeaderText="افزودن">
<ItemTemplate>
<asp:ImageButton ID="add" runat="server" CausesValidation="false" CommandName="adddetail"
ImageUrl="~/Tadarokat/Images/add.png" Text="افزوردن" CommandArgument='<%# eval("mprid") %>' />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
</asp:TemplateField>
my jquery function is :
<script type="text/javascript">
// increase the default animation speed to exaggerate the effect
$.fx.speeds._default = 1000;
$(function test() {
$('#Div2').dialog({
autoOpen: false,
show: 'slide',
hide: 'clip',
width: 'auto',
height: 'auto'
,
modal: true,
resizable: false
});
$('#opener').click(function test() {
$('#Div2').dialog('open');
return false;
});
});
</script>
opener is an html button. i want to use my asp.net image button instead opener. Does My question Clear?