How to encode result returned from SQL


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Cool Cool
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Never mind. My brain engaged and I realized that there is a RowPopulating method to fill a column...duh...



I used this to handle the encoding and it worked great!
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K 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>
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search