2009-02-27 8 views
0

私はページングを使用しているグリッドビューを持っています。現在のページをasp:ハイパーリンクで渡したいので、レコードの詳細を確認したら、現在のページに戻すことができます。これは可能ですか?それがどうすればいいのですか?GridViewのHyperLinkFieldでページ番号を渡すにはどうすればよいですか?

<asp:GridView ID="grdObitList" runat="server" allowpaging="true" 
      PageSize="10" AutoGenerateColumns="false" CssClass="grdClass" 
       BorderStyle="None" GridLines="None" CellSpacing="2" > 
      <PagerStyle HorizontalAlign="Center" /> 
      <PagerSettings Position="Bottom" FirstPageText="First" LastPageText="Last" Mode="NumericFirstLast" /> 
       <Columns>  
        <asp:HyperLinkField HeaderText="Name" DataTextField="obit_fullname" DataNavigateUrlFields="obit_id" DataNavigateUrlFormatString="obitDisplay.aspx?oid={0}" />          
        <asp:BoundField ReadOnly="true" HeaderText="Date" DataField="obit_dod" DataFormatString="{0:d/M/yyyy}" /> 
        <asp:BoundField ReadOnly="true" HeaderText="Resident Of" DataField="obit_resident" /> 
        <asp:BoundField ReadOnly="true" HeaderText="Funeral Home" DataField="obit_funeralhome" /> 
       </Columns> 

答えて

1

一つの方法は、それがテンプレート列に変換されて、あなたがそれ(<%番号)

に到達するために、通常のデータバインドのsyntaxtを使用することができ、そのように行うには
関連する問題