Wednesday, July 25, 2018

how to calculate your authorized for put vote | sradha webcreations

how to calculate your authorized for put vote  in asp.net 

AUTHORIZATON FOR VOTE

ENTER NAME


ENTER AGE


ALLOW FOR VOTE


 SAVE


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


public partial class vote : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void TextBoxAGE_TextChanged(object sender, EventArgs e)
    {
        string sName = TextBoxNAME.Text;
        int iAge = Convert.ToInt32(TextBoxAGE.Text);
        if (iAge > 18)
        {
           // Label1.Text = "you can give vote";
            TextBox1.Text = "you can give vote";
        }
        else
        {
            //Label1.Text = "you cannot give vote";
            TextBox1.Text = "you cannot give vote";
        }
    }



No comments:

Post a Comment