I have a database connection which takes an input from the querystring to access the appropriate data. However i have now upgraded things by encoding this data. As a result i now need to run the QueryString value through a function to unencode it.
At present i have this code for the DataSource:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:spareathoughtConnectionString %>"
SelectCommand="campaign_Statistics" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:QueryStringParameter DefaultValue="0" Name="tmp_Campaign"
QueryStringField="camp" Type="Int64" />
</SelectParameters>
</asp:SqlDataSource>
The QueryString value is 'camp'.
In my code behind i would process this value via the following code;
Convert.ToInt64(HttpUtility.UrlDecode(TamperProofQueryString.decode(Request.QueryString["camp"])))
So, how can incorporate the above line of code into the datasource? ie i need to effectively replace 'camp' with 'Convert.ToInt64(HttpUtility.UrlDecode(TamperProofQueryString.decode(Request.QueryString["camp"])))'
I hope this makes sense?
Thanks