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
Access-list
Hi-Def TV
Generate report/query from sample data
Small business server 2003 - sent mail is "lost" somewhere...
Question on VBA call worksheet.function and self defined function
How to force converted PDF's into links to open at a certain % - cs3
Unable to receive mail using Mail Enable
Router on a stick issue
How to replace a D-cell with a universal adapter instead
Exchange 2007 mailbox to room error