protected void Page_Load(object sender, System.EventArgs e)
		{
			try
			{
				DocumentEnt doc = new DocumentEnt();
				doc.New();
				DocumentTransaction.Begin(doc);
				Response.Redirect("DocFileUpload.aspx");
			}
			catch(Exception ex)
			{
				this.ProcessException(ex);
			}

		}
		protected void Page_Load(object sender, System.EventArgs e)
		{
			try
			{
			
				if(Page.IsPostBack)
				{
					if(Request["btnCancel"] != null)
					{
						DocumentTransaction.End();
						Response.Redirect("~/CloseWindow.html");		
						return;
					}

					if(UploadedFile.PostedFile == null  ||
						UploadedFile.PostedFile.ContentLength ==0 ||
						UploadedFile.PostedFile.FileName == null)
						throw new BipGenericException(Bip.Components.BipResources.GetString("StrFileUploadError"));

					DocumentEnt doc = null;
					if(!DocumentTransaction.IsActive())
					{
						doc = new DocumentEnt();
						doc.New();
						DocumentTransaction.Begin(doc);
					}
					else
						doc = DocumentTransaction.Current.Document;

					doc.UploadFile(	UploadedFile.PostedFile.InputStream, System.IO.Path.GetFileName(UploadedFile.PostedFile.FileName));
					//doc.FileName = ;
					Response.Redirect("DocFileTypeEdit.aspx");
				}
			}
			catch(Exception ex)
			{
				ProcessException(ex);
			}

				// Put user code to initialize the page here
		}