iframe .net : How to pass Src="FileName"

Posted on 2013-01-24
Last Modified: 2013-02-13
Below is my code:

        If File.Exists(filename) Then
            lit1.Text = "<IFRAME NAME='embeddedFrame' WIDTH='90%' HEIGHT='90%' SRC='TTT.pdf'/>"
            lit1.Text = "file to load PDF file for printing please contact Admin"
        End If

This working fine.
but how do i pass SCR="Path+FileName" which is under my "C:\Temp:TTT.PDF".

Looking for Help.
Question by:Nettodotnet
LVL 22

Assisted Solution

Mrunal earned 100 total points
ID: 38815513
LVL 20

Assisted Solution

informaniac earned 100 total points
ID: 38815597
WIll the path be constant? i.e c:temp

Author Comment

ID: 38815986
Yes it is constant
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

LVL 10

Assisted Solution

by:Monica P
Monica P earned 100 total points
ID: 38817637
in asp page,

<iframe width=500 height=500 runat="server" id="myPDF" src="pdf_003.pdf"></iframe>

Open in new window

in page_load

dim filepath=Path+FileName

myPDF.Attributes.Add("src", filepath);

Open in new window

this will help u easily

Make below settings (if not shown in browser) to show the pdf file on browser ..
LVL 83

Accepted Solution

CodeCruiser earned 200 total points
ID: 38818281
The path has to be a virtual path(under you web directory) which can be accessed from a client browser. C:\Temp would not be accessible from a client browser unless it is configured with a virtual path.

Author Comment

ID: 38821066
with my c# program iam creating pdf file under earc user "C:\TEMP\abc.pdf" file.
in the program itself iam trying to load that pdf in to iframe.

Is some thing not woking in

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now