간단한 방법이 있었는데.. 이것을 못 찾고 있었다.ㅡㅡ;;

출처: http://stackoverflow.com/questions/17311757/on-clicking-the-hyperlink-inside-gridview-it-should-redirect-to-a-page-and-and

<asp:HyperLink ID="hlView" runat="server" Text="View" NavigateUrl='<%# "~/pageredirect.aspx?id=" + Eval("Id") %>'></asp:HyperLink>

 

변형

<Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink_Edit" runat="server" NavigateUrl='<%# "./CustomerTemplateDetail.aspx?code=" + Eval("NO") %>' Text="Edit"></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>

</Columns>



Posted by 노을지기