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
Displaying Generic Stylesheet
CREATE FUNCTION SQL
Text_Changed for Gridview
Issue with Services not starting with bad user name and password after they have be cloned in VMWARE
Time Calculation/Interval
Copy an exe to C Drive for user with no Administrative Privileges
spoolsv.exe is taking 50%CPU all the time
Unique Records with Excel
comments in code
Why doesn't this very simple C program not work all the way through?