using System;
using System.Data;  
using System.Web.UI.WebControls;   
using System.ComponentModel;  
using Meta.Web;
using Meta.Web.Controls;
using Meta.Web.Controls.Template; 


namespace MetaSite.Components.Controls.Views
{
	/// <summary>
	/// ResourceViewĄŁ
	/// </summary>
	public class ResourceView : BaseTemplateControl
	{
		PostText postText;
		Resource res;

		protected override void AttachChildControls()
		{			
			int id = ContextData.Current.GetIntFromQueryString("id",-1);			
			res = Resources.GetResource(id);		
		
			postText = (PostText) FindControl("postText");			

			postText.Title = res.Title;
			postText.Text = res.Text;
		}
	}
}
