StrataFrame Forum

How to encode result returned from SQL

http://forum.strataframe.net/Topic24748.aspx

By Greg McGuffey - 9/28/2009

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>
By Greg McGuffey - 9/28/2009

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!
By Trent L. Taylor - 9/29/2009

Cool Cool