Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

How to select random id from database and display randomly on label

$
0
0

Currently, I'm working on the Lucky Draw system. So the process of the system is when user click on button draw it select a random id from database where table attendance="Present". I also want to make the output display like animated counter number. Can anyone help me on this.Thanks.

I stuck on the background code :

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;




public partial class _Default : System.Web.UI.Page
{
    string constr = ConfigurationManager.ConnectionStrings["lucky"].ConnectionString;
    protected void Page_Load(object sender, EventArgs e)
    {


        
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        using (SqlConnection con = new SqlConnection(constr))
        {
            using (SqlCommand cmd = new SqlCommand(""))
            {

            }
        }
    }
}

Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>