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
AP div Dreamweaver cs3 shifts in IE8
How to install and configure WINS in Windows 2008 Standard
Alpha Opacity issue in IE7/8 - alpha applying to text in UL/LI
cheapest way to register 20 domains?
Macro to select data
rotate drawstring
defininte integral - upper limit = infinity
2203 error when installing office 2007 on vista
E-Machines EL1200 BSOD at Startup - Windows XP SP2
Internal DNS Issue: Not consistently resolving internal domains.