Hide One Element On Webpage When The User Will Print It?

Apr 4, 2011

the template of my website looks quite good when printed, so i have no separate print css.

However, there is one element at the top which is not needed when printed, and about 2 inches high, so that's kind of a waste at the top of the printed page (which imho distracts the user from the actual content)

So, what i want to accomplish, is 'hide' that element (div) at the top of the page when a user prints the page.

But so far the only solution i've seen is top create a separate css document which then will be used when the user will print my page. That sounds good, but do i now have to maintain 2 different stylesheets with exact the same content (besides that one div)?

Or is it possible to sort of override the standard stylesheet in the print stylesheet? (so i only have to define the exception for that one div in my print stylesheet?)

View 2 Replies


Similar Messages:

Hide Server Element Div In Javascript?

Jan 17, 2011

I have div in aspx page with the runat="server" attribute. How can I hide this element in javascript?

<div id="content" runat="server">

View 1 Replies

Hide Element If It Has No Child Elements?

Jan 8, 2010

I am trying to display elements in a web page using <li>. The structure of the page is as follows

<ul>
<li> (How to hide its visibility if this has no child elements)
<ul>
<li> item 1</li>
<li> item 2</li>
<li> item 3</li>
</ul>
</li>
</ul>

My question is if the li element has no child items how do I hide it. I need to do this dynamically. If I find that I have no records to display as <li> item </li>....I should be able to hide the parent <li>. One soultion is make the <li id="something" runat=server>

if the child elements are not be shown I tried doing childelement.parent.Visible = false.

View 1 Replies

Hide Element In ASP Based On Inside Repeater

Jan 5, 2010

I know how to use a simple If statement wrapped in the <%# tags to hide something, but I don't know how to do it in a repeater when I need to access Container.DataItem, as in I need the dataItem currently being 'repeated'

eg

if (CurrentValidationMessage.Link != "")
{
show a hyperlink
}
Markup:
<asp:Repeater ID="repValidationResults" runat="server">
<HeaderTemplate>
</HeaderTemplate>
<ItemTemplate>
<a href='<%# ((MttImportValidationMessage)Container.DataItem).EditLink %>'> Link to erroneous Milestone </a>
<%# ((MttImportValidationMessage)Container.DataItem).Message %>
<br />
</ItemTemplate>
</asp:Repeater>

View 2 Replies

Web Forms :: Using Value From SqlDataSource To Show / Hide Element?

Oct 21, 2010

I am in the process of re-developing my website into ASP.NET from a product called LogiXML. My background is in front end design using XHTML, CSS and Javascript with a good understanding of SQL so this is a HUGE leap for me.

In one of my Views I have created an asp data source to count the number of scheduled meetings:

<asp:SqlDataSource
ID="CountRS"
runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString
%>"
SelectCommand="
SELECT count(*) as countRS
FROM WebMeeting_Calendar
WHERE MeetingDate > getdate()
and MeetingType = 2
">
</asp:SqlDataSource>

Next, I created an asp panel where I wanted to control the "Visible" element by the value returned in the data source but even when using a simple 1 = 0 (to return False) is not working for me.... Basically, if the count of meetings is zero, I don't want the panel to show.

<asp:Panel
ID="Panel1"
runat="server" Visible="<%# 1 = 0
%>"
>
</asp:Panel>

View 1 Replies

How To Print A WebPage

Mar 31, 2010

am using c#.net. how to print a web page.

View 1 Replies

How To Print A Recordset From Webpage

Feb 3, 2010

I have created an asp.net web page that allows one to query a SQL Database and returns a recordset in a bound gridview. My question is how can I provide a means for the authorized webpage user to print the recordset out, in like a cvs text file? I need to be able to allow her to choose her printer, like in a regular print dialog box, and then to print the whole recordset, not just the page she's on.

View 3 Replies

How To Add Print Button On A Webpage

Aug 12, 2010

In my application, I have a tab container in the Details page. The tab container has three tabs. In each tab there are formview, gridview or detailsview. I want to have a print button in each tab to print the content of that tab only. How can I do that?

View 5 Replies

Print A ClientID In A Webpage?

Feb 17, 2011

How do I print an ASP clientID in a web page?

<td class="ColDatos" colspan="1"><asp:TextBox ID="FECHA_APLICACION" runat="server" Width="85%"></asp:TextBox>
<a href="javascript:alert('<%=FECHA_APLICACION.clientID %>')">
mostrar fecha
</a></td>

