Click here to Skip to main content
15,917,538 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have I-Frame Control in my aspx page
and my project path is on C drive
and i want to give a F Drive path to I frame control as a source. so how can i do these thing?
Posted

1 solution

you can create aspx page to render html by reading the content of given path. for example

C#
protected void Page_Load(object sender, EventArgs e)
{
    string file = Request.QueryString["file"];
    Response.Write(File.ReadAllText(Path.Combine(@"D:\share", file)));
}


we send file name to this page as QueryString and we can read the file from some other drive and write to response.
now we have page which can give as src property of ifram like below

ASP.NET
<iframe id="if1" runat="server" src="Default.aspx?file=HTMLPage1.htm"></iframe>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900