问题描述
受保护的无效btnRegister_Click(对象发送者,EventArgs e)
{
objRegistration.UserName = txtUserName.Text.Trim();
字符串strGuid = Guid.NewGuid().ToString();
字符串strPassWord = BAMLibrary.Registration.GetRandomPassword(10);
如果(int.Parse(objRegistration.CheckAvailability().Rows [0] .ItemArray [0] .ToString())== 0)
  ; {
objRegistration.FirstName = txtFirstName.Text;
sp objRegistration.LastName = txtLastName.Text;
b objRegistration.Email = txtEmailID.Text;
nbsp; b objRegistration.DOB = DateTime.Parse(txtDOB.Text);
b objRegistration.Address = txtPermanentAddress.Text;
nbsp; b objRegistration.City = txtCity.Text;
&b objRegistration.Country = ddlCountry.SelectedItem.Text;
b ; objRegistration.AlternateEmailID = txtAlternateEmailID.Text;
&bsp; b objRegistration.ReferalID = int.Parse(hfReferalID.Value.ToString());
&nsp objRegistration.AccountNo = txtAccNo.Text;
b objRegistration.AccountHolderName = txtAccountHolderName.Text;
&bsp; b objRegistration.BankName = txtBankName.Text;
&b objRegistration.Branch = txtBankBranch.Text;
b objRegistration.PassWord = strPassWord;
&nsp objRegistration.IFCUCode = txtIFCUCode.Text;
b objRegistration.ActivateCode = strGuid;
b如果(objRegistration.UserRegistration()> 0)
{
nbsp; b Response.Redirect(@".. \ Conformation.aspx");
}
&bb else
{
nbsp; b Response.Write(< script> alert(``未成功完成注册!'')</script>");
}
}
else
{
Response.Write(< script> alert('用户ID已经存在")</script>);
  ; }
}
以下事件引发了错误
protected void btnRegister_Click(object sender, EventArgs e)
{
objRegistration.UserName = txtUserName.Text.Trim();
string strGuid = Guid.NewGuid().ToString();
string strPassWord = BAMLibrary.Registration.GetRandomPassword(10);
if (int.Parse(objRegistration.CheckAvailability().Rows[0].ItemArray[0].ToString()) == 0)
{
objRegistration.FirstName = txtFirstName.Text;
objRegistration.LastName = txtLastName.Text;
objRegistration.Email = txtEmailID.Text;
objRegistration.DOB = DateTime.Parse(txtDOB.Text);
objRegistration.Address = txtPermanentAddress.Text;
objRegistration.City = txtCity.Text;
objRegistration.Country = ddlCountry.SelectedItem.Text;
objRegistration.AlternateEmailID = txtAlternateEmailID.Text;
objRegistration.ReferalID = int.Parse(hfReferalID.Value.ToString());
objRegistration.AccountNo = txtAccNo.Text;
objRegistration.AccountHolderName = txtAccountHolderName.Text;
objRegistration.BankName = txtBankName.Text;
objRegistration.Branch = txtBankBranch.Text;
objRegistration.PassWord = strPassWord;
objRegistration.IFCUCode = txtIFCUCode.Text;
objRegistration.ActivateCode = strGuid;
if (objRegistration.UserRegistration() > 0)
{
Response.Redirect(@"..\Conformation.aspx");
}
else
{
Response.Write("<script>alert(''Unsuccessfull registration !'')</script>");
}
}
else
{
Response.Write("<script>alert(''User id already exist'')</script>");
}
}
the following event is raising the error
Error 91 无法分配给"ActivateCode",因为它是方法组" E:\ BEAMILLIONAIR \ BAM \ BAM \ BAM \ BAM \ Register.aspx.cs 94 21 像这样的BAM
Error 91 Cannot assign to ''ActivateCode'' because it is a ''method group'' E:\BEAMILLIONAIR\BAM\BAM\BAM\BAM\Register.aspx.cs 94 21 BAM
任何人都可以帮助我.
预先感谢
Sandeep adem
Sandeep adem
推荐答案
这篇关于无法分配给"ActivateCode",因为它是“方法组"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!