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
Tracking cookies while NOT surfing - yieldmanager.com, atdmt.com, serving-sys.com
Hide vb.net exe from tasklist
PIX 515E and ACS - limit active VPN session time?
How do I find the hard drive requirments for a SAN?
Can you publish an application using vmware instead of a full desktop?
How do i connect (telnet) to NetApp FAS2020 for initial setup?
Retore from Tape
Forest Migration
Hyper-V machines missing after Windows upgrade
linkbutton does not run