Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing Text in asp:HyperlinkField

Status
Not open for further replies.

wbodger

Programmer
Apr 23, 2007
769
US
I have this code

Code:
<asp:HyperLinkField runat="server" HeaderText="Add/View Status" DataNavigateURLFields="fabpn" DataNavigateUrlFormatString="~/AddMaterialStatus.aspx?PartNum={0}" Text='Add/View Status' ></asp:HyperLinkField>

in the dataset I have a field 'Status' which is either blank or says '/View'. I would like to have the value in the text field be 'Add<%=Status%> Status', but I have not been able to come up with a way to do that so it actually uses the value from the database. Help?

Thanks,
wb
 
Figured out that I needed to use the DataTextField property, manipulated the SQL and it works great.

wb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top