pdf in iframe
-
I can view a pdf document in html like: but when I put the same come to be dynamically written on a literal control on a button click like:
protected void Button1_Click(object sender, EventArgs e) { litShow.Text = ""; }
the pdf file is not displayed plz help_____________________________________________________ Yea! I could be wrong...
-
I can view a pdf document in html like: but when I put the same come to be dynamically written on a literal control on a button click like:
protected void Button1_Click(object sender, EventArgs e) { litShow.Text = ""; }
the pdf file is not displayed plz help_____________________________________________________ Yea! I could be wrong...
Did you check to see what IS rendered ?
Christian Graus Driven to the arms of OSX by Vista.
-
Did you check to see what IS rendered ?
Christian Graus Driven to the arms of OSX by Vista.
yes I do get the html code on 'view source' but the file is not displayed I tried with many files... Same result :( here is the html source
_____________________________________________________ Yea! I could be wrong...
modified on Sunday, January 18, 2009 8:32 AM
-
I can view a pdf document in html like: but when I put the same come to be dynamically written on a literal control on a button click like:
protected void Button1_Click(object sender, EventArgs e) { litShow.Text = ""; }
the pdf file is not displayed plz help_____________________________________________________ Yea! I could be wrong...
-
yes I do get the html code on 'view source' but the file is not displayed I tried with many files... Same result :( here is the html source
_____________________________________________________ Yea! I could be wrong...
modified on Sunday, January 18, 2009 8:32 AM
Oh, I see.
saud_a_k wrote:
C:\310001.pdf
This will only work if your server and client are the same machine, in other words, it will never work in the real world.
Christian Graus Driven to the arms of OSX by Vista.
-
saud_a_k wrote:
src="C:\\file.pdf"
You cannot quote a path like above. You should use path like http://<website>/folder/a.pdf If you still want to use the directory path then it should be like
src="file:///C|/file.pdf"
The server and client are the same machine I also used:
string myfile = AppDomain.CurrentDomain.BaseDirectory+"\\310001.pdf"; litShow.Text = "";
the file is in my bin folder, but I still cant see the file :(_____________________________________________________ Yea! I could be wrong...
-
The server and client are the same machine I also used:
string myfile = AppDomain.CurrentDomain.BaseDirectory+"\\310001.pdf"; litShow.Text = "";
the file is in my bin folder, but I still cant see the file :(_____________________________________________________ Yea! I could be wrong...
saud_a_k wrote:
string myfile = AppDomain.CurrentDomain.BaseDirectory+"\\310001.pdf";
This will return path as C:\<folder name(s)>\
saud_a_k wrote:
the file is in my bin folder, but I still cant see the file
You need to write is as:
AppDomain.CurrentDomain.BaseDirectory + "Bin\\310001.pdf"
-
saud_a_k wrote:
string myfile = AppDomain.CurrentDomain.BaseDirectory+"\\310001.pdf";
This will return path as C:\<folder name(s)>\
saud_a_k wrote:
the file is in my bin folder, but I still cant see the file
You need to write is as:
AppDomain.CurrentDomain.BaseDirectory + "Bin\\310001.pdf"
Thanx but it still does NOT show. I even tried making a html file with the iframe code and tried opening it in the main inframe it still does not show! Please try this.... I think its wierd create a simple html file that displays a pdf file in an iframe include the file as a part of the project on VS (i use 2005) now right click in the solution explorer and >> view in browser does it show? it doesn't for me.
_____________________________________________________ Yea! I could be wrong...