Tuesday, 10 May 2016

// // Leave a Comment

HTML5 article tag

The commodity aspect is one of the new elements that accept been alien with HTML5. As this is a new aspect there has been some abashing of how to use this element. But there seems to be an acceding that you use the
aspect if you markup content, that makes faculty on its own. What does this mean? It agency that you could use the
aspect if appearance up an “about me" page, a blog entry, and aswell every animadversion to your blog entry.

But you are not declared to use the
aspect about every individual branch – the point is, whatever you put in the
aspect it is declared to accomplish faculty on its own.

Using the Flour-article, the commodity aspect should be acclimated like this (please note, that I accept replaced a lot of the absolute agreeable with three dots, so that the archetype does not yield up too abundant space):

<!DOCTYPE html>
        <body>
        <article>
                <div id="header">
                        <h1>All About Flour</h1>
                        ...
                </div>
                <div id="content">
                        <h2>The Two Types of Wheat</h2>
                                <p>There are…</p>
                        <h2>All-Purpose Flour</h2>
                                <p>All-purpose …</p>
                        ...
                </div>
        </article>
        </body>
</html>

As you can see, the aspect contains the and the as the agreeable in these two ’s can be apprehend as a accomplished article. I accept not included the as the agreeable in this aspect has annihilation to with the absolute commodity we still use a lot of div-elements in this example, but I will appearance you in the afterward capacity which new HTML5 elements you should use instead.
Sometimes you charge added than just one archetype and I’ve included another: Using the blog-entry archetype from antecedent chapters, you would use the commodity aspect to blanket anniversary blog access like this:

<article>
        <h1>Just Another Day</h1>
        <p>Written by Christina<br />
        On January 11th </p>
        <p class="content">This is my second blog entry, and I just wanted to check in on you </p>
</article>
<article>
        <h1>My First Blog Entry</h1>
        <p>Written by Christina<br />
        On January 10th </p>
        <p class="content">I’m so happy to write my first blog entry – yay!</p>
</article>


Read More
// // Leave a Comment

HTML5 SECTION TAGS

HTML5 accept alien a lot of new elements to accomplish the HTML markup even added semantic.
In adjustment to get a bigger compassionate of how these elements are declared to be used, I’ve absitively to use the aforementioned archetype throughout this allotment of the tutorial. It is an commodity about flour, which I accept adopted from AllReceipes.
Before continuing on to the blow of the tutorials, you should accept a quick attending at how the commodity markup could accept looked afore the use of HTML5-elements - there are a lot of
elements and I will appearance you if these >div> can be replaced with added semantically actual markup.

Have a attending at the markup with approved HTML and if you are up for a claiming you can analyze it adjoin the new HTML5 markup - contrarily chase the next capacity and I will appearance how and why we change the markup into semantically actual markup. (And agenda that if accept not styled the commodity - it is apparent semantic HTML!)
The new HTML5 elements can be acclimated in altered ways, and it is important to apprehension that even admitting I accept approved to cover as abounding angle on how to use them as possible, the use of the elements is not absolute yet.
This means, that I ability accompaniment that ”content central the
aspect is declared to accomplish faculty on its own”, but this is my compassionate of the HTML5 blueprint and even admitting I accept approved to present the a lot of accustomed use of the elements, you ability apprehend added online writing that disagreed with my account of the HTML5 specification.

This agency that I actual generally will address one, two, or even three altered angle on how to use the new elements. But do not let this alarm you abroad from application the new elements – you future-proof your webpages and this is consistently a acceptable thing. Additionally, you don’t wish it to become a habbit to use the
aspect to aggregate as this way of appearance up your abstracts is a dying way of accomplishing this.
Read More
// // Leave a Comment

The Structure of HTML

Before starting to use HTML it is important that you accept the anatomy of HTML. As HTML is a markup language, you use it to mark up altered locations of your agreeable - affectionate of like if you are application a highlighter.
HTML Elements
HTML is constructed of elements and it is these elements you use to do your markup. Below is an archetype of how you could mark up a approved text-paragraph.

<p>This paragraph is part of my content</p>

What we have here is a sentence (”This paragraph is part of my content”) which have been placed between <p> and </p>. The <p> and the </p> is called tags. Every tag consists of a <, an abbreviation, and a >. In this case, p is an abbreviation for paragraph. Combined, the <p> and the </p> tags create an element. Every HTML-element starts with an opening tag (in this case, that is <p>) and most have a closing tag (that is </p>). Inside the opening and the closing tag of your element is the actual content.

Empty Elements

Most HTML-elements looks like the

element, but some are what we alarm abandoned elements. The line-break aspect is such one and looks like this:


As you can see, there is no closing tag and the aspect do not accommodate any content, accordingly it is alleged an abandoned element. Because this is an abandoned aspect it is bankrupt at the end of the tag – that’s the /. You don’t accept to use the ”/” at the end of an abandoned element, but it is advised acceptable practice, so you ability as able-bodied get acclimated to it. (As I said before, the tag consists of an abridgement and in this case br stands for break).

TIP!

When the browsers apprehend your HTML5 certificate they don’t affliction whether or not you address your tags in uppercase or lower case. But added developers do! Even admitting you could address the aforementioned linebreak-tag in a lot of altered ways, such as these:
Try this example

<BR />
<bR/>
<Br />
<br />



It is advised acceptable convenance to address all your tags in lowercase – in increases readability, and it is just advised acceptable adroitness to address your tags this way.

