Saturday, 9 February 2013

Differences comapre to Classic ASP with ASP.NET


               ASP.NET uses the multi-language abilities of the .NET Common Language Runtime,    allowing Web pages to be coded in VB.NET, C#, J#, Delphi.NET, Chrome, etc.


         Ability to use the code-behind development model to separate business logic from 
    presentation.


         Ability to use true object-oriented design for programming pages and controls

        Session state in ASP.NET can be saved in a Microsoft SQL Server database or in a
    separate process running on the same machine as the Web server or on a different
    machine. That way session values are not lost when the Web server is reset or the ASP.NET
    worker process is recycled. 

       Ability to cache the whole page or just parts of it to improve performance.

    Compiled code means applications run faster with more design-time errors trapped at the
    development stage


    ASP.NET encourages the programmer to develop applications using an event-driven GUI
   model, rather than in conventional Web-scripting environments like ASP and PHP.

   The framework combines existing technologies such as JavaScript with internal components
   like "View State" to bring persistent (inter-request) state to the inherently stateless Web
   environment

















Difference between ASP.NET and .NET Framework


.NET Framework
The .NET Framework is a software framework developed by Microsoft that runs primarily on Microsoft windows
                                                         OR
It is the collection of tools, technologies, languages and properties, which works together on multiple platforms for creating the applications.

 It includes a large library and provides language interoperability (each language can use code written in other languages) across several programming languages. Programs written for the .NET Framework execute in a software environment known as the Common Language Runtime



ASP.NET

ASP.NET is a server-side Web application framework designed for web development to produce dynamic web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, web applications and web services. It is first released in January 2002 with version of 1.0 of the .net framework

                                                                    OR
It is the part of .NET Framework which uses the functionality of .NET Framework to create a dynamic website


Monday, 15 October 2012

Web user control with AJAX

Step by Step procedure for making  the Web User Control with Ajax

Step: 1: - create web user controls with public properties and event at.ascx.cs and switch to design part with (update panel + Grid view + Sql Data Source)
Step: 2: - Through sql data source, bind the user specific data from the database, let’s say we bind tbdept table.
Step: 3: - code behind technique w.r.t design part.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class WebUserControl : System.Web.UI.UserControl
{
   public delegate void abc(object s, EventArgs e);
    public event abc myclick;
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    public Int32 p_GetDno
    {
        get
        {
            return Convert.ToInt32(GridView1.SelectedRow.Cells[1].Text);

        }
    }

    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {
        myclick(this, e);
    }
}
Step: 4: - Again create one more user control and on the design part drop   grid  View and sql data source in update panel.
Step: 5: - Configure the sql data source and with where clause .(Bind tbemp and in where clause define edno)
Step: 6 - set the coding window w.r.t the design part.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

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

    }
    public Int32 p_SetDno
    {
        set
        {
            SqlDataSource1.SelectParameters["edno"].DefaultValue = value.ToString();
            GridView1.DataBind();
        }
    }
}

Step: 7: - Create web page (.aspx) and drop the user controls from the solution explorer with script manager
Step: -8: - Now finally we can get the services of AJAX with web user control.

Monday, 27 August 2012

Template of Music Site with HTML tags....



source code of music site Template.....

<html>
<title>
music</title>
<link rel=stylesheet type=text/css href="music.css">
<script language=javascript>

document.write(Date());
</script>


<body bgcolor=#66FF66>
<div>
<h2 class=aa>
musicworld.com</h2></div>
<div class=contact>
<a href="css2.html">home</a><p>
<a href="music.html">music</a><p>
<a href="video.html">video</a><p>
<a href="wall1.html">wallpapers</a><p>
<a href="about1.html">about us</a><p>
<a href="contact.html">contact us</a><p>

</div>
<div class=abc1>


