How to encode result returned from SQL


Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (2.8K reputation)
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>
Reply
Trent Taylor
Trent Taylor
StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)StrataFrame Developer (8.7K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Cool Cool
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search