【发布时间】:2016-08-15 16:19:47
【问题描述】:
我正在尝试通过向导插入超链接字段。但是当我运行应用程序时,我得到带有蓝色链接的文本,但它不可点击。
这是我的代码:
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="stepID" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None">
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:HyperLinkField DataNavigateUrlFields="stepID,stepName,stepStartdate,stepEndDate,stageID" DataNavigateUrlFormatString="~/Supervisor/editSteps.aspx?stepID={0}&stepName={1}&Sdate={2}&EDate={3}&stgD={4}" DataTextField="stepName" />
<asp:BoundField DataField="stageID" HeaderText="stageID" SortExpression="stageID" />
<asp:BoundField DataField="stepStartdate" HeaderText="stepStartdate" SortExpression="stepStartdate" />
<asp:BoundField DataField="stepEndDate" HeaderText="stepEndDate" SortExpression="stepEndDate" />
</Columns>
<EditRowStyle BackColor="#2461BF" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#EFF3FB" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#F5F7FB" />
<SortedAscendingHeaderStyle BackColor="#6D95E1" />
<SortedDescendingCellStyle BackColor="#E9EBEF" />
<SortedDescendingHeaderStyle BackColor="#4870BE" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DefaultConnection %>" SelectCommand="SELECT * FROM [tblsteps] WHERE ([stageID] = @stageID)">
<SelectParameters>
<asp:QueryStringParameter Name="stageID" QueryStringField="StgID" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
运行此应用程序时没有错误或警告。
【问题讨论】: