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
Windows Server 2008 R2 - Easy Print remote desktop
Internet Explorer Maintenance GPO issue
sql stored procedure
Migrating from ACT 6 to 2010
Write in file
Exit Shell Script on Error
Setup Cannot Copy File:...on installing XP Home
blowing the tran log
PHP Simple HTML DOM Parser with parse_url
Struggling with a query!