Awd 1
Awd 1
Awd 1
AWD
PRACTICAL
2|Page
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practica1_a
{
internal class Program
{
static void Main(string[] args)
{
int num3 = 0;
Console.WriteLine("Enter a number: ");
int num1 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter b number: ");
int num2 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter choice \n 1-addition \n 2-Subtraction \n 3-Multiplication \n 4-Divide");
int choice=Convert.ToInt32(Console.ReadLine());
switch(choice)
{
case 1:
num3=num1+ num2;
Console.WriteLine("Sum of a and b is: " + num3);
break;
case 2:
num3=num1- num2;
Console.WriteLine("Subtraction of a and b is: " + num3);
break;
case 3:
num3 = num1* num2;
Console.WriteLine("Multiplication of a and b is: " + num3);
break;
case 4:
num3 = num1 / num2;
Console.WriteLine("dividing of a and b is: " + num3);
break;
default:
Console.WriteLine("Invalide choise..");
break;
3|Page
}
Console.ReadKey();
}
}
}
OUTPUT:
using System;
class Program
{
static void Main(string[] args)
{
int i,j,k=1;
for(i=1;i<=15; i++)
{
for(j=1;j<=i;j++)
{
Console.Write(k +" ");
k=k+1;
}
Console.Write("\n");
}
Console.ReadLine();
}
}
4|Page
Output:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Practical1_C
{
}
internal class Program
{
static void Main(string[] args)
{
Choice c1 = new Choice();
bool iscontinue = true;
while(iscontinue)
{
Console.WriteLine("Enter choice to 1:generate fibonaccie and 2: check number prime");
int choice = Convert.ToInt32(Console.ReadLine());
if (choice == 1)
{
c1.Fiobonacci();
}
else if (choice == 2)
{
c1.isPrime();
}
else
{
6|Page
}
Console.WriteLine("Program existed ....");
}
}
}
OUTPUT:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
7|Page
using System.Threading.Tasks;
namespace prac2a
{
internal class Program
{
static void Main(string[] args)
{
int num = 100;
Object boxed = num;
Console.WriteLine("Boxed value: "+boxed);
int unboxed=(int)boxed;
Console.WriteLine("Unboxed value: " + unboxed);
num = 200;
Console.WriteLine("Origanal valaue after modification: " + num);
Console.WriteLine("Boxed value remain unchanged: " + boxed);
Console.ReadKey();
}
}
}
OUTPUT:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace prac2b
{
public delegate int MathOperation(int x, int y );
internal class Program
8|Page
{
public static int Add(int a , int b)
{
return a + b;
}
public static int Subtract(int a , int b) { return a - b; }
static void Main(string[] args)
{
MathOperation operation = Add;
Console.WriteLine("\tAddition: "+operation(10,10));
operation=Subtract;
Console.WriteLine("\tSubtraction: "+operation(50,20));
Console.ReadKey();
}
}
}
OUTPUT:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace prac2c
{
interface abc
{
void Adding(int x, int y);
}
interface bcd
{
void show();
9|Page
class Test:abc,bcd
{
public void Adding(int a,int b)
{
Console.WriteLine("Addition is: "+(a + b));
}
public void show()
{
Console.WriteLine("show of test from abc");
}
}
internal class Program
{
static void Main(string[] args)
{
abc a1;
a1=new Test();
a1.Adding(10, 10);
bcd b1=(bcd)a1;
b1.show();
Console.ReadKey();
}
}
}
OUTPUT:
Register.aspx file
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<center>
<form id="form1" runat="server">
<div>
<h1>Registeration Form</h1>
<br />
<p>Name:
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</p>
<p>Email Id:
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</p>
<p>
Course:
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
</p>
<p>
Gender:
<asp:RadioButton ID="RadioButton1" runat="server" GroupName="gender" Text="MALE" />
<asp:RadioButton ID="RadioButton2" runat="server" GroupName="gender" Text="FEMALE" />
</p>
<p>
Esports:
</p>
<p>
</p>
<br />
<p>
</p>
<p>
11 | P a g e
</p>
<p>
</p>
<p>
</p>
<p>
</p>
</div>
</form>
<p>
</p>
</center>
</body>
</html>
Register.aspx.cs file:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace prac3a
{
public partial class Register : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (RadioButton1.Checked)
{
gender = RadioButton1.Text;
}
else
{
gender = RadioButton2.Text;
}
}
}
}
OUTPUT:
13 | P a g e
Calederform.aspx
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
14 | P a g e
<br />
<br />
<br />
<asp:Label ID="Label1" runat="server"></asp:Label>
</div>
</form>
</body>
</html>
Calenderform.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Calenderform
{
public partial class Calenderform : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
{
Calendar1.SelectedDayStyle.BackColor = System.Drawing.Color.Yellow;
Calendar1.SelectedDayStyle.ForeColor= System.Drawing.Color.Green;
OUTPUT:
16 | P a g e
TreeViewForm.aspx
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</Nodes>
<NodeStyle Font-Names="Tahoma" Font-Size="10pt" ForeColor="Black" HorizontalPadding="5px"
NodeSpacing="0px" VerticalPadding="0px" />
<ParentNodeStyle Font-Bold="False" />
<SelectedNodeStyle Font-Underline="True" ForeColor="#5555DD" HorizontalPadding="0px"
VerticalPadding="0px" />
</asp:TreeView>
<br />
<asp:TextBox ID="TextBox1" runat="server" style="margin-top: 0px" Width="466px"></asp:TextBox>
</div>
</form>
17 | P a g e
</body>
</html>
TreeViewForm.aspx.cs :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace prac3c
{
public partial class TreeviewForm : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OUTPUT:
Web.config
ValidationForm.aspx
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
19 | P a g e
<div>
<p>
Name: <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><asp:RequiredFieldValidator
ID="RequiredFieldValidator1" runat="server" ErrorMessage="Please provide name"
ControlToValidate="TextBox1" ValidationGroup="a"></asp:RequiredFieldValidator>
</p>
<p>
Age:
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="TextBox2"
ErrorMessage="Age between 17-25" MaximumValue="25" MinimumValue="17"
ValidationGroup="a"></asp:RangeValidator>
</p>
<p>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Add" ValidationGroup="a"
/>
</p>
<p>
<asp:Label ID="Label1" runat="server"></asp:Label>
</p>
<p>
<asp:Label ID="Label2" runat="server"></asp:Label>
</p>
</div>
</form>
</body>
</html>
ValidationForm.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace prac4a
{
public partial class ValidatorForm : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
OUTPUT:
XMLFile1.xml
<Impressions>20</Impressions>
<Keyword>KFC</Keyword>
</Ad>
</Advertisements>
Ads.aspx file:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<%-- --%>
<br />
<asp:XmlDataSource ID="XmlDataSource1" runat="server"
DataFile="~/XMLFile1.xml"></asp:XmlDataSource>
</div>
</form>
</body>
</html>
OUTPUT:
22 | P a g e
WebUserControl1.ascx file:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebUserControl1.ascx.cs"
Inherits="prac4c1.WebUserControl1" %>
<div>
<br />
<asp:Label ID="Label2" runat="server" Text="Password"></asp:Label>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<br />
<br />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Register" />
<asp:Label ID="Label3" runat="server"></asp:Label>
</div>
WebForm1.aspx file:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<uc1:WebUserControl1 ID="WebUserControl11" runat="server" />
<div>
</div>
</form>
</body>
</html>
OUTPUT:
Web.sitemap:
Site1.master:
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs"
Inherits="Practical5A.Site1" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title></title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:SiteMapPath ID="SiteMapPath1" runat="server" Font-Names="Verdana" Font-Size="0.8em"
PathSeparator=" : ">
<CurrentNodeStyle ForeColor="#333333" />
<NodeStyle Font-Bold="True" ForeColor="#990000" />
<PathSeparatorStyle Font-Bold="True" ForeColor="#990000" />
<RootNodeStyle Font-Bold="True" ForeColor="#FF8000" />
</asp:SiteMapPath>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
</div>
</form>
</body>
</html>
Web.config
25 | P a g e
Home.aspx :
</p>
</asp:Content>
OUTPUT:
b. Create a web application to demonstrate use of Master Page and content page.
Site1.master
<!DOCTYPE html>
<html>
<head runat="server">
<title></title>
<link rel="stylesheet" type="text/css" href="~/css/StyleSheet1.css" />
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<div>
<header id="header">
<h1>Learning</h1>
</header>
<nav id="nav">
<span>Logo</span>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Artical</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
<div id="con">
<div id="content">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
27 | P a g e
</div>
<aside>
<p><a href="#">news</a></p>
<p><a href="#">news</a></p>
<p><a href="#">news</a></p>
<p><a href="#">news</a></p>
</aside>
</div>
<footer>
<p>@CopyRight</p>
</footer>
</div>
</form>
</body>
</html>
WebForm1.aspx
OUTPUT:
Webform2.aspx:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
</div>
<asp:Label ID="Label1" runat="server"></asp:Label>
</form>
</body>
</html>
WebForm2.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Practical6
{
public partial class WebForm2 : System.Web.UI.Page
{
int x = 0;
protected void Page_Load(object sender, EventArgs e)
{
if(!IsPostBack)
{
ViewState.Add("myx",x);
}
}
}
}
OUTPUT:
a. Create a web application for inserting and deleting records from a database.
WebForm1.aspx:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="new Author" OnClick="Button1_Click" />
<asp:Button ID="Button2" runat="server" Text="remove Author" OnClick="Button2_Click" />
30 | P a g e
<br />
<br />
<asp:MultiView ID="MultiView1" runat="server">
&n
bsp;
<asp:TextBox ID="TextBox1" runat="server" TextMode="Number"
Width="340px"></asp:TextBox>
</asp:View>
<asp:View ID="View2" runat="server">
<br />
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" Width="202px">
</asp:DropDownList>
<asp:Label ID="Label5" runat="server"></asp:Label>
<br />
<br />
<asp:Button ID="Button4" runat="server" OnClick="Button4_Click" Text="Delete" />
<asp:Label ID="Label6" runat="server"></asp:Label>
31 | P a g e
</asp:View>
</asp:MultiView>
</div>
</form>
</body>
</html>
WebForm1.aspx.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Web.Configuration;
namespace InsertandDelete
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
catch (Exception ex)
{
Label4.Text = ex.Message;
}
}
{
throw ex;
}
}
OUTPUT:
WebForm1.aspx
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
34 | P a g e
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Text="Employee Salary >"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server" TextMode="Number"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="TextBox1" ErrorMessage="*" ValidationGroup="a"></asp:RequiredFieldValidator>
<br />
<br />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Show Data"
ValidationGroup="a" Width="243px" />
<br />
<br />
<asp:GridView ID="GridView1" runat="server" BackColor="White" BorderColor="#CC9966"
BorderStyle="None" BorderWidth="1px" CellPadding="4">
<FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
<PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
<RowStyle BackColor="White" ForeColor="#330099" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
<SortedAscendingCellStyle BackColor="#FEFCEB" />
<SortedAscendingHeaderStyle BackColor="#AF0101" />
<SortedDescendingCellStyle BackColor="#F6F0C0" />
<SortedDescendingHeaderStyle BackColor="#7E0000" />
</asp:GridView>
<br />
<asp:Label ID="Label2" runat="server"></asp:Label>
</div>
</form>
</body>
</html>
WebForm1.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Web.Configuration;
namespace prac6b
{
35 | P a g e
GridView1.DataSource = ds.Tables[0];
GridView1.DataBind();
con.Close();
}
catch (Exception ex)
{
Label2.Text= ex.Message;
}
}
}
}
OUTPUT:
a. Create a web application for inserting and deleting records from a database. (Using
Execute-Non Query).
WebForm1.aspx:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="new Author" OnClick="Button1_Click" />
<asp:Button ID="Button2" runat="server" Text="remove Author" OnClick="Button2_Click" />
<br />
<br />
<asp:MultiView ID="MultiView1" runat="server">
&n
bsp;
<asp:TextBox ID="TextBox1" runat="server" TextMode="Number"
Width="340px"></asp:TextBox>
</asp:View>
<asp:View ID="View2" runat="server">
<br />
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"
OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" Width="202px">
</asp:DropDownList>
<asp:Label ID="Label5" runat="server"></asp:Label>
<br />
<br />
<asp:Button ID="Button4" runat="server" OnClick="Button4_Click" Text="Delete" />
<asp:Label ID="Label6" runat="server"></asp:Label>
</asp:View>
</asp:MultiView>
</div>
</form>
</body>
</html>
WebForm1.aspx.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Web.Configuration;
namespace InsertandDelete
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
38 | P a g e
}
catch (Exception ex)
{
Label4.Text = ex.Message;
}
}
con.Close();
Label6.Text = "record deleted successfully";
updateDropdownList ();
Label5.Text = "";
}
catch(Exception ex) { Label6.Text = ex.Message; }
}
public void updateDropdownList()
{
try
{
SqlConnection con = new
SqlConnection(WebConfigurationManager.ConnectionStrings["c1"].ConnectionString);
con.Open();
SqlCommand cmd = new SqlCommand("select * from Authors", con);
SqlDataReader dr= cmd.ExecuteReader();
DropDownList1.DataSource = dr;
DropDownList1.DataTextField = "Auid";
DropDownList1.DataValueField = "Auname";
DropDownList1.DataBind();
con.Close();
}
catch (SqlException ex)
{
throw ex;
}
}
NumberTooLargeException.cs :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace prac8b
{
public class NumberTooLargeException : Exception
{
public NumberTooLargeException():base() { }
40 | P a g e
WebForm1.aspx.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace prac8b
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
catch(FormatException ex)
{
Label2.Text= "Format Exception "+ex.Message;
}
catch (Exception ex) { }
}
}
}
41 | P a g e
WebForm1.aspx:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2>Input Number (must be less than or equaal to 100)</h2>
<asp:Label ID="Label1" runat="server" Text="Enter Number"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
<br />
<br />
<asp:Label ID="Label2" runat="server"></asp:Label>
</div>
</form>
</body>
</html>
OUTPUT:
WebForm1.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs"
Inherits="prac10a.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous"/>
<title></title>
<script type="text/javascript">
function showAlert() {
alert("Bootstrap button Clicked");
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div class="container">
<h2>Bootstrap Button</h2>
<br />
<button type="button" class="btn btn-primary" onclick="showAlert()">Click me!</button>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"
integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-
cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF"
crossorigin="anonymous"></script>
</form>
</body>
</html>
OUTPUT:
43 | P a g e
WebForm1.aspx:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label3" runat="server" Text="Name"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
<br />
Password
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<br />
<br />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Login" Width="308px"
/>
<br />
<br />
<asp:Label ID="Label1" runat="server"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
</div>
44 | P a g e
<br />
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"
DisplayAfter="1500">
<ProgressTemplate>
plz wait...<br />
<asp:Image ID="Image1" runat="server" ImageUrl="~/loading.gif" Width="182px" />
<br />
</ProgressTemplate>
</asp:UpdateProgress>
<br />
</form>
</body>
</html>
WebFrom1.aspx.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace prac10b
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
OUTPUT:
45 | P a g e
WebForm1.aspx:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>NuGet Application</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2>Simple NuGet Application</h2>
</div>
</form>
</body>
</html>
WebFrom1.aspx.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Newtonsoft.Json;
namespace prac10c
{
public partial class WebForm1 : System.Web.UI.Page
{
OUTPUT: