1
我正在學習工作,需要一些幫助,我希望圖像在DataBound的'相關信息'ImageField列中可以放大。這裏是我的代碼:ASP.NET C#如何擴大GridView的DataBound imageField圖片時,如何?
<div style="height:200px; width: 610px; overflow: auto;">
<asp:GridView ID="GV_insView" runat="server"
AutoGenerateColumns="False"
CssClass="Grid" AlternatingRowStyle-CssClass="alt" Width="511px">
<AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
<Columns>
<asp:BoundField HeaderText="Customer ID" DataField="NRIC" />
<asp:BoundField HeaderText="Insurance Type" DataField="insType" />
<asp:BoundField HeaderText="Date Filed" DataField="dateFiled" DataFormatString="{0:dd/MM/yyyy}"/>
<asp:ImageField HeaderText="Relevant Information" DataImageUrlField="relInfo" ControlStyle-Width="100" ControlStyle-Height="100">
</asp:ImageField>
</Columns>
</asp:gridview>
</div>
感謝您的迴應,代碼工作,我現在可以放大GridView中的內容。但是,當我將鼠標懸停在圖像上時,所有其他列中的單詞也會放大。有任何解決這個問題的方法嗎? – shck
僅適用於所選的行。你可以做什麼來把這個CSS屬性放到那個特定的綁定域。 – Waqar
你可以檢查我的答案的編輯 – Waqar