Once you crate that class and you can now create object from it

Now retrieve message from the class. use Default.aspx.cs to
retrieve message from the method or function in FirstCom.cs
Add the following codes in Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" StyleSheetTheme="Theme1" %>
<!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>mm.cont13 : creating and using component</title>
</head>
<body >
<form id="form1" runat="server">
<div>
This is default Home page..<br />
<asp:Label ID="L1" runat="server" Text="<h1>Message Holder </h1><br
/>" />
</div>
</form>
</body>
</html>

Add these codes in Default.aspx.cs
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
FirstCom fc = new FirstCom();
L1.Text += fc.MyMessage();//.ToString();
FirstCom pc = new FirstCom("Manas");
L1.Text += pc._pMessage();
}
}