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
Delayed Password Lockout on Other Sites in Active Directory
Cannot change desktop background (or wallpaper) in windows xp sp3
How can I get the vsvars32.bat file to appear in my VB Express 2010 installation?
Using If and Vlookup in a VBA routine
How to restrict access to specific folders using variable "UserRoleID"?
Using one keyboard and mouse with two computers at the same time
Convert VBA Function to SQL Function
Building Computer room & Requirements
Poor Performance on Sharepoint 2010 Server
Is there a way to find when a group membership was added or removed in AD.