I'm trying to download a .pdf file using web browser
The thing is the .pdf file does not have a direct link because the website creates the pdf file according to the user input and then replies with the pdf
Code included which fills all the data and clicks next when needed
After I fill the data with my code and click on download a new page on internet explorer opens and nothing happens instead of downloading the file
How can I download the pdf file through my program
Here is my code
Imports System.Net
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
WebBrowser1.Navigate("https://www.misim.gov.il/gmIshurim/firstPage.aspx")
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
WebBrowser1.Document.GetElementById("rbMeshalem").InvokeMember("click")
WebBrowser1.Document.GetElementById("btnNext").InvokeMember("click")
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
WebBrowser1.Document.GetElementById("txtMisTikMeshalem").SetAttribute("value", "510001001")
WebBrowser1.Document.GetElementById("txtTik1").SetAttribute("value", "510000367")
WebBrowser1.Document.GetElementById("btnNext").InvokeMember("click")
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
WebBrowser1.Document.GetElementById("cbSelectAll").InvokeMember("click")
WebBrowser1.Document.GetElementById("btnPrintIshur").InvokeMember("click")
End Sub
End Class