<table class=music>
<tr>
<th><a href="old.html">old is gold</a><th> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
<th><a href="latest.html">latest songs</a></th> <th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
<th><a href="punjabi.html">punjabi songs</a></th><th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
<th><a href="english.html">English songs</a></th>
</tr>
<tr>
<td><img src="file:///C|/Users/sandy/Desktop/images (1).jpg" height=150px width=150px"></td><td></td>
<td><img src="file:///C|/Users/sandy/Desktop/cocktail.jpg" height=150px width=150px"></td><td></td>
<td><img src="file:///C|/Users/sandy/Desktop/hunny singh.jpg" height=150px width=150px"></td><td></td>
<td><img src="file:///C|/Users/sandy/Desktop/eniqure.jpg" height=150px width=150px">
</tr>
<tr>
<td>lsiten evergreen<br>
songs of bollywood<br>
industry that<br>
feels the pain and<br>
happiness of the<br>
person</td>
<td></td>
<td>
Download Hindi Songs<br>
offers Hindisongs download<br>bollywoodsongs<br>
latesthindi and regionalsongs,<br>
</td>
<td></td>
<td>
Download free Punjabi<br>
Album songs online, <br>
Free punjabi mp3 songs
</td>
<td>
</td>
<td>
Hollywood songs,English songs<br>
English albums,<br>
akon songs,<br>
titanic songs
</td>
</tr>
<tr>
<td><a href="old.html">see more..</a></td><td></td>
<td><a href="latest.html">see more..</a></td><td></td>
<td><a href="punjabi.html">see more..</a></td><td></td>
<td><a href="english.html">see more..</a></td>
</table>
</div>


<div class=bb>
footer of website</div>
</body>
</html>

Saturday, 25 August 2012

Facebook style Login Page in HTML and CSS along with JavaScript Validations




Facebook style Login Page in HTML and CSS along with JavaScript Validations



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Facebook</title>
<link href="value.css" rel="stylesheet" type="text/css" />
</head>


<body bgcolor="#ECECFF">


<div style="background-color:#3B5998;height:95px;width:100%">
<img style="height:90px;margin-left:150px" src="C:\Users\sandy\Desktop\images.jpg" />
<div style="float:right;padding:16px;">
<table>
<tr>
<td><font style="font-weight:900;font-size:16px;padding:20px" color="#FFFFFF">username</font></td>
<td><font style="font-weight:900;font-size:16px;padding:20px;padding-bottom:10px" color="#FFFFFF">password</font></td></tr>
<tr>
<td><input type="text" name="t1" /></td>
<td><input type="password" name="t2" /></td>
<td><input type="button" name="a" value="login" /></td></tr>

<td><input type="checkbox" name="s" value="remember the password" /><font color="#BFBFFF">remember password</font></td>
<td><input type="checkbox" name="s" value="forgot your password?" /><font color="#BFBFFF">forgot password?</font></td>
</tr>
</table>
</div>
</div>

<div style="float:left;margin-left:10px">
<div style="background:#ECECFF;height:500px;width:600px">
<h1 style="padding-top:30px;text-align:center">Your Facebook Timeline</h1>
<h3 style="text-align:center"><font color="#5E5EFF">Tell Your Life story witha a new kind of profile.</font><font color="#0033FF">Learn More</font></h3>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<img src="C:\Users\sandy\Desktop\facebook.jpg" align="middle" style="border:double;color:#FFFFFF" />
</div>
</div>
<div style="float:right;margin-left:5%;padding-bottom:100px">
<div style="height:500px;width:600px;background-color:#ECECFF">
<h3 style="float:left"><font color="#333333">Sign Up</font></h3><br /><br />
<p style="margin-left:2px;text-decoration:underline">It's a free and always will be.</p>
<form action="reg.php" name="f" method="post">

<script language="javascript">

function valid()
{
if(f.t1.value=="")
{
alert("Enter the Firstname");
return;
}
if(f.t2.value=="")
{
alert("Enter the Lastname");
return;
}

var h=f.t3.value;
var s=h.indexOf("@");
//var s=h.indexOf(".");
if(s<0)
{
alert("not a valid E mail");
return;
}
var s=h.indexOf(".");
if(s<0)
{
alert("not a valid E mail");
return;
}


if(f.t3.value=="")
{
alert("Enter the Email");
return;
}

if(f.t4.value=="")
{
alert("Enter the confirm Email");
return;
}
if(f.t3.value!==f.t4.value)
{
alert("Email doesn't match");
return;
}
}
</script>

