C sharp Türkçe karakter kontrol metodu

Eğer veritabanına Türkçe karakter yazmak istemiyorsanız, aşağıdaki metodu kullanabilirsiniz.

Kullanımı:
_Name += "MAIL_METIN,";
_Values += "'" + Tools.TurkceKarakterleriKaldir(HTMLCode) + "',"; 
public static string TurkceKarakterleriKaldir(string EskiMetin)
{
string YeniMetin = "";
string TurkceKarakterler="şŞçÇüÜİıöÖğĞ";
string YeniKarakterler ="sScCuUIioOgG";
for (int i = 0; i < EskiMetin.Length; i++)
{
bool Varmi = false;
for (int k = 0; k < TurkceKarakterler.Length; k++)
{
if (EskiMetin[i] == TurkceKarakterler[k])
{
YeniMetin += YeniKarakterler[k];
Varmi = true;
break;
}
}
if (!Varmi)
{
YeniMetin += EskiMetin[i];
}
}
return YeniMetin;
}
 

BlackListIP control on Serenity platform (.NET Core)

 In the Serenity platform, if you want to block IPs that belong to people you do not want to come from outside in the .net core web project,...