{"id":12,"date":"2008-05-09T06:07:22","date_gmt":"2008-05-09T13:07:22","guid":{"rendered":"http:\/\/cknotes.com\/?p=12"},"modified":"2008-05-09T06:22:27","modified_gmt":"2008-05-09T13:22:27","slug":"using-assembly-in-aspnet-simplest-example","status":"publish","type":"post","link":"https:\/\/cknotes.com\/using-assembly-in-aspnet-simplest-example\/","title":{"rendered":"Using Assembly in ASP.NET &#8211; Simplest Example"},"content":{"rendered":"<p>This example demonstrates the simplest method for using a .NET assembly in an ASP.NET web page.<\/p>\n<p><strong>1)<\/strong> Create a new file &#8220;helloWorld.aspx&#8221; in your web site&#8217;s root directory.  Using a text editor, add this:<\/p>\n<pre>\r\n&lt;%@ Page Language=\"C#\" %>\r\n&lt;%@ Import Namespace=\"Chilkat\" %>\r\n\r\n&lt;html>\r\n&lt;head>\r\n&lt;title>ASP.NET Hello World&lt;\/title>\r\n&lt;\/head>\r\n&lt;body bgcolor=\"#FFFFFF\">\r\n\r\n&lt;p>\r\n&lt;%\r\n\t<a href=\"http:\/\/www.chilkatsoft.com\/refdoc\/csFtp2Ref.html\">Chilkat.Ftp2<\/a> ftp = new Chilkat.Ftp2();\r\n\tResponse.Write(ftp.Version);\r\n%>\r\n&lt;\/p>\r\n\r\n&lt;\/body>\r\n&lt;\/html>\r\n<\/pre>\n<p><strong>2)<\/strong> Create a &#8220;bin&#8221; directory in the same directory where the helloWorld.aspx file is located.<\/p>\n<p><strong>3)<\/strong> Copy the managed assembly (in this case it is ChilkatDotNet2.dll) into the &#8220;bin&#8221; directory.<\/p>\n<p><strong>4)<\/strong> That&#8217;s it.  Browse to http:\/\/www.yourwebsite.com\/helloWorld.aspx.  The time to load the first page hit will be significantly longer than subsequent page loads.  Errors are most likely permission related.  Feel free to send error listings to support@chilkatsoft.com<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This example demonstrates the simplest method for using a .NET assembly in an ASP.NET web page. 1) Create a new file &#8220;helloWorld.aspx&#8221; in your web site&#8217;s root directory. Using a text editor, add this: &lt;%@ Page Language=&#8221;C#&#8221; %> &lt;%@ Import Namespace=&#8221;Chilkat&#8221; %> &lt;html> &lt;head> &lt;title>ASP.NET Hello World&lt;\/title> &lt;\/head> &lt;body bgcolor=&#8221;#FFFFFF&#8221;> &lt;p> &lt;% Chilkat.Ftp2 ftp = [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[437,438],"class_list":["post-12","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-aspnet","tag-assembly"],"_links":{"self":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/comments?post=12"}],"version-history":[{"count":0,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts\/12\/revisions"}],"wp:attachment":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/media?parent=12"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/categories?post=12"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/tags?post=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}