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
Proxy-PAC Configuration - referencing source AND destination
DatetimePicker Problem C#
capturing .net application tab event
From my VB6 app, how do I replace specific text in a Word 2003 document with a hyperlink?
how to fix data overflow error when DTS transfers table from Access 2000 to SQL 2000
session variable $subtotal not printing
"Importing CSV file as a new Outlook 2010 contact group"
Connect Server Antispam
MS Visio 2007: installed viewer; yet I still can't open .vsd docs, why?
convert a date to date with offset