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
Quick Excel Question
CISCO ASA 5505 blocking internet access on specific mac address on local network
How to configure Busy Lamp Field - Speed dials on a Callmanager Express
Track which PC is spamming domino smtp
Oracle forms Behavior of the Alternative Region
Pix 506 to Draytek VPN
secant vs cosecant
20" monitor questionQuestion
How to setup Data Trasnformation Services in SQL 2005
sublists margin