So...lets try to clear this up...
You want to have
public class UploadSuccesBesked
{
public property string Messages;
}
and then set that in your class and show on the page...right?
It is not clear if this is MVC or what?
If it is, then
Message
becomes part of the model and all you need is to refresh the view and show the dialog (which will contain
@m.Message
...
if this is ASP.NET then you add the message to some public variable (or Session), read it in javascript and call showMessageDiv (which is already on the page, just hidden)
it would go (something) like this:
CSS:
.hidden {display: none;}
HTML:
<div id="msg-dialog" class="alert alert-success hidden">Upload <span id="msg"></span>/pre>
<pre lang="Javascript">$("#msg").val("<%=your server variable%>");
#("#msg-dialog").show();
You could do the same directly manipulating hidden panel server side just by adding
runat="server"
to the
div
.