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
Is window visible, in front
How do I accomplish load balancing in a shared hosting environment using multiple accounts?
PowerShell Active Directory
What is the best layer 7 filtering firewall?
phonegap error:request for something not a structure or union
Work within the header dynamically whilst working with shapes in the header
Javascript: pass array from one page to another
InDesign CS5 Crashing -- Snow Leopard
Configure two ESXi servers for fail over
How do I install Windows Xp on an Acer Aspire One with a formatted hard drive with Ubuntu on it?