Skip to main content

Posts

Showing posts from April, 2021

FileUpload And QueryString

1. Took File Upload control, Button, Image button control,  Label (First Page) [Browse your desired file > Click on Upload Button > Image will be shown in Image Button Control  ]  Inside the event of ImageButton QueryString is defined.  CODING- 2. When we click on it then the next page will be shown Image ,Using QueryString-  (Next Page) Image control will be used-  Inside page_load event we will call QueryString.

QueryString_Assignment

    Write a code for this-                                                                    1.Registration.aspx- Coding of SUBMIT button- using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Registration : System.Web.UI.Page {     protected void Page_Load(object sender, EventArgs e)     {     }     protected void Button1_Click(object sender, EventArgs e)     {         Response.Redirect("Login.aspx?name=" +TextBox1.Text + "&email=" + TextBox2.Text + "&mobile=" +TextBox3.Text + "&pass=" +TextBox4.Text + "&city=" + DropDownList1.Text);      } } 2. Login.aspx- Coding of LOGIN button- using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Login : System.Web.UI.Page {     protected void Page_Load(object sender, EventArgs e)     {              }     protected void

Quiz[Session]

  3.USING SESSION-   Code- using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Assign2 : System.Web.UI.Page {     protected void Page_Load(object sender, EventArgs e)     {     }     protected void Button11_Click(object sender,EventArgs e)     {         if (RadioButtonList1.SelectedIndex == 0)              TextBox1.Text = "1";         else              TextBox1.Text = "0";                               if (RadioButtonList2.SelectedIndex == 2)             TextBox2.Text = "1";         else             TextBox2.Text = "0";             if (RadioButtonList3.SelectedIndex == 2)             TextBox3.Text = "1";         else             TextBox3.Text = "0";              if (RadioButtonList4.SelectedIndex == 1)             TextBox4.Text = "1";         else             TextBox4.Text = "0";         if (RadioButt

Implementation Of RadioButtonList

  2.QUIZ(Implementation Of RadioButtonList)- using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Assign2 : System.Web.UI.Page {     protected void Page_Load(object sender, EventArgs e)     {         if (!IsPostBack)         {         }     }     protected void Button11_Click(object sender,EventArgs e)     {         if (RadioButtonList1.SelectedIndex == 0)              TextBox1.Text = "1";         else              TextBox1.Text = "0";                               if (RadioButtonList2.SelectedIndex == 2)             TextBox2.Text = "1";         else             TextBox2.Text = "0";             if (RadioButtonList3.SelectedIndex == 2)             TextBox3.Text = "1";         else             TextBox3.Text = "0";              if (RadioButtonList4.SelectedIndex == 1)             TextBox4.Text = "1";         else  

Implementation Of DropDownList

  1. Implementation Of DropDownList-    (i) Design - (ii) Code - using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Assign1 : System.Web.UI.Page {     protected void Page_Load(object sender, EventArgs e)     {     }     protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)     {         if (DropDownList1.Text == "UG")         {             DropDownList2.Items.Clear();             DropDownList2.Items.Add("CSE");             DropDownList2.Items.Add("IT");             DropDownList2.Items.Add("CIVIL");             DropDownList2.Items.Add("MECH");             DropDownList2.Items.Add("ETC");             DropDownList2.Items.Add("ETRX");          }         if (DropDownList1.Text == "PG")         {             DropDownList2.Items.Clear();             DropDownList2.Items.Add("MCA&q

Assignment_Console

1. WAP to make a calculator- using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 {     class Program     {         public void calc(float a, float b,int z)         {             float result;             switch (z)             {                 case 1: result = a + b;                     Console.WriteLine("the Addition is" +result);                     break;                 case 2: result = a - b;                     Console.WriteLine("the Subtraction is" + result);                     break;                 case 3: result = a * b;                     Console.WriteLine("the Multiplication is" + result);                     break;                 case 4: result = a / b;                     Console.WriteLine("the Division is " + result);                     break;                 default: Console.WriteLine("Invalid choice");                     break;             }