update: i need do print in the asp side, no code behind side(onload,oninit,etc)( I'm not familiar with asp terms)

View 3 Replies

C# - Capture Print Date And Hide Report?

Feb 27, 2011

I am displaying a crystal report that displays record for particular user.Requirement is like1. If Print of that report is taken out, then that user should not be visible that for 1 month (30 days to be precise). Hence if i print the report on Jan 1 2011 for user John Smith, that record for John Smith should not appear till Jan 30 2011, On Jan 31, that record should again come up in report.I'm usingVisual Studio 2005 (C#)
Crystal Report (Crystal Report viewer to view reports) My Query:How to capture print date? How should i proceed to fulfill my requirement?

View 1 Replies

Web Forms :: How To Print Option On Webpage

Jan 4, 2011

hw cn i give print option on web page like say i hv to print a marksheet in defined format.

View 3 Replies

How To Print A Certain Block / Part Of A Webpage

Feb 9, 2010

How can I print a certain block/part of a web page?

Print option to look like Print Screen functionality.

View 3 Replies

Create A Print Preview Webpage?

Sep 15, 2010

I wont to create a print preview asp.net web page.

View 2 Replies

SQL Reporting :: Hide 'Print' Button In Report Viewer?

Oct 5, 2010

i want to hide print button in report viewer by using javascript or with some CSS trick.

By default print button is visible. I don't want to hide by using 'ShowPrintButton' property.

View 2 Replies

Web Forms :: How To Print Page To A .pdf And Add Attachments From Webpage

Feb 7, 2011

I have a web page that displays a bunch of data in datagrids. One Data Grid even includes hyperlinks to documents the user has uploaded on the server that are specific to the data displaying. This all works reat, but there is still a manual process where the administrator needs to print the webpage that displayed to a .pdf, and if possible, merge in the uploaded documents that are hyperlinked to the data. I'm not even sure where to start on this. Is this something .NET can do?

View 2 Replies

How To Print Webpage Without Opening A Popup Window

Apr 16, 2010

I want to print a web page using javascript. But I do not want to open the page as a popup windows. How can I print directally a web page like 'mypage.aspx' using javascript window.print method without opening it as a popup window?

Also the condition is 'I dont want to use any Activex for this'

View 5 Replies

Vb.net - How To Print The Whole Webpage On Single Button Click Event

Feb 8, 2011

how to print the whole asp.net webpage on single button click event iusing VB ?

View 2 Replies

How To Print A Whole Webpage In A4 Size Paper Using Button Click Event

Feb 4, 2011

How to print a whole webpage in A4 Size Paper using asp.net / vb.net on button click event ?

I wanna print the Whole DIV tag and all the controls inside it ....

View 1 Replies

Crystal Reports :: Export / Print From Toolbar Just Displays Reportviewer Webpage Again

Jun 10, 2010

I'm having issues using the Print/Export functions from the CrystalReportViewer toolbar in Visual Studio 2005. In some cases, the print/export dialog window is simply replaced with the report page, instead of exporting/printing the data. Based on a dropdown box, the Report Document is loaded with a different report file:

If ddReport.SelectedValue = "Report-1" Then rptDoc1.Load(Server.MapPath("/Reports/Report1.rpt"))Else rptDoc1.Load(Server.MapPath("/Reports/Report2.rpt"))End If

View 1 Replies

Web Forms :: Hide Control Depending On Webpage?

Mar 27, 2010

How can I hide a control on a "Web Content Form" depending on what page is displaced.Working example. I have a control on a master page but I want this control to be hidden only when a particular page is loaded.

View 6 Replies

Remove/hide Browser Address Bar Or Toolbar Webpage?

Mar 15, 2010

I am creating web page using asp.net. Is it possible to remove/hide the browsers address bar or toolbar using Javascript for IE.

View 2 Replies

Html - Submenus Of The Menu Control Are Hide Behind The Webpage Images?

Feb 11, 2011

I am designing a website. I have created a simple menu(without sitemap) in master page and a web page called home.The problem is that when I hosted this website submenu's of the menu control are hide behind the images of home webpage and if the any webpage has no image all Submenus are appears. Have any problem in my menu creation. I have copy my code in this window but due to some reason it not shown.

<dynamichoverstyle BackColor="LightBlue" Font-Bold="true" />
</asp:Menu>

View 1 Replies

Controls :: Hide (Disable) Toolbars Button When Displaying PDF On Webpage?

Aug 18, 2015

how can we disable/hide pdf toolbar or buttons , which are at the right bottom corner of the webpage.

View 1 Replies

User Controls :: Show Hide Specific Section Of Page Based On User Type Or Role

May 7, 2015

I have LOGIN PANEL for student, and I want to disable it in different page. And only the admin can enable and disable it. I dont know the logic behind here.

View 1 Replies

Get Value Of Element In User Control?

Mar 16, 2011

I have a page that consists of addressbook user control I would like to have an access to the element of this user control in code behind.

This addressbook user control is consisting of several other user controls like this (if it does matter):

1- My asp page has addressbook user control

2- Addressbook user control is containing AddressVerification user control

3- AddressVerification is containing Address user control

4- Address user control has tbFirstName text box that I would like to get access to.

View 14 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved