What I'm trying to do is make that Hyperlink field show the value of Barcode as the Text and then the hyperlink will be the value of EmailLink based off the values in the SQL Server.
Whenever I set
DataNavigateUrlFields = "EmailLink"
and
DataNavigateUrlFormatString = "{0}"
it won't give me the option to do a hyperlink.
When I change the ...UrlFields = "ScanID" then it will link but obviously that's not what I want.
The EmailLink field is an NVARCHAR(200) so does that have anything to do with it?
A common value for this field is this:
file:\\10.2.1.65\Archive\4-2-2008_11-36-21_AM_V01013317771_TPN_SUR.tif
Here's my whole code:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStringsSCRIPTConnectionString %>"
SelectCommand="SELECT [Barcode], [PatientFullName], [Type], [PatientUnitNumber], [ScanDateAndTime], [ScanID], [EmailLink] FROM [SCANS]">
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" AllowSorting="True"
AutoGenerateColumns="False" DataKeyNames="ScanID"
DataSourceID="SqlDataSource1" Height="115px" Width="495px">
<Columns>
<asp:HyperLinkField DataTextField="Barcode" HeaderText="Account Number" SortExpression="Barcode"
DataNavigateUrlFields="EmailLink" DataNavigateUrlFormatString="{0}" />
<asp:BoundField DataField="PatientFullName" HeaderText="Patient Name"
SortExpression="PatientFullName" />
<asp:BoundField DataField="PatientUnitNumber" HeaderText="Unit Number"
SortExpression="PatientUnitNumber" />
<asp:BoundField DataField="Type" HeaderText="Order Type"
SortExpression="Type" />
<asp:BoundField DataField="ScanDateAndTime" HeaderText="Scan Time"
SortExpression="ScanDateAndTime" />
</Columns>
</asp:GridView>
Whenever I set
DataNavigateUrlFields = "EmailLink"
and
DataNavigateUrlFormatString = "{0}"
it won't give me the option to do a hyperlink.
When I change the ...UrlFields = "ScanID" then it will link but obviously that's not what I want.
The EmailLink field is an NVARCHAR(200) so does that have anything to do with it?
A common value for this field is this:
file:\\10.2.1.65\Archive\4-2-2008_11-36-21_AM_V01013317771_TPN_SUR.tif
Here's my whole code:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStringsSCRIPTConnectionString %>"
SelectCommand="SELECT [Barcode], [PatientFullName], [Type], [PatientUnitNumber], [ScanDateAndTime], [ScanID], [EmailLink] FROM [SCANS]">
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" AllowSorting="True"
AutoGenerateColumns="False" DataKeyNames="ScanID"
DataSourceID="SqlDataSource1" Height="115px" Width="495px">
<Columns>
<asp:HyperLinkField DataTextField="Barcode" HeaderText="Account Number" SortExpression="Barcode"
DataNavigateUrlFields="EmailLink" DataNavigateUrlFormatString="{0}" />
<asp:BoundField DataField="PatientFullName" HeaderText="Patient Name"
SortExpression="PatientFullName" />
<asp:BoundField DataField="PatientUnitNumber" HeaderText="Unit Number"
SortExpression="PatientUnitNumber" />
<asp:BoundField DataField="Type" HeaderText="Order Type"
SortExpression="Type" />
<asp:BoundField DataField="ScanDateAndTime" HeaderText="Scan Time"
SortExpression="ScanDateAndTime" />
</Columns>
</asp:GridView>