Monday, February 17, 2014

Creating/Inserting  DATABASE in .NET Framework

So are you ready to learn to learn how to create database for your websites, portals in simple and easy step for a lots of application…?
Well in this article am going to explain step wise procedure of creating database for your web purpose like-

 - Sessions
 - User Interaction Page
 - Registration Page
 - Contact info Page
   etc.

Procedure

Step: 1

Coding in Class File Page (.CS)


We need to code in .CS file first of all for coding. First of all we need to attempt to add a special file type (class) to an ASP.NET website.  In general to use this type of item in your site, you should place it in ‘App_Code’ folder.
Follow these steps:

 - Open a empty ASP.NET website

 - Click on SOLUTION EXPLORER

 - Then right click on C:\...\website1

 - Add a new item


 - Select Class file from there and add
   [A new window like this will get open]



In this page, code according to this:
// APP_Code/Class1.cs

using System;
using System.Collections.Generic;

using System.Linq;
using System.Web;

using System.Configuration;
using System.Data.SqlClient;

///  <summary>
///  Summary description for Class1
///  </summary>

public class Class1

{
            public SqlConnection con;
        Public void show()

        {    

      con = new SqlConnection(ConfigurationManager.ConnectionStrings["ABC"].ConnectionString);
        con.Open();

        }  

}

Step: 2

Coding | Default Page

Now we need to code in default page, you can find this page in your website named as:

Default.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.Configuration;
using System.Data.SqlClient;

public partial class _Default : System.Web.UI.Page

{
    Class1 o = new Class1();
    protected void Page_Load(object sender, EventArgs e)

    {

        o.show();

    }

    protected void Button1_Click(object sender, EventArgs e)
    
{
        SqlCommand cmd = new SqlCommand("insert into Reg values('" + TextBox1.Text + "','" + TextBox2.Text + "')", o.con);
        cmd.ExecuteNonQuery();
        Response.Redirect("Default2.aspx");

    }

}

______________________________________________________

for more technical stuff, please visit:
______________________________________________________

Sunday, February 9, 2014

Maintaining Sessions in .NET framework
Session in C#

In this article am going to explain how to create sessions for your website, web portal or any other dynamic stuff using the functionalities of .NET framework along with Visual Studio and MS SQL server (any version; am using VS’10 and SQL: v8)
[Coding is in C#]

Session | Basics

In general session can be defined as the link or interface between our database and any dynamic content based on internet or networking.
Session performs these set of activities:

 - User Info
 - Maintenance
 - User Interaction with module
 - Some Security aspects
etc.

Session | Procedure


There are generally two steps in it,

  (You need already created database)
 - Coding in .CS file page
 - Coding in page label



Session | Reference Example

Step: 1

First of all we have to open a .cs file in visual studio, by following the process as shown below and then after that, do coding in that and save file name as ABC.cs

Let’s start, first of all follow these steps:


After clicking on website option, a window like this will get open:


In this window you have 2 choices; either you can go with visual basic or c#. My domain is c# so am preferring this. Now follow these steps:


After clicking on OK, a blank page will get open, now on that blank page click on SOLUTION EXPLORER and follow this:

 - On clicking SOLUTION EXPLORER a window like this will come out:


-          Now Right click on C:\...\Website\

-          After then click on ADD NEW ITEM
[On clicking there a window like this will come out]



Here search for ‘class’ option and click on that. A “.cs” file will get generated. Now start coding there as mentioned below:

CODE:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page

{

    protected void Page_Load(object sender, EventArgs e)

    {
       
    }

    protected void Button1_Click(object sender, EventArgs e)

    {

        Session.Add("Response",TextBox1.Text);
        Response.Redirect("profile.aspx");

    }

}

Step: 2

Now create .CS file of label page. You can do that by extracting it from solution explorer.

 - Click on solution explorer
 - Right Click on .cs file
 - Extract file or label page

Now perform these coding steps in that label page.

CODE:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class profile : System.Web.UI.Page

{

    protected void Page_Load(object sender, EventArgs e)

    {

       // Label1.Text = Session["Response"].ToString();

        Label1.Text = Session["Response"].ToString();

    }

}

_________________________________________
for more info and technical stuffs, please visit:
_________________________________________

Monday, February 3, 2014

Special Symbols in HTML5

Description:


Special symbol, character and any other related stuff plays very important role during web
development procedure or any other kind of designing and development work. 
As we do require several special symbols, characters in all these activities directly or indirectly.
Thus html5 provides several special symbols in its new features.

These set of special symbols 
are presented in form of several predefined set of codes.

Special Symbol | Example


Ex:  a copyright symbol
      [there is a direct symbol for that, which is described through a pre-defined code]




These special symbols provides these functionality during web or any other type of designing
and development work or procedure-

 - Extra features
 - Description of content
 - In explaining mathematical terms
 - Reduce content
 - Provides proper explanation


Special Symbols:


Some of these symbols are as follows:



































there is a vast list of special symbol that can be used. Some of those are presented here,
.
.
.
.

______________________________________________________________
for more info, please visit:

http://www.c-sharpcorner.com/UploadFile/2072a9/special-symbols-in-html5/
______________________________________________________________