緣起:
前幾天在處理專案 (WebForm),有個下戴 excel
的功能需要調整,它是用 window.location 來指定 ashx,用 get 帶參數,然後 ashx
再依參數來回傳 excel 檔。
這個功能碰上的問題是,get
帶的參數有時會太長,超過限制
dotnet new webapp -n AspNetCoreDemo -o firstwebapp
internal class Program
{
class Performance
{
public int SN { get; set; }
public string Name { get; set; }
public Performance(int sN, string name)
{
SN = sN;
Name = name;
}
public override string ToString()
{
return $"SN:{SN}, Name:{Name}";
}
}
class Review
{
public int PerformanceSN { get; set; }
public string Name { get; set; }
public bool IsPass { get; set; }
public Review(int performanceSN, string name, bool isPass)
{
PerformanceSN = performanceSN;
Name = name;
IsPass = isPass;
}
public override string ToString()
{
return $"PerformanceSN:{PerformanceSN}, Name:{Name}, IsPass:{IsPass}";
}
}
}