locked
Creating a Web User ID Password RRS feed

  • Question

  • User115673193 posted

    I want to create a web form which have a user id and password someone can tell me how its possible. pls write a example code.

     without using of dataset and dataadaptor.

     

    Friday, August 16, 2013 12:33 AM

Answers

  • User-574293449 posted
    using (SqlConnection conn = new SqlConnection('your connection string'))
    using(SqlCommand cmd = new SqlCommand(sqlStatement, conn))
    {
       conn.open();
       using (SqlDataReader dr = cmd.ExecuteReader())
       {
            while (dr.Read())
            {
               //read here
            }
       }
    }

    IF the data present then you can return as authentication passed

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 16, 2013 5:11 AM

All replies