<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="Test.Test" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<form action="" enctype="multipart/form-data" method="post">
<input id="fupFile" name="fupFile" type="file" />
<input type="submit" value="Submit" />
public partial class Test : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
if (Request.HttpMethod == "POST")
HttpPostedFile file = Request.Files["fupFile"];
if (file != null && file.ContentLength > 0)
string filename = Path.GetFileName(file.FileName);
by John Avis | February 20, 2019
I was recently doing some work on a website which has a mixture of older Classic ASP pages and ASP.NET Web Forms pages and ran into problems with custom error pages.
by John Avis | February 9, 2018
On an ASP.NET Web Forms page with multiple UpdatePanels it’s nice to give the user some feedback when one of the panels is being updated.
by John Avis | July 6, 2017
There are a few methods for hiding and showing Bootstrap 3.x and 4.x modals in an ASP.NET Web Forms application. This technique is pure ASP.NET (requires no client script) and allows you to show and hide modals by changing the Visible property of a containing PlaceHolder or Panel.