Posts

Showing posts from 2018

Listbox Control Winforn C#

Image

Binding GridView using Database in ASP.NET

Image

Upload, Save and Retreive image from Database In ASP.NET

Image
FileUpload.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FileUpload.aspx.cs" Inherits="WebApplication8.FileUpload" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> </head> <body>     <form id="form1" runat="server">     <div>         <asp:FileUpload ID="fu" runat="server" />         <asp:Button ID="Button1" runat="server" Text="Upload" OnClick="Button1_Click" /><br />         <asp:Label ID="Label1" runat="server" Text=""></asp:Label>         <br />         <br />         <asp:Label ID="imgName" runat="server" Text=""></asp:Label>    ...

Image Uploading in ASP.NET

Image
FileUpload.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FileUpload.aspx.cs" Inherits="WebApplication8.FileUpload" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> </head> <body>     <form id="form1" runat="server">     <div>         <asp:FileUpload ID="fu" runat="server" />         <asp:Button ID="Button1" runat="server" Text="Upload" OnClick="Button1_Click" /><br />         <asp:Label ID="Label1" runat="server" Text=""></asp:Label>         <br />         <br />         <asp:Label ID="imgName" runat="server" Text=""></asp:Label>    ...

SQL Aggregate Functions Using ASP.NET

Image
AggregateDemo.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AggregateDemo.aspx.cs" Inherits="WebApplication8.AggregateDemo" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title> </head> <body>     <form id="form1" runat="server">     <div>         <asp:Label ID="lbl" runat="server" Text=""></asp:Label><br />         <asp:Button ID="btn" runat="server" Text="GetMaxValue" OnClick="btn_Click" />         <asp:Button ID="btnAvg" runat="server" Text="GetAvgSalary" Width="121px" OnClick="btnAvg_Click" />     </div>     </form> </body> </html> AggregateDemo.aspx.cs using System; using System.Collections.Generi...

Login Form with Database in ASP.NET

Image
Login.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="MyFirstProgram.Login" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title></title>     <link href="Content/bootstrap.min.css" rel="stylesheet" /> </head> <body>     <form id="form1" runat="server">     <div class="container">         <div class="row">             <div class="col-lg-8">                 <h4>Login Form</h4>                 <hr />                UserName:<asp:TextBox ID="t...

How to Delete Data from Database Using ASP.NET

Image
This is the Source Code ShowData.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShowData.aspx.cs" Inherits="MyFirstProgram.ShowData" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server">     <title>Show Data</title>     <link href="Content/bootstrap.min.css" rel="stylesheet" /> </head> <body>     <form id="form1" runat="server">     <div>         <h4>Student's Table Data</h4>         <hr />         <asp:Table ID="Table1" runat="server" CssClass="table table-bordered">             <asp:TableHeaderRow>                 <asp:TableH...

Update Data in Database ASP.NET

Image

Fetch Data from Database Using ASP NET

Image

Create Database and Setting Up Database Connection String in ASP.NET

Image

Lottery System With Random Numbers ASP.NET

Image

Creating ASP.NET Table from Backend C#

Image
C# Code protected void Page_Load(object sender, EventArgs e) {  //Created a row TableRow tr = new TableRow(); //creating Table Columns  TableCell td = new TableCell();  TableCell td1 = new TableCell();  TableCell td2 = new TableCell();  TableCell td3 = new TableCell(); //enter data td.Text = "1"; td1.Text = "Asad"; td2.Text = "Karachi"; td3.Text = "25";  tr.Cells.Add(td);  tr.Cells.Add(td1);  tr.Cells.Add(td2);  tr.Cells.Add(td3); tbl.Rows.Add(tr); }