Category : Uncategorised

I’m trying to create a dockerized asp.net MVC application that talks to a postgresql database in another docker container. I used the "Enable Docker" checkbox in VS2019 when I created my project. When I debug the application using Docker (as opposed to IISExpress) I can not communicate with my database. Connection string, which does work ..

Read more

The code I used to export to pdf does not work. It doesn’t show any errors so I don’t what the problem is. public void ExportGridToPDF() { Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", "attachment;filename=GridViewExport.pdf"); Response.Cache.SetCacheability(HttpCacheability.NoCache); StringWriter sw = new StringWriter(); HtmlTextWriter hw = new HtmlTextWriter(sw); GridView1.RenderControl(hw); StringReader sr = new StringReader(sw.ToString()); Document pdfDoc = new Document(PageSize.A4, 10f, ..

Read more