Hi,
I am trying to figure out how to redirect a page on an Image Button click, where the image button is in a Gridview:
<asp:TemplateField ShowHeader="true">
<ItemStyle />
<ItemTemplate>
<asp:ImageButton ID="imgBtnView" runat="server"
CommandArgument="<%# Container.DataItemIndex %>" CommandName="View"
ImageUrl="~/images/view.gif" ToolTip="View" />
</ItemTemplate>
</asp:TemplateField>
How would I assign the redirect to each row in the code behind. I was able to get the correct URL with
DotNetNuke.Common.Globals.NavigateURL(Me.TabId, "existing_tickets", "mid=" & CStr(ModuleId) & "&id=" & IDValue)
I tried adding the onClick attribute to the button, and then using Javascript window.location to redirect but it wont work
I defined the image button with:
Dim imageBtnEdit As ImageButton = CType(e.Row.Cells(7).Controls.Item(1), ImageButton)
Any help would be greatly appreciated.
Thanks,
Chris