How to display an html file inside Iframe --need u
Hello sir
I have to display an Html file inside Iframe, the path of html file is given by browse File control of dotnet. it display an html file correctly when it exist in my project folder . but it does not display the file when user browse from any other location.. So how can I display the file into Iframe..
following is my javascript function
function ShowPreview()
{
alert("file:///"+GetClientSideControl(document, 'FileUpload').value);
document.getElementById('htmlPreviewIFrame').src = GetClientSideControl(document, 'FileUpload').value;
// document.getElementById('htmlPreviewIFrame').src =
"file:///"+GetClientSideControl(document, 'FileUpload').value; // tried also like this
return false;
}
this function I called on click of Preview button.
<asp:ImageButton ID="imgbtnPreview" runat="server" ImageUrl="~/images/Preview.png"
OnClick="imgbtnPreview_Click" OnClientClick="return ShowPreview();"/></td>
and this is the browse file control
<asp:FileUpload ID="FileUpload" runat="server" Width="280px" />
please reply me soon sir..
|