Friday, December 18, 2009

How do I urlencode in an aspx file

I ran across this while using a repeater. Of course, it can occur in a datagrid as well. The data that's coming from the datasource has & signs and spaces. When the & comes across, and it's put into a query string as a parameter, it's not translated right when sent to the next page. So, I want to encode it so the request.querystring will work. Here's the solution:


No comments: