good day
we are working on mvc webpage using c# and we are on the making of a getting php output to display on a mvc webpage. we have 1 page created in php with the filename "hello.php" and it displays "hello word"
we have place the code for calling the page in a usercontrol, but when place it in the site.master ad run it gives us the code of hello.php and not the "hello world.
our usercontrol code is as follows
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="System.IO" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
string file = Server.MapPath("Hello.php");
StreamReader sr;
FileInfo fi = new FileInfo(file);
string input = "";
if (File.Exists(file))
{
sr = File.OpenText(file);
input += Server.HtmlEncode(sr.ReadToEnd());
sr.Close();
}
Response.Write(input);
}
</script>
hope for anyone's response