Total Pageviews

15 October 2018

All HTML Versions

All HTML Versions


Since the early days of the web, there have been many versions of HTML:
his specification defines the 5th major version, second minor revision of the core language of the World Wide Web: the Hypertext Markup Language (HTML)



Version Year


HTML
1991
HTML 2.0
1995

HTML 3.2
1997
HTML 4.01
1999
XHTML
2000
HTML5
2014


HTML Page Structure



HTML Page Structure

Below is a visualization of an HTML page structure:

<html>
<head>
<title>Page title</title>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
</body>
</html>

 <!DOCTYPE> Declaration

The <!DOCTYPE> declaration represents the document type, and helps browsers to display web pages correct way.It must only appear once, at the top of the page (before any HTML tags).The <!DOCTYPE> declaration is not case sensitive.The <!DOCTYPE> declaration for HTML5 is:

For Example
<!DOCTYPE html>

HTML Tags

HTML Tags


HTML tags are element names surrounded by angle brackets: following tags are given as below-


<P>
</P>
Paragraph
<H1>
</H1>
Heading
<br>
</br>
Break
<b>
</b>
Bold
<marquee>
</marquee>
Movement
<body>
</body>
Body content
etc.
etc..
……………………

Here we are using above tags paragraph ,heading,break bold movement tags are used

For example

<!DOCTYPE html>

<html>

<head>

<title>Page Title</title>

</head>

<body>

 <Marquee>My First Web Page <Marquee>

<h1>My First Heading</h1>

<p>My first paragraph.</p>



</body>


</html>



Introduction of HTML (HYPERTEXT MARKUP LANGUAGE)


Introduction of HTML (HYPERTEXT MARKUP LANGUAGE)
OR
What Is HTML

HTML is the standard markup language for creating Web pages .With help of html create a website and use images to display in web site.HTML tag represent  user information like to display about all information in different-different domain such as IT,Medical,Manufacturing….etc.
  1.        There are following points in HTML given as below-
  2.        HTML stands for Hyper Text Markup Language
  3.        It describes the structure of Web pages using markup
  4.        Elements are the building blocks of HTML pages
  5.        Elements are represented by tags
  6.        HTML tags label pieces of content such as "heading", "paragraph", "table", and so on


For Example-
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>


In the above following Tags are uses and description given as-
The <!DOCTYPE html> declaration  document type in  HTML5
The <html>  is the root element
The <head> contains Meta information
The <title> specifies a title for the document
The <body> contains the visible page content
The <h1> element defines a large heading
The <p> element defines a paragraph





18 April 2018

What is view? what is advantage and Disadvantage of view?

What is view? what is advantage and Disadvantage of view? 


View just like a virtual table which contains data view simply and query retrieve data dynamically.
in view data show from table in virtual way just like image and data changes when in table data
will be change in view we can not insert, update and delete records dynamically.

Material view is also available in which update records a specific time interval.


Advantage of view

1.View does not store data in physical location.
2.View hide some column from the table.
3.Access restriction since data insert Update and deletion not possible.


Disadvantage of View

1.When table dropped associated view became irrelevant.
2.During view show the data process is very slow.
3. View take large memory.

17 April 2018

What is caching ?

What is caching and types of caching

This is technique use to increase performance by keeping access data in fast way.The request for a
cached file or data from the actual location

There are three kind of caching

1.Output Caching

 Response.Cache.SetExpires(DateTime.Now.AddMonths(1));
    Response.Cache.SetCacheability(
        HttpCacheability.ServerAndPrivate);
    Response.Cache.SetValidUntilExpires(true);

2.Fragment Caching


Create a user control


<%@ Control Language="C#" AutoEventWireup="true" CodeFile="amrit.ascx.cs" Inherits="WebUserControl" %>
<%@ OutputCache Duration="5" VaryByParam="None" %>

<asp:Label ID="lblTime" runat="server" Font-Bold="true" ForeColor="Blue" />


create a page and define datetime on load event

protected void Page_Load(object sender, EventArgs e)
{
lblTime.Text = DateTime.Now.ToString();
}



<%@ Register src="amrit.ascx" tagname="WebUserControl" tagprefix="uc1" %>
<!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 runat="server">
<title>Fragment Caching in Asp.Net with Example</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<p>Refresh the Page Time Will Update Only After Every 5 Seconds</p>
<uc1:WebUserControl ID="WebUserControl1" runat="server" />
</div>
</form>
</body>
</html>

3.Data Caching

 Cache.Remove(String key);

What are the different type of validators in asp.net

Different Type of Validators ?

There are following types of validators in asp.net are given as below-

1.Required Field Validator
2.Range Validator
3.Compare Validator
4.Custom Validator
5.Regular Expression Validator
6.Summary Validator



1.Required Field Validator

In required validator use for input type of text compulsory to fill otherwise show error.

for example

<form id="form1" runat="server">
    Your name:<br />
    <asp:TextBox runat="server" id="t1" />
    <asp:RequiredFieldValidator runat="server" id="reqName" controltovalidate="t1" errormessage="Please enter your name!" />
    <br /><br />
    <asp:Button runat="server" id="btnSubmitForm" text="ok" />
</form>

2.Range Validator

In range validator define specific range to give the value in text box.
For Example

Date:<br />
<asp:TextBox runat="server" id="txtDate" />
<asp:RangeValidator runat="server" id="rngDate" controltovalidate="txtDate" type="Date" minimumvalue="01-01-2006" maximumvalue="31-12-2006" errormessage="Please enter a valid date within 2006!" />

<br /><br />


3.Compare Validator

In compare validator compare two textbox value.It just like a required field validator.
For example if one textbox contain 2 value and other contain 3 value

