Hi Morris,
As for the GridView Hyperlink column, I've performed some local test via
the page source you provided. I use a self generated DataTable as
datasource and remain the other Gridview column setting unchanged. It seems
the hyperlink can display correctly:
Here is the completely test page(aspx and codebehind), you can directly run
them in a test page on your side and compare with the problem page:
==============================
<body>
<form id="form1" runat="server">
<div>
<asp:GridView ID="GridView2" runat="server" AllowPaging="True"
AllowSorting="True"
AutoGenerateColumns="False"
DataKeyNames="SpeechFileID,VOXDIR"
Font-Names="Verdana" Font-Size="8pt" BorderColor="#FFC080"
BorderStyle="Solid" BorderWidth="1px" Width="579px" CellPadding="5"
CellSpacing="1" ForeColor="Navy" >
<Columns>
<asp:CommandField ShowEditButton="True" EditText="Edit Status" >
<ControlStyle Font-Bold="False" ForeColor="DarkSlateGray" />
<HeaderStyle BackColor="Lavender" />
<ItemStyle BackColor="Lavender" BorderColor="SlateGray"
BorderStyle="Inset" BorderWidth="2px" />
</asp:CommandField>
<asp:HyperLinkField DataNavigateUrlFields="SpeechFileID,VOXDIR"
DataNavigateUrlFormatString="EmailMsg2.aspx?Speech FileID{0}&VOXDIR{1}"
Text="Email Message2 via HLink" >
</asp:HyperLinkField>
</Columns>
<RowStyle BackColor="BlanchedAlmond" />
<EmptyDataTemplate>
No messages for selected mailbox
</EmptyDataTemplate>
<HeaderStyle BorderColor="#FFC080" Font-Bold="False"
BackColor="#FFC080" />
<AlternatingRowStyle BackColor="SeaShell" />
<PagerSettings Mode="NumericFirstLast" Position="TopAndBottom" />
</asp:GridView>
</div>
</form>
</body>
=============================
===============code behind============
public partial class DataTestPage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Bind_Test_Data();
}
}
void Bind_Test_Data()
{
DataTable dt = new DataTable("TestTable");
dt.Columns.Add("SpeechFileID");
dt.Columns.Add("VOXDIR");
for (int i = 0; i < 10; ++i)
{
dt.Rows.Add("SpeechFile_" + i, "VOXDIR_" + i);
}
GridView2.DataSource = dt;
GridView2.DataBind();
}
}
=============================
If there is anything unclear or any further finding, please feel free to
post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.
Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subs.../aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?TW9ycmlzIE5ldW1hbg==?= <>
>Subject: GridView Hyperlink field
>Date: Sun, 18 Jan 2009 15:03:16 -0800
>
>Hi,
>
>I have a GrideView which is bound to a datasourcecontrol. One of the
>columns is a HyperLink to another web page passing it parameters. This
>Hyperlink does not show as a hyperlink when viewing the grid. I have this
>working on other pages but cannot get this to work. Don't know what I
have
>coded incorrectly. Please help.
>
>Below is the definition of the GridView with the HyperLink field.
>
>
> <asp:GridView ID="GridView2" runat="server" AllowPaging="True"
>AllowSorting="True"
> AutoGenerateColumns="False"
> DataKeyNames="Account,MessageID,SpeechFileID,VOXDI R"
>DataSourceID="AccessDataSource1"
> Font-Names="Verdana" Font-Size="8pt" BorderColor="#FFC080"
>