Aug 10, 2010, 12:54 AM
[CLOSED] Export Data with Type= Load
Hey,
I have a button with Click event and type=load. I am trying to export some content. However, with Type=load present, I get error "Unterminated String literal" in Chrome or "Invalid Syntax : Missing Parathesis )" in FF. I remove Type=Load and everything works as expected.
The following is the markup and code :
I have a button with Click event and type=load. I am trying to export some content. However, with Type=load present, I get error "Unterminated String literal" in Chrome or "Invalid Syntax : Missing Parathesis )" in FF. I remove Type=Load and everything works as expected.
The following is the markup and code :
<ext:Button runat="server" Text="Export">
<DirectEvents>
<Click OnEvent="export" Type="Load" IsUpload="true"></Click>
</DirectEvents>
</ext:Button>
protected void export(object sender, DirectEventArgs e) {
this.Response.Clear();
this.Response.ContentType = "application/octet-stream";
this.Response.AddHeader("Content-Disposition", "attachment; filename=exportedData.csv");
byte[] b = Response.ContentEncoding.GetBytes("'Amit'");
this.Response.BinaryWrite(b);
this.Response.End();
//
}
Last edited by Daniil; Aug 12, 2010 at 10:33 AM.
Reason: [CLOSED]