Microsoft
Software
Hardware
Network
Question : Replace apostrophes in all Session Variables in C#?
Having a bit of trouble here...
Can someone provide some code to loop through all active Session variables and replace any single apostrophes with double apostrophes so that I can insert cleanly into SQL database?
Thanks!
Answer : Replace apostrophes in all Session Variables in C#?
try
foreach (string key in Session.Keys) {
Session[key].ToString() = Session[key].ToString().Re
place("'",
"''");
}
Random Solutions
QAT disappears when opening Access 2007 database
SBS 2008 SITES
How to verify Web Server Internal IP Address/Internal Network Name Disclosure Vulnerability?
hp deskjet 5943 makes a funny noise
Multiple Task Lists in one view
Need Microsoft VBA to loop through clipboard and add records via sql statement executed by Currentdb?
How do I refine the group policy governing storage of credentials or .NET Passports?
blackberry not accessible
Computer isn't allowing access anymore
Exchange 2007, how to configure exchange anti-spam to always pass content filtering for several external mail domains