|
How can I display a PDF document in an ASP.NET page? I want to display the document while also having some input fields available. Would this ideally be a Frame application?
|
|
|
|
|
u need to add
<%
Response.ContentType = "application/pdf"
Response.Addheader "content-disposition", "inline; filename=YourFileName.doc"
%>
at top of the page...
ths will work
Thanks,
Ankur Bakliwal
|
|
|
|
|
yes this would be a Frame application
In the First Frame you can have TextBox
In the Second Frame you can add this code
FileStream fileStream = new FileStream("c:\\Admin.pdf", FileMode.OpenOrCreate, FileAccess.Read);
long len;
len = fileStream.Length;
Byte[] fileAsByte = new Byte[len];
fileStream.Read(fileAsByte, 0, fileAsByte.Length);
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.Buffer = true;
Response.ContentType = "application/pdf";
Response.BinaryWrite(fileAsByte);
Response.Flush();
Response.End();
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
sylvester_g_m@yahoo.com
|
|
|
|
|
You don't need all that, just point the src attribute of the second frame to the PDF file, assuming the web server returns the correct content-type (which it should) you're all sorted.
I wouldn't recomend using a frameset though, they're crap! A better way would be to embed an iframe (still on the frame theme but much better) in the page pointing to the PDF file (although I'm not 100% sure that would work but worth a try!)
|
|
|
|
|
i have a requirement of learning ajax recently. Now i dont know any scripting language, so to learn ajax do i need to learn any scipting lang. as javascript or something or i can directly go for ajax?
If u can give some useful information on it n ajax it will be appreciated.
i dont know whether this is the right column for posting this.
Plz guide.
Thank You.
Nekshan.
|
|
|
|
|
Ajax is javascript, therefore you will have to learn javascript.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
And usually a server-side language as well....
|
|
|
|
|
Not always, but yes the majority of the time you will/should.
Brad
Australian
- Captain See Sharp on "Religion"
any half intelligent person can come to the conclusion that pink unicorns do not exist.
|
|
|
|
|
I have to say that AJAX is not JavaScript.
AJAX can be achieved with the use of a client side scripting language, HMTL and DOM manipulation and some server side thingies...
AJAX stand for asynchronoous javascript and xml.
but still, you could achieve the same things with VB Script on the client (would only work in IE).
AJAX-like techniques exist since the very early stages of the web. Those days we used hidden frames to get the same effect. As a concept it is very old.
It got trendy nowadays coz Google used it on google maps and created a buzz around it.
|
|
|
|
|
No.
You are talking about Ajax-like development. If you wrote it in VB script then it would be close to the javascript version (well as close as VBscript gets anyway) but it would not be Ajax. The same applies for frame development.
And also web developers were using Ajax techniques a fair while before google was releasing beta versions of their products, they just made it semi-famous with end users and non web developers.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Bradml wrote: You are talking about Ajax-like development.
Yes I said that AJAX is not JavaScript. Coz strictly speaking, its a combination of JavaScript and XML, regardless how the XML is generated and then served to the client.
Bradml wrote: If you wrote it in VB script then it would be close to the javascript version (well as close as VBscript gets anyway) but it would not be Ajax.
I so totally agree. I said that you could achieve the same thing by using another client side scripting language.
Bradml wrote: And also web developers were using Ajax techniques a fair while before google was releasing beta versions of their products, they just made it semi-famous with end users and non web developers.
And I also said that developers used AJAX-like techniques since the early stages of web and that Google used proper AJAX in google maps and created a buzz around it and became popular.
Bradml wrote: No
So your "NO" is the answer to what?
|
|
|
|
|
I thought that Ajax was strictly XML too, but I was proved wrong about that.
but apart from that I guess we are on the same page then.
Brad
Australian
- Captain See Sharp on "Religion"
any half intelligent person can come to the conclusion that pink unicorns do not exist.
|
|
|
|
|
yes, there is JSON asell ;)
|
|
|
|
|
You need to understand HTML and CSS first.
Then understand the concepts of DOM.
Then learn JavaScript.
Then have a look at prototype (it will help you alot).
Understand some server side language. ASP, ASP.NET, PHP, JSP...
Understand HTTP and the 2 main request types.
Then think of some useful way of putting all of them together...
Apply them, and...
...da daaa!!!!
you have AJAX!
|
|
|
|
|
theJazzyBrain wrote: You need to understand
wait... are you being serious?
led mike
|
|
|
|
|
Ok, you might need to understand what magnetic flux is aswell.
hehe
but really, am I wrong?
|
|
|
|
|
theJazzyBrain wrote: but really, am I wrong?
Of course not! It's just that some large percentage of developers don't think you need to understand anything other than the syntax of the language you are using. And it's not just here on CP, I work with some of them.
led mike
|
|
|
|
|
we all do,
have a nice weekend!
|
|
|
|
|
Actually I am wrong...
forgot to mention XML!
You need to understand XML as well!
.... and forget about magnetic flux!
|
|
|
|
|
I recently made a new site
And I would appreciate it if some people would post some of there codes/scripts & Tutorials.
www.programscripts.info <<< That is the site. It would help alot.
Right now I'm Only doing 4 areas of coding.
PHP,
VB6
VB.Net
&
Web Developing. (html, css, java etc.)
Check it out & Help if you can thanks.
-- modified at 2:21 Saturday 17th February, 2007
|
|
|
|
|
Site is design very nicely.I have posted code in JavaScript.
All The Best.
|
|
|
|
|
Perhapsyou would get more participants if you made it easier to post articles?
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Ahh... What do you suggest? cause thought posting them on the forum was pretty easy. :P
And thank you varshavmane much appreciated
|
|
|
|
|
Heh, I think it would be better to have a "Post Article" button that leads to an Ajax client that will mean that posting an article is just a couple clicks away.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Hi All,
How can I get records for a limit in MS Access.
Let say, there are 2500 records are in table.
I want to fetch records from 1800 to 1900...
TOP clause coould not solve this problem....
Thanks in advance...
Suman Singh
|
|
|
|