Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 16th, 2007, 02:16 AM
Authorized User
 
Join Date: Nov 2007
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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..

 
Old November 16th, 2007, 04:52 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

How is this related to the book ASP.NET Instant Results?

I think you're better off posting this in one of the HTML or JavaScript forums here at p2p.wrox.com.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Display Html file into IFrame(other contro vishnu108mishra ASP.NET 2.0 Professional 4 November 24th, 2007 01:07 AM
frame inside Iframe Dj Kat HTML Code Clinic 4 August 29th, 2007 03:53 AM
RadioListButton inside iFrame need help binici ASP.NET 2.0 Basics 1 May 11th, 2007 06:42 PM
viewing xml inside an html file Tomi XML 1 August 2nd, 2006 05:06 AM
close main window inside iframe crmpicco Javascript How-To 1 December 1st, 2005 12:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.