CodeToday.NET » Microsoft .NET Developer Forum » ASP.NET & Expression Web » ถามเรื่อง GridView ใน ASP.NET หน่อยครับ
เราจะเอาค่าจาก Gridview โดยการใช้การ LinkButton
โดยเมื่อเรากดที่ LinkButton แล้วเราจะเอาค่าจาก Gridview ที่ Filed [Serials] ครับ
แล้วเอาค่าที่ได้ส่งไปอีกหน้า web หนึ่งครับ แล้วจะเอาค่าที่ได้ในหน้าใหม่ไปค้าหาข้อมูลรถยนต์คันดังกล่าว
ลองใช้ function Eval("ชื่อฟิลที่ต้องการ") ดูนะคับ asp:HyperLink ID="linkProduct" runat="server" Text="Eval("Proid")" NavigateUrl='<%# "~/Auction/detailProduct.aspx?ProductID=" + Eval("ProductID")%>
<
โทดทีคับพิมพลาดไป asp:HyperLink ID="linkProduct" runat="server" Text='<%#Eval("ProName")%>' NavigateUrl='<%# "~/Auction/detailProduct.aspx?ProductID=" + Eval("ProductID")%>' />
Main Forum RSS : YAFVision Theme Created by Jaben Cargman (Tiny Gecko)Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.