本文整理汇总了C#中UserInfo.NewUserSignUp方法的典型用法代码示例。如果您正苦于以下问题:C# UserInfo.NewUserSignUp方法的具体用法?C# UserInfo.NewUserSignUp怎么用?C# UserInfo.NewUserSignUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserInfo
的用法示例。
在下文中一共展示了UserInfo.NewUserSignUp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Button1_Click
protected void Button1_Click(object sender, EventArgs e)
{
try
{
Mainclass obj = new Mainclass();
int i = obj.username(TextBox3.Text.ToString());
if (i == 1)
{
Label1.Visible = true;
Label1.Text = "Username already in use...Enter any other username";
}
else if (TextBox7.Text.Trim().Length != 10)
{
Label1.Visible = true;
Label1.Text = "Enter 10 digit contact number";
}
else if (TextBox1.Text.Trim().Length > 0 && TextBox2.Text.Trim().Length > 0 && TextBox3.Text.Trim().Length > 0 && TextBox4.Text.Trim().Length > 0 && TextBox6.Text.Trim().Length > 0 && TextBox7.Text.Trim().Length > 0)
{
UserInfo nr = new UserInfo();
nr.NewUserSignUp(TextBox1.Text.ToString(), TextBox2.Text.ToString(), TextBox3.Text.ToString(), TextBox4.Text.ToString(), TextBox6.Text.ToString(), TextBox7.Text.ToString());
Label1.Visible = true;
Label1.Text = "Registration Sucessfully Done";
TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
TextBox5.Text = "";
TextBox6.Text = "";
TextBox7.Text = "";
Button2.Visible = true;
}
else
Label1.Visible = true;
Label1.Text = "Enter all the fields";
}
catch (Exception )
{
// Perform some action here, and then throw a new exception.
Label1.Visible = true;
Label1.Text=("Invalid input");
}
}