|
God give you the ability for helping us ,,,
I appreciate you efforts ,, and really thanks
jooooo
modified on Wednesday, April 30, 2008 6:35 AM
|
|
|
|
|
First off, I am sorry to post this question. I promise I did search for exactly what I needed concerning my particular interest but I can only find issues and comments that are beyond what I need.
My simple problem is that I have a windows app written in C# that will display a PDF file, in Adobe, using Process (opening the app externally). I pass the file name in the Process.StartInfo.Argument value. Everything works well, but now I am asked to do this in a web page.
I have searched for just a simple way to display a pdf file in a web page (aspx) and cannot find a tutorial, comment or any thing. Everywhere I have search usually had to do with converting or something else that is more than what I need.I don't have to do any conversions or special rendering, I just have to pass the .pdf file name somewhere so that the page can display it.
Any help would be greatly appreciated.
|
|
|
|
|
Basically, you need your user to have Acrobat, just like your windows app. You can just link to a PDF and the browser should open it, or you can set the content type and use response.binarywrite to pass a pdf down in response to a page event.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
As always thank you for your help. It works great both ways.
Take care Mr. Graus.
|
|
|
|
|
I have a hidden panel where I have a TextBox. When the panel is displayed, the TextBox loses focus.
I say loses because if the panel is initially displayed, then the TextBox gets the focus. But if you hide it, then come back (show it), focus from the TextBox is gone.
FYI, I'm also using AJAX's UpdatePanel around these.
Any idea?
Thanks.
Ekjon
|
|
|
|
|
How are you maitaining the Focus for textbox ?
Could u post the code for focusing the TextBox ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Dude ...i Suggest You ..to do the task by Java Script Take a pannel as u have done so and a button when button one is click call a function in javascript check the property of panel as document.getElementById('panel1').style.display == ""
if yes make it equal to none
if not make it equal to ""
and after this statement add document.form1['TextBox1.focus();
work is over ...
i suggest you to work on code do not rely on ajax
Happy Programming
Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.
|
|
|
|
|
Hi Sandeep,
Thanks for your response.
Both in the Page Load and the Click event handler for my link button, I have the following:
<br />
if (pnlSearch.Visible == true)<br />
{<br />
form1.DefaultFocus = "txtSearch";
}<br />
Ekjon
|
|
|
|
|
Are you using the UpdatePanel to hide the TextBox, i.e. setting Visibility to false on the TextBox (or any control containing the TextBox)?
In that case, you are not really hiding the TextBox, but actually removing it. When you show it again, a new TextBox (which is identical to the previous) is added to the page. As it's not even the same TextBox, it can naturally not keep focus.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
So, what's the solution?
There must be some.
|
|
|
|
|
I have data in fields in a form and I want to have a button that when I click the button it will create a pdf report with
the data from the fields in the pdf report. I'm not sure what way to code this.
Anyone know how to do this?
macca
|
|
|
|
|
Your best bet is to use some reporting engine to create your reports, then they can be output to PDF. CrystalReports, ActiveReports, Sql Server Reporting Services all have solutions. Or just search google for "pdf report" and you'll find many solutions which are compatible with your platform.
|
|
|
|
|
|
Hi
I have a javascript function which at the moment is set for the mouseover in my div tag
I would like to control this function through my c# for checkchange of a checkbox
How would I do this?
thanks!
|
|
|
|
|
How do you want to "control" the function?
The server code and the client script doesn't exist at the same time, and not at the same place. The server code is run to create the html document, which is then sent to the browser, where the Javascript code is started.
You can send information from the script to the server when the browser is sending a request to the server. From the server code you can put things in the page, that will become part of the client script when the page is loaded in the browser.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
you can type code as checkbox's click method:
ClientScript.RegisterClientScriptBlock(this.GetType(), "control", "you function");
I love li li huang ,
ha ha ,
but you don't who is she!
|
|
|
|
|
cannot CreateObject("com.sun.star.ServiceManager")
--------------------------------------------------------------------------------
The error I get while running <varname> = CreateObject("com.sun.star.ServiceManager") is cannot create ActiveX object
I have got this working while running in dev mode (ie able to step through code) which means the worker process is running as the person I am logged in with (in this case Administrator), but when I access the page from another machine (on the same network) it falls over with cannot create ActiveX object on the line varname = CreateObject("com.sun.star.ServiceManager")
I think this is down to premission issues of the network user, so I have allowed network user permissions to open office in dcom+ which didnt solve it. I then tralled the registry giving permissions for anything with regards to openoffice and writer, still to no avail.
Has anyone out there experienced a similar issue? More importantly did you manage to get it resolved??
Details: Win2k3 server; ASP.NET 2.0; VS Express Edition 2008; IIS6.0
Thanks for any help offered.
|
|
|
|
|
What are you trying to do, and what programming language are you using?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi Guffa,
I am trying to count the number of pages in a document and return the value to a variable. I am using ASP.NET (VB) running ASP.NET 2.0 on IIS6.0 Win2k3. I have acheived this result when running the code as an Administrator, the problem comes in when running the code as Network Service which indicates a permissions issue of some sort?
What do you think?
Justin
|
|
|
|
|
Going by the CreateObject function he has mentioned, it looks like he is trying to do some automation stuff either with StarOffice or OpenOffice.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
|
Either the classID is not registered properly (installation issue) or Permissions problem for ASP.NET?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Hi Vasudevan,
I think it is a permissions issue persoanlly, but am completely open to suggestions for things to try.. The reason I think it's permissions is because when running the code under an administrator it works fine (ie creates the object) and continues running the code. Your thoughts?
Justin
|
|
|
|
|
Check out this thread:
http://www.oooforum.org/forum/viewtopic.phtml?t=13948[^]
LarsB (OOO Advocate) seems to be highlighting on a solution like tweaking the processmodel of ASP.NET.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Thanks I'll have a look at it tonight and post the results. Hopefully I'll have some good news (well for me at least) to post!!
|
|
|
|