<table>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;First Name:</td>
<td><input style="height:30px;width:300px" type="text" name="t1" value="enter the name" onfocus="this.value=''" /></td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Last Name:</td>
<td><input style="height:30px;width:300px" type="text" name="t2" /></td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Your Email:</td>
<td><input style="height:30px;width:300px" type="text" name="t3" /></td>
</tr>
<tr>
<td>Re-enter Email:</td>
<td><input style="height:30px;width:300px" type="text" name="t4" /></td>
</tr>
<tr>
<td>NewPassword:</td>
<td><input style="height:30px;width:300px" type="password" name="t5" /></td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I am:</td>
<td><select style="height:30px;width:120px" name="s1" >
<option>Select Sex:</option>
<option>Male</option>
<option>Female</option>
</select>
</td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Birthday:</td>
<td><select style="height:30px;width:70px"  name="s2" >
<option>Month:</option>
<option>Jan</option>
<option>Feb</option>
<option>Mar</option>
<option>Apr</option>
</select>
&nbsp;&nbsp;
<select style="height:30px;width:50px;size:1" name="s2">
<option>Day:</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
&nbsp;&nbsp;
<select style="height:30px;width:70px;size:1" name="s2">
<option>Year:</option>
<option>2006</option>
<option>2007</option>
<option>2008</option>
<option>2009</option>
<option>2010</option>
</select>
</td>
<tr>
<td>
</td>
<td><a href="#"><font color="#8080FF">Why do i need to provide my birtyhday?</font></a></td>
</tr>
<tr>
<td></td>
<td><font size="3px">By clicking Sign Up, you agree to our Terms and that you have read and understand our Data Use Policy, including our Cookie Use.</font></td>
</tr>
<tr>
<td></td>
<td><input style="background-color:#00AA55;width:100px;height:30px;border:thick;text-align:center" type="button" onclick="valid()" name="t7" value="Sign Up" /></td>
</tr>
</tr>
</table>
</form>
</div>
</div>
</body>
</html>

Friday, 17 August 2012

Business Layer of the 3-tier Architecture using Microsoft Application Blocks in ASP.NET 4.0


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Configuration;
using System.Data.SqlClient;
using Microsoft.ApplicationBlocks.Data; //Add namespace (Downloaded from Enterprise Library)


namespace nsemployee
{
    public class clsempprp
    {
        public int p_empno { get; set; }
        public String p_ename { get; set; }
        public String p_eadd { get; set; }
        public int p_esal { get; set; }
    }
    public class clsemp
    {
        String cs;
        public clsemp()
        {
            cs = ConfigurationManager.ConnectionStrings["cn"].ConnectionString;
        }
        public void save_rec(clsempprp p)
        {
            Object[] prm = new object[4];
            prm[0] = p.p_empno;
            prm[1] = p.p_ename;
            prm[2] = p.p_eadd;
            prm[3] = p.p_esal;
            SqlHelper.ExecuteNonQuery(cs, "insemp", prm);
        }
        public void update_rec(clsempprp p)
        {
            Object[] prm = new object[4];
            prm[0] = p.p_empno;
            prm[1] = p.p_ename;
            prm[2] = p.p_eadd;
            prm[3] = p.p_esal;
            SqlHelper.ExecuteNonQuery(cs, "updemp", prm);
        }
        public void delete_rec(clsempprp p)
        {
            Object[] prm = new Object[1];
            prm[0] = p.p_empno;
            SqlHelper.ExecuteNonQuery(cs, "del", prm);
        }
        public List<clsempprp> disp_rec()
        {
            SqlDataReader dr;
            dr = SqlHelper.ExecuteReader(cs, "dispemp");
            List<clsempprp> obj = new List<clsempprp>();
            while (dr.Read())
            {
                clsempprp k = new clsempprp();
                 k.p_empno = Convert.ToInt32(dr[0]);
                k.p_ename = dr[1].ToString();
                k.p_eadd = dr[2].ToString();
                k.p_esal = Convert.ToInt32(dr[3]);
                obj.Add(k);
            }
            dr.Close();
            return obj;
        }
    }

}

CLASS 10 AI MCQS 2025-26

1.         Which of the following is NOT one of the four main principles of bioethics? a)     Autonomy                  b) Justice        ...