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
Hi-Def TV
Access-list
aspx page not loading image at run time....
Ubuntu 10.04 generic or virtual kernel for XenServer?
Use an unbound column from a combo box
How do I add an external DNS route to point to an interal IP
Gridview - Fully Editable
X3500 IBM Server Keeps Powering Off After Post
How to Delete a Folder or File from the Registry
iframed page to finish without being in an iframe