The status code returned from the server was: 500
<p>I have a feature in my site that is sending emails. I want to save the email details including the message that users typed in the database for historical purposes. Page uses validation for the fields and as such it throws an error: </p>

<p><code>"Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500".</code></p>

<p>Goggling this I've learned that this is to prevent potential hack of my site as well a database, which I can appreciate.</p>

<p>What do I need to do safely save the text in the database? Currently the datafiels is a <code>varchar(max)</code> and I use this to insert data: </p>

<pre><code>emailHistoryUpdated = _emailHistUpdate.InsertEmailHistory(_today, _name, txtSubject.Text, txtMessage.Text, txtFileUp.FileName, Session["iAm"].ToString()); which is my middle tear. I use the dataset created with VS2010 and stored procedure to communicate with the SQL server.
</code></pre>
