An exception of type 'System.ArgumentException' occurred in mscorlib.dll, Additional information: Illegal characters in path
<p>i am writing two functions:download and delete function for my gridview file 
so basically whenever the download button is click, it will check the field Games_RulesBooklet for the file name then download the file with the name locate inside "~/AppData/RulesData/". I'd successfully manipulate the attach function. But i can't seem to download the specific file i'd attach into RulesData</p>

<p>Whenever i try to download, errors pops up:</p>

<p><a href="https://i.stack.imgur.com/HxGl8.png" rel="nofollow">errors</a>
These line is in the cs file:</p>

<pre><code>protected void DownloadFile(object sender, EventArgs e)
{

        string filePath = (sender as LinkButton).CommandArgument;
        Response.ContentType = ContentType;
        Response.AppendHeader("Content-Disposition", "attachment; filename=\"" + Path.GetFileName(filePath)+ "\"");
        Response.WriteFile("~/AppData/RulesData" + filePath);
        Response.End();
}

protected void DeleteFile(object sender, EventArgs e)
{
    string filePath = (sender as LinkButton).CommandArgument;
    File.Delete(filePath);
}
</code></pre>

<p>these lines are in my aspx file:</p>

<p>Download:</p>

<p><code>&lt;asp:LinkButton ID="lnkDownload" CommandArgument ='&lt;#%      Eval("Game_RulesBooklet") %&gt;' Text="Download" runat="server" OnClick ="DownloadFile"&gt;&lt;/asp:LinkButton&gt;</code></p>

<p>Delete:</p>

<pre><code>&lt;asp:LinkButton ID = "lnkDelete" Text = "Delete" CommandArgument  ='&lt;#% Eval("Game_RulesBooklet") %&gt;' runat = "server" OnClick = "DeleteFile" /&gt;
</code></pre>