Hey,
On my master page, I set a variable:
LogonUserName = (string)Command.ExecuteScalar();
This may contain an apostraphe. Then in my content pages, I am using this variable for both display purposes
and values for a dataview rowfilter. The rowfilter is failing because of the apostraphe, but I want the apostraphe to be there on the display, so I can't escape it in the master page other wise the display one would show 2 apostraphes:
UserInfo_Link.Text = LogonUserName;...
dvRowFilter.Append(String.Concat("(staff=", String.Concat("'", Master.LogonUserName, "'"), " or signatory=", String.Concat("'", Master.LogonUserName, "'", ") and (importance in ('Very Important', 'Critical'))")));
There are multiple instances of the rowfilter (depending on a switch), so what can I do without escaping it for every ...
Go to the complete details ...