0

Hi,
I was new to c# and asp.net .I want to create a simple login page using ASP.net with c# code.I had 2 textboxs(username and id) and 1 button control.I stored all the username and id in oracle database.Ma table in database contents emp_name & password.what i need is ,once the users enter their username & id,and by clicking button control,it must check into the database.If is it in database means ,this login page call other .aspx page.if is it not in database means it should display a alert messagebox.I dont know how to proceed .........and i need a full code regarding on this.Please do help me...........(its vry urgent)

Thanks in advance...

4
Contributors
5
Replies
8
Views
7 Years
Discussion Span
Last Post by nazee
0

hey thnks for ya kind reply.I made it to work.
here is ma coding..

protected void Submit_Click(object sender, EventArgs e)
    {
        string constr;

        constr = "Provider=MSDAORA;DataSource=ltmpips;Password=creative;User ID=bsl";

        OleDbConnection con = new OleDbConnection(constr);
        con.Open();

        OleDbCommand cm = new OleDbCommand("select   emp_employee_name,emp_psno from employee_master where emp_employee_name=upper('" + textbox1.Text + "')and emp_psno='" + textbox2.Text + "'", con);

        OleDbDataReader reader = cm.ExecuteReader();
        if (reader.HasRows)
        {
            Response.Redirect("Entry.aspx?myname=" + textbox1.Text + "&myage=" + textbox2.Text);
        }
        else
        {
            Response.Write("<script language=JavaScript>alert('Sorry,your username or password may be Invalid.Please enter Vaild Datas')</script>");


        }
        con.Close();
    }
0

sir what does this statement do

Response.Redirect("Entry.aspx?myname=" + textbox1.Text + "&myage=" + textbox2.Text);

i m a novice in this language so plz help me

i m making my first project in .net having oracle in backend

so plz guys help me out

Edited by umangchadha: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.