Friday, January 09, 2004

So I am hammering out the C# project. I am having some issue with Session State not staying active. However got through my issue with using COM objects in a ASP.NET projects. I found this article helpful. Using a COM object in C# or VB.NET. You see, I need to use the ASPUpload COM object for the project to save time and have a user interface that my users know.
My code ended up looking something like this: using System.Reflection; using ASPUPLOADLib; namespace myproject public class myproject : System.Web.UI.Page { private void Page_Load(object sender, System.EventArgs e) { string strPath = ""; strPath = myproject.getPath("test"); ASPUPLOADLib.IUploadManager objUpload; objUpload = (ASPUPLOADLib.IUploadManager)Server.CreateObject("Persits.Upload"); int Count = objUpload.Save(strPath, Missing.Value, Missing.Value); lblLoad.Text = "Success. " + Count + " file(s) uploaded to " + strPath + "."; } }

No comments: