call/execute aspx page from another aspx page on page load

Hello experts,

I have requirement that one program should call aspx page which is on server and I can access it as http://www.abcd.com/main/test1.aspx?ID=1&Date=2&No=3

That caller program should execute every 8 hr. I think I can use schedule task program for executing at every 8 hr interval.

My question is how to execute aspx page and what type of file will be for caller program, e.g. console application, or window application or web application.

My caller program reads txt file containg some lines, split that lines "|" and should pass three parameters which read from txt file to aspx page.  (line will be "1"|"5"|"7")
I have done some partial part as below:

Dim txtfile As String
Dim sfileReader As System.IO.StreamReader
Dim sInputLine As String
Dim Arr(3) As String
Dim ID As String
Dim No As String
Dim Date As String

txtfile = "c:\rawfile.txt"
sfileReader = System.IO.File.OpenText(txtfile)

Do Until sInputLine Is Nothing
sInputLine = sfileReader.ReadLine()
System.Console.WriteLine(sInputLine)
sInputLine = sfileReader.ReadLine()
sInputLine = sInputLine.Replace("""", "")
Arr = sInputLine.Split("|")
ID = Arr(0)
Date = Arr(1)
No = Arr(2)
Loop

till this point I have three parameters to pass

Thank you

dpd3891Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

käµfm³d 👽Commented:
Try this addition (you can do something with "page" if you like, but you don't have to):
Dim txtfile As String
Dim sfileReader As System.IO.StreamReader
Dim sInputLine As String
Dim Arr(3) As String
Dim ID As String
Dim No As String
Dim Date As String

txtfile = "c:\rawfile.txt"
sfileReader = System.IO.File.OpenText(txtfile)

Do Until sInputLine Is Nothing
sInputLine = sfileReader.ReadLine()
System.Console.WriteLine(sInputLine)
sInputLine = sfileReader.ReadLine()
sInputLine = sInputLine.Replace("""", "")
Arr = sInputLine.Split("|")
ID = Arr(0)
Date = Arr(1)
No = Arr(2)
Loop

Dim wClient As New System.Net.WebClient()
Dim url As String = String.Format("http://www.abcd.com/main/test1.aspx?ID={0}&Date={1}&No={2}", Arr(0), Arr(1), Arr(2))
Dim page As String = client.DownloadString(url)

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CodeCruiserCommented:
It would be a windows based app (console/winforms) and you can schedule it to run on the specified interval.
dpd3891Author Commented:
Thank you very much kaufmed and CodeCruiser :)
CodeCruiserCommented:
Glad to help :-)
käµfm³d 👽Commented:
NP. Glad it solved your issue  : )
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.