Getting value of textbox from button click

Hi,

I want to print textbox value when clicking on a button.
Please help.

Check out the GUI Scripting Guide.
From a new project: Create a C# scripting asset and then drag it from the Project tab to the Main Camera in the Hierarchy tab. (This attaches the script to the Main Camera). Now, OnGUI will be called for each frame.

using UnityEngine;
using System.Collections;

public class TestScript : MonoBehaviour {
	
	public string text = "text area";
	public string textToShowWhenClicked = "";
    
	void OnGUI()
	{
		text = GUI.TextArea (new Rect (25, 25, 100, 30), text);
		
		if( GUI.Button( new Rect(25, 100, 100, 30 ), "Push ME" ))
		{
			Debug.Log( text );
			textToShowWhenClicked = text;
		}
		
		GUI.Label( new Rect(150, 25, 200, 30 ), "Immediate Display: " + text );
		GUI.Label( new Rect(150, 100, 200, 30 ), "When clicked:" + textToShowWhenClicked );
	}
}