Small number:<br />
<asp:TextBox runat="server" id="txtSmallNumber" /><br /><br />
Big number:<br />
<asp:TextBox runat="server" id="txtBigNumber" /><br />
<asp:CompareValidator runat="server" id="cmpNumbers" controltovalidate="txtSmallNumber" controltocompare="txtBigNumber" operator="LessThan" type="Integer" errormessage="The first number should be smaller than the second number!" /><br />


4.Custom Validator

According to requirement create a custom validation which is validate by server side.


Custom text:<br />
<asp:TextBox runat="server" id="txtCustom" />
<asp:CustomValidator runat="server" id="cusCustom" controltovalidate="txtCustom" onservervalidate="cusCustom_ServerValidate" errormessage="The text must be exactly 8 characters long!" />
<br /><br />

Server side create a validation

protected void cusCustom_ServerValidate(object sender, ServerValidateEventArgs e)
{
    if(e.Value.Length == 8)
        e.IsValid = true;
    else
        e.IsValid = false;
}

5.Regular Expression

In regular expression contain expression code to check textbox value by the validation expression
for example
we define only integer value 1 to 4 digit.


digit number:<br />
<asp:TextBox runat="server" id="txtNumber" />
<asp:RegularExpressionValidator runat="server" id="rexNumber" controltovalidate="txtNumber" validationexpression="^[0-9]{4}$" errormessage="Please enter a 4 digit number!" />
<br /><br />

6.Summary of Validator
Summary of validation is allow to display all error when click submit button.


For example
<%@ Page Language="C#" %>

<!DOCTYPE html>

<script runat="server">
    protected void Button_Submit_Click(object sender, System.EventArgs e)
    {
        Label_Message.Text = "Your submitted info....<br />" +
            "Name : " +
            TextBox_FirstName.Text.ToString() + " " +
            TextBox_LastName.Text.ToString() +
            "<br />City: " +
            TextBox_City.Text.ToString();
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>How to use ValidationSummary control in asp.net</title>
</head>
<body style="padding:25px">
    <form id="form1" runat="server">
    <div>
        <h2 style="color:MidnightBlue; font-style:italic;">     
            How to use ValidationSummary control
        </h2>     
        <hr width="450" align="left" color="Gainsboro" />
        <asp:Label
            ID="Label_Message"
            runat="server"
            Font-Bold="true"
            Font-Names="Comic Sans MS"
            ForeColor="OliveDrab"
            Font-Italic="true"
            Font-Size="X-Large"
            />
        <asp:ValidationSummary
            ID="ValidationSummary1"
            runat="server"
            HeaderText="Following error occurs....."
            ShowMessageBox="false"
            DisplayMode="BulletList"
            ShowSummary="true"
            BackColor="Snow"
            Width="450"
            ForeColor="Red"
            Font-Size="X-Large"
            Font-Italic="true"
            />
        <br /><br />
        <asp:Label
            ID="Label_FirstName"
            runat="server"
            Text="First name"
            AssociatedControlID="TextBox_FirstName"
            Font-Bold="true"
            Font-Size="Large"
            ForeColor="Navy"
            />
        <asp:TextBox
            ID="TextBox_FirstName"
            runat="server"
            Font-Bold="true"
            Font-Size="Large"
            Height="30"
            BackColor="Gold"
            Font-Names="Courier New"
            />
        <asp:RequiredFieldValidator
             ID="RequiredFieldValidator1"
             runat="server"
             ControlToValidate="TextBox_FirstName"
             ErrorMessage='Input your first name.'
             EnableClientScript="true"
             SetFocusOnError="true"
             Text="*"
             >
        </asp:RequiredFieldValidator>
        <br /><br />

        <asp:Label
            ID="Label_LastName"
            runat="server"
            Text="Last name"
            AssociatedControlID="TextBox_LastName"
            Font-Bold="true"
            Font-Size="Large"
            ForeColor="Navy"
            />
        <asp:TextBox
            ID="TextBox_LastName"
            runat="server"
            Font-Bold="true"
            Font-Size="Large"
            Height="30"
            BackColor="Gold"
            Font-Names="Courier New"
            />
        <asp:RequiredFieldValidator
             ID="RequiredFieldValidator2"
             runat="server"
             ControlToValidate="TextBox_LastName"
             ErrorMessage='Input your last name.'
             EnableClientScript="true"
             SetFocusOnError="true"
             Text="*"
             >
        </asp:RequiredFieldValidator>
        <br /><br />
       
        <asp:Label
            ID="Label_City"
            runat="server"
            Text="City"
            AssociatedControlID="TextBox_City"
            Font-Bold="true"
            Font-Size="Large"
            ForeColor="Navy"
            />
        <asp:TextBox
            ID="TextBox_City"
            runat="server"
            Font-Bold="true"
            Font-Size="Large"
            Height="30"
            BackColor="Gold"
            Font-Names="Courier New"
            />
        <asp:RequiredFieldValidator
             ID="RequiredFieldValidator3"
             runat="server"
             ControlToValidate="TextBox_City"
             ErrorMessage='Input your city.'
             EnableClientScript="true"
             SetFocusOnError="true"
             Text="*"
             >
        </asp:RequiredFieldValidator>
        <br /><br />
        <asp:Button
            ID="Button_Submit"
            runat="server"
            Text="Submit"
            OnClick="Button_Submit_Click"
            Font-Bold="true"
            Font-Size="Large"
            ForeColor="DodgerBlue"
            Font-Names="Monaco"
            Height="45"
            Width="350"
            />
        <br /><br />
    </div>
    </form>
</body>
</html>

I hope my post is usefull for you............


Contact Form

Name

Email *

Message *