I have some information that I am dragging in my table from the DB. Can someone direct me in a tutorial which dynamically creates a file and allows the user to download that file with table content, all this should be dynamic Can anyone help me?
Thank you in advance :)
A dBML file using your database See the article -
Create a normal handler Handler ProcessViewer Do this in the event:
Public category MyData: IHttpHandler {public void ProcessRequest (HttpContext reference) {context.Response .contentType = "text / plain"; Context.Response.AddHeader ("content-displacement", "filename = \" myData.txt \ ""); (Var db = new DbDataContext) {var data = db.Table.ToList (); // Where to add (), orderbird (), etc. to filter and sort your data string field = delimiter = "\ t"; Foreign currency (different items in data) {context.Response.Write (item.Field1 + fieldDelimeter); Reference. response. Type (item. Field2 + field delimiter); Reference. response. Type (item. Field 3+ field delimiter); Reference. response. Type (item. Field 3+ field delimiter); Context.Response.Write (Environment.NewLine); }}}}
Comments
Post a Comment