在我的 detailsview 控件中,我有几个带有 boolean = true 的复选框字段。我想要的任何文本(例如数据字段的 HeaderText)上都有超链接,以便导航到其他页面。可能吗?如果没有,有什么建议吗?
对于模式详细信息,当单击gridview 中的超链接时,详细信息视图将显示详细信息,如果 boolean=true 则复选框将选中,如果 false 则取消选中。我想在 Checked CheckedBoxField 上有超链接文本(未选中的复选框我用后面的代码隐藏它)。
下面是aspx:
`
<Fields>
<asp:CheckBoxField DataField="Sample_Preparation_SP" HeaderImageUrl="~/Images/Coal/Coal.jpg"
HeaderText="Sample_Preparation" Text="Sample_Preparation" />
<asp:CheckBoxField DataField="Free_Moisture_FM" HeaderImageUrl="~/Images/Biomass/Wood Chips.jpg"
HeaderText="Free_Moisture_FM" SortExpression="Free_Moisture_FM" Text="Free Moisture" />
<asp:CheckBoxField DataField="Inherent_Moisture_IM" HeaderImageUrl="~/Images/Coal/Coal.jpg"
HeaderText="Inherent_Moisture_IM" SortExpression="Inherent Moisture" Text="Inherent Moisture" />
<asp:CheckBoxField DataField="Total_Moisture_TM" HeaderText="Total_Moisture_TM" SortExpression="Total_Moisture_TM" HeaderImageUrl="~/Images/Biomass/Wood Pellet3.jpg" Text="Total Moisture" />
<asp:CheckBoxField DataField="Gross_Calorific_Value_GCV" HeaderText="Gross_Calorific_Value_GCV"
SortExpression="Gross_Calorific_Value_GCV" HeaderImageUrl="~/Images/Biomass/EFB.jpg" Text="Gross Calorific Value" />
<asp:CheckBoxField DataField="Net_Calorific_Value_NCV" HeaderText="Net_Calorific_Value_NCV" SortExpression="Net_Calorific_Value_NCV" HeaderImageUrl="~/Images/Biomass/Wood Chips.jpg" Text="Net Calorific Value" />
</Fields>
</asp:DetailsView>
<asp:SqlDataSource
ID="SqlDataSource1"
runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>"
SelectCommand="SELECT [SampleID],[Sample_Preparation_SP], [Free_Moisture_FM], [Inherent_Moisture_IM], [Total_Moisture_TM] ,[Gross_Calorific_Value_GCV], [Net_Calorific_Value_NCV] FROM [tbl_SampleRegistration] WHERE SampleID =@SampleID" >
<SelectParameters>
<asp:QueryStringParameter Name="SampleID" QueryStringField="SampleID" />
</SelectParameters>
</asp:SqlDataSource>`