It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Anyone done this in MVC? any info would be great!.
Thanks.
You can get pretty far simply by including a print.css file for media type print.
Hide everything you don't want and include logical page breaks and demensions (inches, etc... actually format more correctly using the print.css override).
I have used a custom controller (or filter) to handle links using something like index.print instead of index.html, which simply overrides the master layout with a layout more suitable for printing, but I still feel that the alternate stylesheet is the best way to go.
http://www.alistapart.com/articles/goingtoprint/
Printing a page isn't really a matter for ASP .NET or MVC. Printing is a client-side operation, and therefore can (and should) be done entirely in client-side code. JavaScript has a method call for this:
window.print()
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I want do use some of my own converter from html table to xls table, but I don't know where to start. The google don't show me comprehensive results. I know about Apache tika and poi, but do they have something easy to build converter? I used to read POI docs but it's just says about converting from xls-to-html most of time. What you will suggest to read. Where to search? Thank you.
It's a two-step process. I'd advise you to keep them separate.
Scrape and parse HTML to get table data
Write table data into Excel.
If the HTML is XHTML your life gets better: All you need is an XML DOM parser and some code to find the node at the root of the tree with the data.
I prefer Andy Khan's JExcel to POI. I think it's far better for dealing with Excel.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm about to start development of an application with Ruby on Rails, which requires to print stuff, mostly tickets.
I'm guessing the printer I use won't have much impact.
So the question is, what are the different things I should take into consideration with the printing? I'm thinking a normal ruby program should have communication with a printer.
The most portable solution here is for your Rails application to emit a PDF and then hand that off to either the browser for rendering and printing, or to inject it into a local print spooler.
There are a number of ways to get PDF out of Ruby depending on your requirements. The easiest method is to render HTML and use a library to convert it to PDF like PDFKit. A method with more control is one where you draw out the document using a library like Prawn.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm new to mvc, and i'm now trying to show a simple gridview which will be loaded from my sql server.
I can't even find the gridview in the toolbox.
i'm using the razor view engine.
example will be appreciated.
Thanks.
You mention mvc and toolbox. Those are incompatible concepts. You don't drag things out of the toolbox in MVC like you do in Web Forms. You type out various fields using html helpers.
While there is, in fact, a WebGrid available (quite a few actually), you would be better suited (at least initially) doing a manual table generation. Once you understand how it works, then you can move on to more advanced uses.
Any good MVC tutorial should have an example, such as MVC Music Store, or Nerd Dinner.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I am developing an app that allows users to post to walls/groups very much like facebook or a classic forum. I really like the way you can post a link on facebook and the link will be recognized as a video, pic, or other media and will automatically display. Its a great feature b/c it keeps users on facebook instead of leaving the site. On that note, I was looking to implement something similar for my the app I am developing. Are there any rails plugins/gems that do this kind of thing?
Yes, I know how to google and have done so. I realize that I could write regular expressions to scan the link and then take an according action. However, I am looking for an existing implementation to save a boat load of time.
Any and all input would be appreciated.
Existing implementations would probably be employing some form of regular expression, although another approach is using custom "Markdown" syntax or BB code to make the regular expression easier.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I am using an extension that depends on the page. I would like to use the extension for each board which means I need a board unique url. It currently looks like this
http://phpbb-site.com/forum/viewforum.php?f=BOARDNUMBER
I'd like to trick Firefox into having BOARDNUMBER in the location part of the url.
Then the extension will work and I won't have to tweak it. The problem is that I can't think of any way I can have Firefox use nice urls. I only need it to work on my computer. I don't own the site. What can I do? Can I use a proxy program? I was thinking maybe I could write a quick asp.net program which essentially does a GET request on the site and replaces all links to include the boardnumber and ignores that part of the url when making the request. It's probably a bad idea because I am sure lots can go wrong
Any ideas?
You should be able to do this using a simple script in Fiddler.