{"id":5188,"date":"2020-07-04T06:48:36","date_gmt":"2020-07-04T06:48:36","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=5188"},"modified":"2021-07-04T06:49:41","modified_gmt":"2021-07-04T06:49:41","slug":"how-to-run-c-directly-in-aspx-page","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/random\/how-to-run-c-directly-in-aspx-page","title":{"rendered":"How to run C# directly in ASPX page"},"content":{"rendered":"<p>&lt;%@ Page Language=&#8221;C#&#8221; %&gt;<br \/>&lt;%@ Import Namespace=&#8221;Amazon.S3&#8243;%&gt;<br \/>&lt;%@ Import Namespace=&#8221;Amazon.S3.Model&#8221;%&gt;<\/p><p>&lt;script runat=&#8221;server&#8221;&gt;<\/p><p><br \/>protected void Page_Load(object sender, EventArgs e)<br \/>{<\/p><p>string bucketName = &#8220;XXXXXX&#8221;;<\/p><p><br \/>AmazonS3Client s3Client = AmazonS3Helper.GetAmazonS3Client();<\/p><p>string folderPath = &#8220;documents\/XXXX\/&#8221;; <br \/><br \/>PutObjectRequest request = new PutObjectRequest() <br \/>{ <br \/>BucketName = bucketName, <br \/>Key = folderPath \/\/ &lt;&#8211; in S3 key represents a path <br \/>}; <br \/><br \/>PutObjectResponse response = s3Client.PutObject(request);<\/p><p>}<\/p><p>&lt;\/script&gt;<\/p><p>&lt;html xmlns=&#8221;http:\/\/www.w3.org\/1999\/xhtml&#8221;&gt;<br \/>&lt;head runat=&#8221;server&#8221;&gt;<br \/>&lt;title&gt;&lt;\/title&gt;<br \/>&lt;\/head&gt;<br \/>&lt;body&gt;<\/p><p>&lt;\/body&gt;<br \/>&lt;\/html&gt;<\/p>","protected":false},"excerpt":{"rendered":"<p>&lt;%@ Page Language=&#8221;C#&#8221; %&gt;&lt;%@ Import Namespace=&#8221;Amazon.S3&#8243;%&gt;&lt;%@ Import Namespace=&#8221;Amazon.S3.Model&#8221;%&gt;&lt;script runat=&#8221;server&#8221;&gt;protected void Page_Load(object sender, EventArgs e){string bucketName = &#8220;XXXXXX&#8221;;AmazonS3Client s3Client = AmazonS3Helper.GetAmazonS3Client();string folderPath = &#8220;documents\/XXXX\/&#8221;; PutObjectRequest request = new [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[3530,3531],"class_list":["post-5188","post","type-post","status-publish","format-standard","hentry","category-random","tag-aspx","tag-c"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"paris\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/pariswells.com\/blog\/random\/how-to-run-c-directly-in-aspx-page\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Welcome to Pariswells.com |\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"How to run C# directly in ASPX page | Welcome to Pariswells.com\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/pariswells.com\/blog\/random\/how-to-run-c-directly-in-aspx-page\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-07-04T06:48:36+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2021-07-04T06:49:41+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to run C# directly in ASPX page | Welcome to Pariswells.com\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/how-to-run-c-directly-in-aspx-page#article\",\"name\":\"How to run C# directly in ASPX page | Welcome to Pariswells.com\",\"headline\":\"How to run C# directly in ASPX page\",\"author\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/author\\\/paris#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/#organization\"},\"datePublished\":\"2020-07-04T06:48:36+00:00\",\"dateModified\":\"2021-07-04T06:49:41+00:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/how-to-run-c-directly-in-aspx-page#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/how-to-run-c-directly-in-aspx-page#webpage\"},\"articleSection\":\"Random, aspx, c#\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/how-to-run-c-directly-in-aspx-page#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pariswells.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/category\\\/random#listItem\",\"name\":\"Random\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/category\\\/random#listItem\",\"position\":2,\"name\":\"Random\",\"item\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/category\\\/random\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/how-to-run-c-directly-in-aspx-page#listItem\",\"name\":\"How to run C# directly in ASPX page\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/how-to-run-c-directly-in-aspx-page#listItem\",\"position\":3,\"name\":\"How to run C# directly in ASPX page\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/category\\\/random#listItem\",\"name\":\"Random\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/#organization\",\"name\":\"Welcome to Pariswells.com\",\"url\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/author\\\/paris#author\",\"url\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/author\\\/paris\",\"name\":\"paris\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/how-to-run-c-directly-in-aspx-page#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/93b8ee3f592ac401167f870452bd82d43de80152cd3524e2853403658ada9984?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"paris\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/how-to-run-c-directly-in-aspx-page#webpage\",\"url\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/how-to-run-c-directly-in-aspx-page\",\"name\":\"How to run C# directly in ASPX page | Welcome to Pariswells.com\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/random\\\/how-to-run-c-directly-in-aspx-page#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/author\\\/paris#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/author\\\/paris#author\"},\"datePublished\":\"2020-07-04T06:48:36+00:00\",\"dateModified\":\"2021-07-04T06:49:41+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/\",\"name\":\"Welcome to Pariswells.com\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/pariswells.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to run C# directly in ASPX page | Welcome to Pariswells.com","description":"","canonical_url":"https:\/\/pariswells.com\/blog\/random\/how-to-run-c-directly-in-aspx-page","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pariswells.com\/blog\/random\/how-to-run-c-directly-in-aspx-page#article","name":"How to run C# directly in ASPX page | Welcome to Pariswells.com","headline":"How to run C# directly in ASPX page","author":{"@id":"https:\/\/pariswells.com\/blog\/author\/paris#author"},"publisher":{"@id":"https:\/\/pariswells.com\/blog\/#organization"},"datePublished":"2020-07-04T06:48:36+00:00","dateModified":"2021-07-04T06:49:41+00:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/pariswells.com\/blog\/random\/how-to-run-c-directly-in-aspx-page#webpage"},"isPartOf":{"@id":"https:\/\/pariswells.com\/blog\/random\/how-to-run-c-directly-in-aspx-page#webpage"},"articleSection":"Random, aspx, c#"},{"@type":"BreadcrumbList","@id":"https:\/\/pariswells.com\/blog\/random\/how-to-run-c-directly-in-aspx-page#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/pariswells.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog\/category\/random#listItem","name":"Random"}},{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog\/category\/random#listItem","position":2,"name":"Random","item":"https:\/\/pariswells.com\/blog\/category\/random","nextItem":{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog\/random\/how-to-run-c-directly-in-aspx-page#listItem","name":"How to run C# directly in ASPX page"},"previousItem":{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog\/random\/how-to-run-c-directly-in-aspx-page#listItem","position":3,"name":"How to run C# directly in ASPX page","previousItem":{"@type":"ListItem","@id":"https:\/\/pariswells.com\/blog\/category\/random#listItem","name":"Random"}}]},{"@type":"Organization","@id":"https:\/\/pariswells.com\/blog\/#organization","name":"Welcome to Pariswells.com","url":"https:\/\/pariswells.com\/blog\/"},{"@type":"Person","@id":"https:\/\/pariswells.com\/blog\/author\/paris#author","url":"https:\/\/pariswells.com\/blog\/author\/paris","name":"paris","image":{"@type":"ImageObject","@id":"https:\/\/pariswells.com\/blog\/random\/how-to-run-c-directly-in-aspx-page#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/93b8ee3f592ac401167f870452bd82d43de80152cd3524e2853403658ada9984?s=96&d=mm&r=g","width":96,"height":96,"caption":"paris"}},{"@type":"WebPage","@id":"https:\/\/pariswells.com\/blog\/random\/how-to-run-c-directly-in-aspx-page#webpage","url":"https:\/\/pariswells.com\/blog\/random\/how-to-run-c-directly-in-aspx-page","name":"How to run C# directly in ASPX page | Welcome to Pariswells.com","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/pariswells.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/pariswells.com\/blog\/random\/how-to-run-c-directly-in-aspx-page#breadcrumblist"},"author":{"@id":"https:\/\/pariswells.com\/blog\/author\/paris#author"},"creator":{"@id":"https:\/\/pariswells.com\/blog\/author\/paris#author"},"datePublished":"2020-07-04T06:48:36+00:00","dateModified":"2021-07-04T06:49:41+00:00"},{"@type":"WebSite","@id":"https:\/\/pariswells.com\/blog\/#website","url":"https:\/\/pariswells.com\/blog\/","name":"Welcome to Pariswells.com","inLanguage":"en-US","publisher":{"@id":"https:\/\/pariswells.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Welcome to Pariswells.com |","og:type":"article","og:title":"How to run C# directly in ASPX page | Welcome to Pariswells.com","og:url":"https:\/\/pariswells.com\/blog\/random\/how-to-run-c-directly-in-aspx-page","article:published_time":"2020-07-04T06:48:36+00:00","article:modified_time":"2021-07-04T06:49:41+00:00","twitter:card":"summary","twitter:title":"How to run C# directly in ASPX page | Welcome to Pariswells.com"},"aioseo_meta_data":{"post_id":"5188","title":null,"description":null,"keywords":[],"keyphrases":{"focus":[],"additional":[]},"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[],"defaultGraph":"Article","defaultPostTypeGraph":""},"schema_type":"default","schema_type_options":"{\"article\":{\"articleType\":\"BlogPosting\"},\"course\":{\"name\":\"\",\"description\":\"\",\"provider\":\"\"},\"faq\":{\"pages\":[]},\"product\":{\"reviews\":[]},\"recipe\":{\"ingredients\":[],\"instructions\":[],\"keywords\":[]},\"software\":{\"reviews\":[],\"operatingSystems\":[]},\"webPage\":{\"webPageType\":\"WebPage\"}}","pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":{"locations":{"business":{"name":"","businessType":"","image":"","areaServed":"","urls":{"website":"","aboutPage":"","contactPage":""},"address":{"streetLine1":"","streetLine2":"","zipCode":"","city":"","state":"","country":"","addressFormat":"#streetLineOne\n#streetLineTwo\n#city, #state #zipCode"},"contact":{"email":"","phone":"","phoneFormatted":"","fax":"","faxFormatted":""},"ids":{"vat":"","tax":"","chamberOfCommerce":""},"payment":{"priceRange":"","currenciesAccepted":"","methods":""}}},"openingHours":{"useDefaults":true,"show":true,"alwaysOpen":false,"use24hFormat":false,"timezone":"","labels":{"closed":"","alwaysOpen":""},"days":{"monday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"tuesday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"wednesday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"thursday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"friday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"saturday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"},"sunday":{"open24h":false,"closed":false,"openTime":"09:00","closeTime":"17:00"}}}},"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-07-04 06:48:36","updated":"2022-09-22 17:32:16","primary_term":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/pariswells.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/pariswells.com\/blog\/category\/random\" title=\"Random\">Random<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to run C# directly in ASPX page\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/pariswells.com\/blog"},{"label":"Random","link":"https:\/\/pariswells.com\/blog\/category\/random"},{"label":"How to run C# directly in ASPX page","link":"https:\/\/pariswells.com\/blog\/random\/how-to-run-c-directly-in-aspx-page"}],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/5188","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=5188"}],"version-history":[{"count":1,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/5188\/revisions"}],"predecessor-version":[{"id":5189,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/5188\/revisions\/5189"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=5188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=5188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=5188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}