Microsoft Office Word in a web browser - c#

I want to have a Microsoft office word inside a web browser so that i can get the control to format the text and specify proper indentation. I don't want a client side to save the document.
It should be the same as http://www.asp.net/ajax/ajaxcontroltoolkit/samples/htmleditor/htmleditor.aspx but i want an additonal component i.e RULER to it.
Is there a way i can get that kind of control or a MSword control without save button.
Please Help

You won't be able to get a "Word Control" into a webpage (not least since that requires every user of your site to have a copy of Word installed), but you can look into something like CKEditor, which is a WYSIWYG editor written in Javascript/HTML. Getting a ruler in there may be difficult though.

What are you trying to do? I'm not sure what your question is, but what you are referring to is a WYSIWYG editor. There are many versions and options for embedding one in your web page. You mention one already. Here's some more:
TinyMCE
Markdown
YUI Editor

Yes, there is such a MS Office control called aceoffix. It works like calling MS Office from local machine and embeding it in web browser. Users can edit,view and save document online diretly. Developer can also customize these functions, such as disable the "save" button.

Related

Editing HTML file online from ASP.NET website

I have an ASP.NET website that is a panel for managing and sending e-mails. I want people to have an editor to changed what is in the template itself (which is writing in plain HTML.) in withing my site.
But, I don't want them to see the HTML. I just need them to edit the text and not touch the CSS/HTML to not destroy the look of it. Any tips or solutions that any one may know?
Use a free RichTextBox control in your project. You can find many open source or free controls out there.
Here's an example
http://www.freetextbox.com/
In this website you could find a list of controls that you could use.
You can use Ajax "HTMLEditior" or "HTMLEditiorExtender" for this
purpose
For what is HTMLEditor and how to use it follow this link
HTML Editor (AJAX Tool Kit)
Check ckeditor which has lot of editing features and your users can do almost everything. Also it supports inline editing.

How to give Csharp Webbrowser default Path to download files

I am making a web browser in C Sharp, I want that all the files downloaded by the user on this web browser from any web sites, web browser saves it in one default folder (i.e C:\Users\Abc\Downloads)
Currently when i try to download file from any url it pops up a dialogue box asking for path, and it is annoying thing to have so i just wants to give one default path where it just saves the file automatically without asking user for the path.
Like we have default download path for Mozila firefox and google whenever user download any file from the web browser it saves in one default folder. so how can I achieve this in .net 4.0 Csharp web browser.
I'm afraid you can't with the webbrowser control,
maybe take a look at
http://www.mono-project.com/WebBrowser
first you don't use IE, and you can do more if I'm right
Regards,
Corné
If you're using the WebBrowser control in c# this can be somewhat of a challenge, but have a look at this link which might help you, I've tried it myself with good results.
http://www.codeproject.com/Articles/31163/Suppressing-Hosted-WebBrowser-Control-Dialogs
Good Luck! :)
Edit:
You might want to look into this solution to your issue as well:
Automated filedownload using WebBrowser without url
:)

Preview generated PDF on page

I'm generating a PDF document in code-behind using Winnovative's HTML to PDF converter, and I would like to preview the document in a container on the page.
This is for an intranet application and all of the end users have the latest version of Reader installed, so compatibility is not an issue. The preview should be fully featured too, with the ability to zoom in and out, print, save, email, etc.
I've seen quite a few examples searching online, but I would appreciate some suggestions based on actual experience. Ideally, it would be great to find a server control with configurable options that can create the element(s) and register the necessary client scripts.
I think you just need the <embed> Tag. Put something like this in you page and you can show the users the PDF in the webpage itself.
<h3>Sample Pdf</h3>
<embed width="80%" height="80%" name="plugin" src="http://www.education.gov.yk.ca/pdf/pdf-test.pdf" type="application/pdf">
You will get all the features of Adobe Reader. Since its an Intranet app you should be able to Make sure Required Plugins are already installed on Client Machines.

Upload items from user computer to a server asp.net

I don't really know how to explain what I want to do.
I will try to explain what I am doing. I built a website in ASP.NET 4 (WebForms) and I want that my brother will be able to click on a button, choose a file from his computer and it will be uploaded to my server.
I have no idea how to do it. It sounds very hard to do and I am really stuck with this for a few days now.
I don't care if it will be with JavaScript, HTML or C#, I just really need it to work.
There's an ASP.NET control made just for that, the FileUpload control. Here's a handy example.
Note that it's notoriously difficult to style if you want to apply CSS and make it elegant, but there are more advanced ways around that. Also, this won't give your web application access to the client's local files or anything like that, it's just a standard file open dialog box for the user to select a file and upload it.
I also highly recommend doing a lot of input checking when accepting files. File type, file size, etc. are all important.
you have 2 options really.. use a traditional fileupload control (from the toolbox) or use the Ajax AsyncFileupload control.
either way it will allow your brother to upload a file from his computer to your server.

Control Printing in ASP.NET Page

I need to create a web application that prints checks. Because of the nature of the program, it needs to be very secure, and each action needs to be logged. I need to be able to generate a check, print a check, allow reprints if needed, etc.
I've got the generation of the checks completed. I've decided to make a PDF (so that i don't get any browser header/footer garbage). What I'd like to do is not even save that PDF to a file but to instead send the data directly to a printer. Basically, I'd like for the user to enter the amount of the check, select which account it's going to be printed for, then click a button that sends the data for that check directly to the printer. I don't even want the user to be able to view the PDF of what's to be printed.
Has anyone done something similar to this in ASP.NET?
Thanks.
[EDIT]
The original question I asked was answered with ActiveX controls. I, however, decided to do it a different way. Instead of printing a PDF, I've decided to create an image of the background of the check. I will then use that image (.jpg), and manipulate it by placing the appropriate text (MICR line, amount, check date, etc.) on it using System.Drawing.Graphics and stored X,Y coordinates and font preferences in my DB. From there, I can use the System.Drawing.Printing namespace to send the new .jpg file to a network printer from the web server, eliminating the need for an activeX control and further tightening security because the new image of the finished check is never saved, and the user never has access to the overlay of the check.
Thanks for your help.
If you look at how postal services tackle this problem, you'll notice that a simple web application won't do. To have control over how and when items are sent to the printer, ActiveX compontents or Java software is used.
[Edit]
Small clarification: I ment that the software has to run on the client-side as opposed to your suggested server-side suggestion.
If you want to go the .NET route, you're down to an ActiveX in Managed C++ or a Click-Once application that is launched from the web (allows more of the .NET language, but can be decompiled and altered).
We have implemented this scenario in a couple of ways. First, we have the traditional PDF solution, where the server generates the PDF print image, returns it to the browser which is then displayed via the PDF plug-in and optionally printed.
Second, we wrote a client-side ActiveX component to handle the print. Pass the input values to a backend web service which uses FOP to format the print into PCL. The PCL is passed back to the ActiveX component who then sends the PCL directly to the users default printer. No PDF required here.
Either way works, but only the second option - which will require you to implement some client-side piece - meets all your requirements.
There isn't really a way to do this. You can only send a document to the user which the user can then send to the printer. There are ways to prompt the print dialogue to pop straight up, but the web would be pretty insecure if you were allowed to control how data was managed on the user's machine.
NKCSS is right that it would require software actually installed on the user's machine. You have done as much as you can by making it a PDF that the user is prompted to print.
If you had the cheque as html, you can used styles to show/hide content just for the printer as discussed in this post: here
There's no way to do this completely securely. Even if you force the PDF to print directly to the user's default printer, that itself could be a PostScript or PDF printer like PDFCreator. So they could still get a viewable PDF in the end.

Categories