Group: Forum Members
Posts: 2K,
Visits: 6.6K
|
I have a need to encode the results of a SQL query for use with the web listview. I'm querying a database I have no control over to get a list of contracts. The contract ID is a varchar field that could include spaces. I want to then show this ID as a link and use the ID within that link. Of course the spaces are wreaking havoc. I could write a function in SQL Server to do a basic encode, but I'm wondering if there is a way to do this via either the listview or via a ASP.NET function call?
Example:
Data (ID) Desired <a> Link
----------- --------------------------
MS3 DM008 <a href="ContractDetails.aspx?key=MS3%20DM008">MS3 DM008</a>
|