2 Replies - 4082 Views - Last Post: 22 January 2010 - 05:44 AM Rate Topic: -----

#1 ajay.531  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 1
  • Joined: 21-January 10

Asp.net Login form

Posted 21 January 2010 - 03:32 AM

when i Fill login page then click login button check the credentials present or not (Log in example ASP.Net) please help me.

public class DBActions
{
	public DBActions()
	{
	 
	}
	public static bool checkuser(string username, string pwd)
	{
		SqlConnection cn=new SqlConnection("user id=sa;password=jackmoon;database=Raju,Data Source=PROG1\SQL2005");
		cn.Open();
		SqlCommand cmd= new SqlCommand("sp_users_details",cn);
		cmd.CommandType=CommandType.StoredProcedure;
		SqlDataReader dr=cmd.ExecuteReader();
		if(dr.HasRows)


after write this which code to write to get output

Is This A Good Question/Topic? 1
  • +

Replies To: Asp.net Login form

#2 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 418
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: Asp.net Login form

Posted 21 January 2010 - 08:31 AM

I'm not sure exactly what you are asking for. Can you elaborate in detail on what you want to happen after the users credentials have been verified?
Was This Post Helpful? 0
  • +
  • -

#3 ThatThatGuy  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 33
  • Joined: 15-January 10

Re: Asp.net Login form

Posted 22 January 2010 - 05:44 AM

Where are you passing parameters to the Stored Procedure...



such as your stored procedure call should have been something like this

SqlCommand cmd= new SqlCommand("sp_users_details @uid=sa, pwd=123",cn);


or something like this

This post has been edited by ThatThatGuy: 22 January 2010 - 05:45 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1