fix: add support of lithuanian characters to "Practice.ValidWeb"
This commit is contained in:
parent
e360ae8034
commit
ee066855b6
@ -10,7 +10,7 @@ namespace ValidWeb
|
|||||||
{
|
{
|
||||||
public partial class Forma1 : System.Web.UI.Page
|
public partial class Forma1 : System.Web.UI.Page
|
||||||
{
|
{
|
||||||
|
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (DropDownList1.Items.Count == 0)
|
if (DropDownList1.Items.Count == 0)
|
||||||
@ -46,15 +46,15 @@ namespace ValidWeb
|
|||||||
protected void Button1_Click(object sender, EventArgs e)
|
protected void Button1_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string name = TextBox1.Text;
|
string name = TextBox1.Text;
|
||||||
if (Regex.IsMatch(name, @"[^a-zA-Z]")) { return; }
|
if (Regex.IsMatch(name, @"[^a-zA-ZąčęėįšųūžĄČĘĖĮŠŲŪŽ]")) { return; }
|
||||||
|
|
||||||
string surname = TextBox2.Text;
|
string surname = TextBox2.Text;
|
||||||
if (Regex.IsMatch(surname, @"[^a-zA-Z]")) { return; }
|
if (Regex.IsMatch(surname, @"[^a-zA-ZąčęėįšųūžĄČĘĖĮŠŲŪŽ]")) { return; }
|
||||||
|
|
||||||
string school = TextBox3.Text;
|
string school = TextBox3.Text;
|
||||||
string age = DropDownList1.Text;
|
string age = DropDownList1.Text;
|
||||||
string language = CheckBoxList1.SelectedValue;
|
string language = CheckBoxList1.SelectedValue;
|
||||||
|
|
||||||
string user = String.Join("|", name, surname, school, age, language);
|
string user = String.Join("|", name, surname, school, age, language);
|
||||||
if (Session["users"] == null) {
|
if (Session["users"] == null) {
|
||||||
Session["users"] = user;
|
Session["users"] = user;
|
||||||
@ -77,6 +77,6 @@ namespace ValidWeb
|
|||||||
Table1.Rows.Add(row);
|
Table1.Rows.Add(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user