954,560 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Login page in asp.net using oracle as back end

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...

manimala.uma
Newbie Poster
2 posts since Oct 2009
Reputation Points: 10
Solved Threads: 0
 

You should look for FormsAuthentication:
Check this:
http://www.codedigest.com/Articles/ASPNET/112_Implementing_Forms_Authentication_in_ASPNet_20.aspx

Although it uses SqlServer DB ...the idea remains the same except the way how CheckUser() method is implement that user System.Data.SqlClinet classes.

Check this:
http://www.codeguru.com/csharp/csharp/cs_network/database/article.php/c8477__2/
http://msdn.microsoft.com/en-us/library/ms973871.aspx

guru_sarkar
Junior Poster in Training
70 posts since Jul 2008
Reputation Points: 12
Solved Threads: 8
 

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();
    }
manimala.uma
Newbie Poster
2 posts since Oct 2009
Reputation Points: 10
Solved Threads: 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

umangchadha
Newbie Poster
1 post since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

It will take you to another page named Entry.aspx with querysting parameters having values in textbox1 and textbox2...eg.
if you entered - joe in textbox1 and 15 in textbox2 you will be taken to new page and the url in addressbar will look like below:

http://www.mysite.xyz/<strong>Entry.aspx?myname=joe&myage=15</strong>
guru_sarkar
Junior Poster in Training
70 posts since Jul 2008
Reputation Points: 12
Solved Threads: 8
 

i want to know source code for online banking in vb.net or asp.net using oracle as backend..

nazee
Newbie Poster
1 post since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You