How do I check if a textbox contains "@mediacollege.dk" in like this
如何检查文本框是否包含“@mediacollege”?dk”这样的
if (email.text == "here it checks if it contains "@mediacollege.dk" and does a command")
{
DHF_LodderTableAdapter DHFLodder = new DHF_LodderTableAdapter();
DHFLodder.Insert(UserName.Text, 10);
}
else
{
// nothing
}
1 个解决方案
#1
1
You can do it as
你可以这样做
if (email.text.Contains("@mediacollege.dk") )
{
// do your work
DHF_LodderTableAdapter DHFLodder = new DHF_LodderTableAdapter();
DHFLodder.Insert(UserName.Text, 10);
}
else
{
// nothing
}
#1
1
You can do it as
你可以这样做
if (email.text.Contains("@mediacollege.dk") )
{
// do your work
DHF_LodderTableAdapter DHFLodder = new DHF_LodderTableAdapter();
DHFLodder.Insert(UserName.Text, 10);
}
else
{
// nothing
}