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
xpath select specific node
Batch file to count number of lines
A potentially dangerous Request.Form value was detected from the client ...
Changing A record
EJB
how to reset password for Sharepoint 3.0 Central Administration website
How to configure Internet connection to go through one WNIC instead of NIC Card?
Deleting Duplicate entries in 2 different sheets
on an console app, once i display a question before a console.readline, how to add a default value?
How do I manually sort a gridview with template fields when it is bound in code beside? (VB.Net)