Author: coolguy2680 | Posted on: 7/10/2008 4:06:17 PM | Views : 776

i am not able to download a file here i have written code

protected void GridViewUpdatedSongs_RowCommand(object sender, GridViewCommandEventArgs e)

{

if (e.CommandName == "Song")

{

string SongPath = string.Empty;

SongPath = Server.MapPath(Request.ApplicationPath.ToString() + e.CommandArgument.ToString()); 

Response.Clear();

Response.ContentType = "application/octet-stream";

Response.Flush(); Response.TransmitFile(SongPath);

Response.End();

}

}

 

but after that it comes

 


The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.


An invalid character was found in text content. Error processing resource 'http://localhost:1354/WebSite6/user/home.aspx'. . ...

Go to the complete details ...