Hi,
Thx for rectifying my error.I have the error under the login page button.for eg: like it will shows the error as
Error 7 Invalid expression term ')'.Here i am posting the full length of code.please do the needful.
using System;
using System.IO ;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Configuration ;
namespace loginpage
{
public partial class Loginform : Form
{
DataTable dt=new DataTable ();
ErrorProvider ep=new ErrorProvider ();
BEClass being = new BEClass();
DALClass dac = new DALClass();
private void Loginform_Load(object sender, EventArgs e)
{
this .BackColor =System.Drawing.Color.DarkBlue ;
}
private void txt_username_Validating(object sender, CancelEventArgs e)
{
if(txt_username.Text.Trim ()=="")
{
ep.SetError(txt_username, "UserName is Required");
e.Cancel = true;
return;
}
ep.SetError (txt_username ,"");
}
private void btn_reset_Click(object sender, EventArgs e)
{
txt_username .Text ="";
txt_password.Text ="";
}
private void txt_password_Validating(object sender, CancelEventArgs e)
{
if(txt_password .Text .Trim ().Length <5)
{
ep.SetError(txt_password, "password is Required");
e.Cancel = true;
return;
}
ep.SetError (txt_password ,"");
}
private void btn_login_Click(object sender, EventArgs e)
{
string uname = txt_username.Text;
string upassword = txt_password.Text;
if(txt_username .Text.Length !=0 &&txt_password .Text .Length !=0)
{
dt table = dac.LoginForm(uname, upassword);
if(dt table .rows.count > 0)
{
}
}
public Loginform()
{
}
private void btn_reset_Click(object sender, EventArgs e)
{
txt_username.Text = "";
txt_password.Text = "";
}
}
}
Best,
Sudheep.
Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator