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
Script to mount drives on boot or via a script file
asp.net.. How do you maintain a persistant User state with class code ??
Adding 2nd DHCP server
Best approach to setting up test/development for learning SharePoint 2010?
Cannot access voicemail on Exchange 2010 from OCS 2007R2. Failure Type 80004005
Addiing unallocated disk space to an aray
Silverlight DataGrid CellTemplate/CellEditTempl
ate Switch
Exporting kernel memory to user space using devmap_umem_setup
Open Source PDF Library for VB.NET
Browser being redirected to alternate sites