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");

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top