Smoerble
asked on
How to include external file w. params?
I have an ASPX file.
I can use VB or C# in it.
I want to include the HTML returned by a php file.
So i tried this:
<!-- #Include File="/warplaner/Runner.ph p?filename =warplaner /newsexpor t.php&lang uage=de" -->
error message:
"Illegal characters in path."
Please:
How can I include a file with parameters like above?
Thank you.
Smo
I can use VB or C# in it.
I want to include the HTML returned by a php file.
So i tried this:
<!-- #Include File="/warplaner/Runner.ph
error message:
"Illegal characters in path."
Please:
How can I include a file with parameters like above?
Thank you.
Smo
ASKER
Sorry, I can't get this running.
Can you please give me the full page code? It will be an ASPX page, so I need the language definition and maybe even includes of classes?
Can you please give me the full page code? It will be an ASPX page, so I need the language definition and maybe even includes of classes?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thx a lot greenguy!
I would have rated this posting with a AA++, but unfortunately there's only a normal A possible :D.
Thanks again, this helped so much!
Have fun, bye
Michael
I would have rated this posting with a AA++, but unfortunately there's only a normal A possible :D.
Thanks again, this helped so much!
Have fun, bye
Michael
Thanks!
http://dotnetjunkies.com/Forums/ShowPost.aspx?PostID=5481
I have a function that reads a web page via HTTP and returns a string with it's results - it works well for me in these situations:
public string ReadWebPage( string url )
{
string http = "";
if(url.IndexOf("http://")!=0)
{
url = "http://" + url;
}
WebRequest objRequest= HttpWebRequest.Create(url)
StreamReader sr = new StreamReader( objRequest.GetResponse().G
string result = sr.ReadToEnd();
sr.Close();
return result;
}
To use it, just create a label on your page where you want the text to appear, and in your page_Load, put:
Label1.Text = ReadWebPage("SomeUrlWithPa
There are a few other ways of reading a web page, and I'm not sure how this compares in performance to other methods, but I've never had a problem.
You can also cache the results of each request, which will minimize the time it takes to get the PHP page contents back on subsequent requests.