Link to home
Start Free TrialLog in
Avatar of dpd3891
dpd3891Flag for United States of America

asked on

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

ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dpd3891

ASKER

Thank you very much kaufmed and CodeCruiser :)
Glad to help :-)
NP. Glad it solved your issue  : )