What you accept abstruse so far:

An HTML aspect starts with a aperture tag
An HTML aspect ends with a closing tag
A HTML tag starts with a < and ends with a >
The belletrist amid the < and > are abbreviations
The aspect agreeable is aggregate amid the alpha tag and the end tag
Some HTML elements are empty
Empty elements are bankrupt in the alpha tag
Make it a habbit to blazon all your tags in lowercase - it is advised acceptable practice
Read More
// // Leave a Comment

What is HTML?


HTML is a markup accent acclimated to anecdotic the simplest anatomy of webpages. It is the capital markup accent for webpages. HTML is an abridgement and angle for HyperText Markup Language. If a webbrowser such as Internet Explorer, FireFox or Chrome displays a webpage, what it is in fact accomplishing is account and interpreting a HTML document. This certificate could be as abbreviate as 10 curve or as continued as several hundred, the browser does not affliction – all it does is apprehend your document.
And this is the capital purpose of the HTML – to accomplish the agreeable of the HTML-document attainable to the webbrowsers. Aside from authoritative your agreeable attainable to the webbrowser, HTML aswell add semantics to you agreeable – this agency that the webbrowsers and seek engines knows what blazon of agreeable you’ve put up on your webpage and hereby they apperceive how to handle the content.
Basically, the purpose of HTML is to add acceptation to you webpages (some accept that HTML is declared to affect the attending of you webpage, but that is mostly a catechism of adoration and we will attending into it after on) so that the browser can appearance it.

what is HTML5?

Then what is the aberration amid approved HTML and HTML5? We will attending into this catechism throughout the tutorial, but one affair that is important to agenda is, that annihilation you ability accept abstruse about HTML is still accurate if it comes to HTML5 – you don’t accept to bandy annihilation away.
HTML5 consists of a accomplished lot of new appearance and we will attending into the alone appearance forth the way. But actually, HTML5 is not the just the fifth adaptation of HTML – HTML5 was originally created by a accumulation of humans who was not in allegation of the official HTML standard. To accept the advantage of HTML5 is no simple job – the absolute botheration is, that a lot of humans use the appellation HTML5 if what they in fact are apropos to is ”HTML5 and all its accompanying standards, such as CSS3”.
In this tutorial the focus will be on the amount HTML5 appearance and who you use them and area they alter from ”the old” HTML 4.
When application HTML5 you charge to apperceive that not all the new appearance are accurate by all browsers –Different browsers abutment altered appearance and accordingly you will accept to do some tricks to accomplish some of the elements of HTML5 plan correctly.
But one affair is for abiding – HTML5 is the future, that how webpages are traveling to be build, Apple and Google abutment a abundant accord of HTML5 appearance already, The World Wide Web Consortium has accustomed up their own plan of the next bearing of xHTML to abutment HTML5, so let’s get started!
Read More

Monday, 9 May 2016

// // 1 comment

Login page in asp.net c# with sql database

I accept accounting this commodity basically for the fresher and the beginners. On their apperception that how to actualize a login page and acquaintance with the database. so I will explain actuality how to actualize a login page in asp.net c# and acquaintance with the Sql server

Frist create the database and login table-

Script for creating table
create database CodeSolution

USE [CodeSolution]
GO

/****** Object:  Table [dbo].[login]    Script Date: 05/10/2016 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[login](
          [user_id] [int] IDENTITY(1,1) NOT NULL,
          [username] [nvarchar](50) NULL,
          [pwd] [nvarchar](50) NULL,
 CONSTRAINT [PK_login] PRIMARY KEY CLUSTERED
(
          [user_id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  =ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

Script for Inserting Data into Login Table -

insert into login (username,pwd)values('suneel','12345678');

Source Code -

<%@ Page Language="C#" AutoEventWireup="true"CodeFile="loginpage.aspx.cs" Inherits="loginpage" %>

<!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></title>
</head>
<body>
    <form id="form1" runat="server">
    <div align="center">
    <fieldset style ="width:200px;">
    <legend>Login page </legend>
        <asp:TextBox ID="txtusername" placeholder="username"runat="server"
            Width="180px"></asp:TextBox>
        <br />
        <br />
        <asp:TextBox ID="txtpassword" placeholder="password"runat="server"
            Width="180px" TextMode="Password"></asp:TextBox>
        <br />
        <br />
        <asp:Button ID="btnsubmit" runat="server" Text="Submit"
           Width="81px" onclick="btnsubmit_Click" />
            <br />
           
    </fieldset>
    </div>

    </form>
</body>
</html>

  
Code behind(C#):-

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;

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

    }
    protected void btnsubmit_Click(object sender, EventArgs e)
    {
       SqlConnection con = new SqlConnection("Data Source=SUNEEL-PC;Initial Catalog=CodeSolution;Persist Security Info=True;User ID=sa; password=12345678");
       con.Open();
       SqlCommand cmd = new SqlCommand("Select * from login where username='" + txtusername.Text + "' and pwd ='" + txtpassword.Text + "'", con);
       SqlDataAdapter da = new SqlDataAdapter(cmd);
       DataTable dt = new DataTable();
       da.Fill(dt);
       if (dt.Rows.Count > 0)
       {
           Response.Redirect("Details.aspx");
       }
       else
       {
           Response.Write("<script>alert('Please enter valid Username and Password')</script>");
       }
    }
}

------------------------------------Output------------------------------


Read More