In master.aspx, create HyperLinkColumn
<Columns>
<asp:HyperLinkColumn
DataNavigateUrlField="id"
DataNavigateUrlFormatString="dg_detail1.aspx?id={0}"
Text="Get Details"
/>
</Columns>
in dg_detail1.aspx, in page_load(), use Request.QueryString["id"] to get id's value, save to session. Or you don't have to save it in session just try to pass the parameter "id" to each detail pages using "Get" method, such as <a href=dg_detail2.aspx?id=<%=Request.QueryString["id"]%> >next </a>(not sure if it's the correct expression)
<Columns>
<asp:HyperLinkColumn
DataNavigateUrlField="id"
DataNavigateUrlFormatString="dg_detail1.aspx?id={0}"
Text="Get Details"
/>
</Columns>
in dg_detail1.aspx, in page_load(), use Request.QueryString["id"] to get id's value, save to session. Or you don't have to save it in session just try to pass the parameter "id" to each detail pages using "Get" method, such as <a href=dg_detail2.aspx?id=<%=Request.QueryString["id"]%> >next </a>(not sure if it's the correct expression)