﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WebForms (How do I?)  » How to encode result returned from SQL</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 05:49:08 GMT</lastBuildDate><ttl>20</ttl><item><title>How to encode result returned from SQL</title><link>http://forum.strataframe.net/FindPost24748.aspx</link><description>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?&lt;br&gt;
&lt;br&gt;
Example:&lt;br&gt;
Data (ID)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Desired &amp;lt;a&amp;gt; Link&lt;br&gt;
-----------&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;--------------------------&lt;br&gt;
MS3 DM008&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;a href="ContractDetails.aspx?key=MS3%20DM008"&amp;gt;MS3 DM008&amp;lt;/a&amp;gt;</description><pubDate>Tue, 29 Sep 2009 08:52:42 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How to encode result returned from SQL</title><link>http://forum.strataframe.net/FindPost24753.aspx</link><description>Cool :cool:</description><pubDate>Tue, 29 Sep 2009 08:52:42 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: How to encode result returned from SQL</title><link>http://forum.strataframe.net/FindPost24749.aspx</link><description>Never mind. My brain engaged and I realized that there is a RowPopulating method to fill a column...duh...&lt;br&gt;
&lt;br&gt;
I used this to handle the encoding and it worked great!</description><pubDate>Mon, 28 Sep 2009 19:07:37 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item></channel></rss>