How to pass content of aspx to method

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I add logic to return the actual content of an aspx file in my method
below:

public override System.Web.Hosting.VirtualFile GetFile(string virtualPath)

{

//this is obviously not doing anything. I need to fill the 2nd
parameter below with the content retrieved from the file
\wwwroot\search\SearchResults.aspx
// MyVirtualFile(string virtualPath, string content)

return new MyVirtualFile("Search/", "I need to pass
SearchResults.aspx content here for the string parameter");

}
 
How about reading the file content using System.IO namespace?

How can I add logic to return the actual content of an aspx file in my
method
below:

public override System.Web.Hosting.VirtualFile GetFile(string
virtualPath)

{

//this is obviously not doing anything. I need to fill the 2nd
parameter below with the content retrieved from the file
\wwwroot\search\SearchResults.aspx
// MyVirtualFile(string virtualPath, string content)

return new MyVirtualFile("Search/", "I need to pass
SearchResults.aspx content here for the string parameter");

}
 
Back
Top