Saturday, 24 November 2007

Page Breaks in HTML using CSS

Page breaks in HTML are very useful to produce meaningful prints of web pages. I was searching for some good material on this.

Found following information which may be useful.

'page-break-before'
Value: auto | always | avoid | left | right | inherit
Initial: auto
Applies to: block-level elements
Inherited: no
Percentages: N/A
Media: visual, paged
Computed value: as specified

'page-break-after'
Value: auto | always | avoid | left | right | inherit
Initial: auto
Applies to: block-level elements
Inherited: no
Percentages: N/A
Media: visual, paged
Computed value: as specified

'page-break-inside'
Value: avoid | auto | inherit
Initial: auto
Applies to: block-level elements
Inherited: yes
Percentages: N/A
Media: visual, paged
Computed value: as specified

Values for these properties have the following meanings:

auto - Neither force nor forbid a page break before (after, inside) the generated box.
always - Always force a page break before (after) the generated box.
avoid - Avoid a page break before (after, inside) the generated box.
left - Force one or two page breaks before (after) the generated box so that the next page is formatted as a left page.
right - Force one or two page breaks before (after) the generated box so that the next page is formatted as a right page.

For more detailed understanding go through the link below.

Source - http://www.w3.org/TR/CSS21/page.html

Good Luck with printing web pages !

Wednesday, 21 November 2007

Some useful ASP.Net URL Path code

System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath
-Gets the root virtual path of the application

Request.AppRelativeCurrentExecutionFilePath
- Relative path with ~/

Request.CurrentExecutionFilePath
- The virtual path of the current request

Request.ApplicationPath
- The virtual path of the current application.

Request.FilePath
- The virtual path of the current request.

Request.Path
- The virtual path of the current request.

Page.ResolveUrl
- Converts that is useful for requesting from client.

Friday, 16 November 2007

A Simple method for implimenting Ajax

- Author gave full source code
- 3 Vidoes give some introduction

Easy to study and make your own.

http://www.killerajax.com