Showing posts with label asp.net. Show all posts
Showing posts with label asp.net. Show all posts

Thursday, August 9, 2018

Check Box uses | Multiple selections Option in online software | web Applications | Sradha webcreations

Check Box uses | Multiple selections Option in online software | web Applications | Websites 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class CHECK_BOX_MAILBOX : System.Web.UI.Page
{
    string sName;
    string sdob;
   
    protected void CheckBoxSPORTS_CheckedChanged(object sender, EventArgs e)
    {
        string sname = TextBox1.Text;
        string sdob = TextBox2.Text;
        if (CheckBoxSPORTS.Checked == true)
        {
            TextBox3.Visible = true;
            TextBox3.Text = "SPORTS";
        }
        else
        {
            TextBox3.Visible = false;
        }
    }
    protected void CheckBoxDANCING_CheckedChanged(object sender, EventArgs e)
    {
        string sname = TextBox1.Text;
        string sdob = TextBox2.Text;
        if (CheckBoxSPORTS.Checked == true)
        {
            TextBox4.Visible = true;
            TextBox4.Text = "DANCING";
        }
        else
        {
            TextBox4.Visible = false;
        }
    }
   
    protected void CheckBoxTRAVELLING_CheckedChanged1(object sender, EventArgs e)
    {
        string sname = TextBox1.Text;
        string sdob = TextBox2.Text;
        if (CheckBoxSPORTS.Checked == true)
        {
            TextBox5.Visible = true;
            TextBox5.Text = "TRAVELLING";
        }
        else
        {
            TextBox5.Visible = false;
        }
    }
    protected void CheckBoxSINGING_CheckedChanged1(object sender, EventArgs e)
    {

        string sname = TextBox1.Text;
        string sdob = TextBox2.Text;
        if (CheckBoxSPORTS.Checked == true)
        {
            TextBox6.Visible = true;
            TextBox6.Text = "SINGING";
        }
        else
        {
            TextBox6.Visible = false;
        }
    }
}

Wednesday, August 1, 2018

how to create data picker using dropdown list and text box : Sradha WebCreations

how to create data picker using drop down list and text box asp.net , sql server 


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class OR_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        int i;
        for (i = 1; i <= 31; i++)
        {
            DropDownListDAY.Items.Add(Convert.ToString(i));
        }
        DropDownListMONTH.Items.Add("JAN");
        DropDownListMONTH.Items.Add("FEB");
        DropDownListMONTH.Items.Add("MAR");
        DropDownListMONTH.Items.Add("APR");
        DropDownListMONTH.Items.Add("MAY");
        DropDownListMONTH.Items.Add("JUN");
        DropDownListMONTH.Items.Add("JUL");
        DropDownListMONTH.Items.Add("AUG");
        DropDownListMONTH.Items.Add("SEPT");
        DropDownListMONTH.Items.Add("NOV");
        DropDownListMONTH.Items.Add("DEC");

        int X;
        for (X = 1900; X <= 2000; X++)
        {
            DropDownListYEAR.Items.Add(Convert.ToString(X));
        }
    }

    string sday;
    string sMonth;
    string sYear ;

    protected void ButtonDATE_Click(object sender, EventArgs e)
   
{
        sday = Convert.ToString(DropDownListDAY.SelectedItem.Text);

        sMonth = Convert.ToString(DropDownListMONTH.SelectedItem.Text);

        sYear = Convert.ToString(DropDownListYEAR.SelectedItem.Text);

       // string sDate = sday + "/" + sMonth + "/" + sYear;
        string sDate=DropDownListDAY.SelectedItem.Text+"/"+DropDownListMONTH.SelectedItem.Text+"/"+DropDownListYEAR.SelectedItem.Text;
     
  Convert.ToString( TextBoxDATE.Text=sDate );

    }
}







how to create student Database Management system : Sradha Webcreations

Student Data Base Management System 
asp.net Sql Server





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


public partial class IF_ELSE_AND_OR_PERCENTAGE : System.Web.UI.Page
{ 
    protected void TextBoxTOTALMARKS_TextChanged1(object sender, EventArgs e)
    {
        string sName = TextBoxNAME.Text;
        double dTotalMark =Convert.ToDouble( TextBoxTOTALMARKS.Text);
        double dpercentages;
       
        dpercentages=(dTotalMark/1000)*100;
        TextBoxPERCENTAGE.Text=Convert.ToString(dpercentages);
        string sGrade;
       
        if(dpercentages>=60)
        {
            sGrade="A";
        }
         else if(dpercentages>=50 && dpercentages<60)
        {
            sGrade="B";
        }
        else if(dpercentages>=40 && dpercentages<50 )
        {
            sGrade="C";
        }
        else
        {
            sGrade="F";
        }
        TextBoxGRADE.Text=Convert.ToString(sGrade);
        }}