Assign ASP.net Button image via css class - c#

I know i can use imagebutton for image buttons. But i want to use css sprites to decrease downloaded image count. So i want to assign normal buttons to image via css class. But it seems like not working.
Here is the code and image i try
the button codes
<asp:Button ID="btn1" CssClass="filter-tr" runat="server" />
<br />
<br />
<br />
<asp:Button ID="Button2" CssClass="filter-en" runat="server" />
<br />
<br />
<br />
<asp:Button ID="Button3" CssClass="flying" runat="server" />
<br />
<br />
<br />
<asp:Button ID="Button1" CssClass="fire" runat="server" />
here the css class code
.filter-tr, .filter-en, .flying, .fire
{ display: block; background: url('images/image1.png') no-repeat; }
filter-tr { background-position: -0px -0px; width: 60px; height: 25px; }
filter-en { background-position: -0px -25px; width: 60px; height: 25px; }
flying { background-position: -0px -50px; width: 44px; height: 16px; }
fire { background-position: -0px -66px; width: 44px; height: 16px; }
but this way it works
.filter-tr { display: block; background: url('images/image1.png') no-repeat; background-position: -0px -0px; width: 60px; height: 25px; border-width:0px; }

The first thing I'd do is set the background URL to use an absolute location:
.filter-tr, .filter-en, .flying, .fire
{ display: block; background: url('/images/image1.png') no-repeat; }
Without more information, that's all the help I can provide.
Edit
Should have noticed it before. Class names all need to have a . in front of them:
.filter-tr { background-position: -0px -0px; width: 60px; height: 25px; }
.filter-en { background-position: -0px -25px; width: 60px; height: 25px; }
.flying { background-position: -0px -50px; width: 44px; height: 16px; }
.fire { background-position: -0px -66px; width: 44px; height: 16px; }

This works
.filter-tr
{
display: block;
background: url('images/image1.png') no-repeat;
background-position: -0px -0px;
width: 60px;
height: 25px;
}
.filter-en
{
display: block;
background: url('images/image1.png') no-repeat;
background-position: -0px -25px;
width: 60px;
height: 25px;
}
.flying
{
display: block;
background: url('images/image1.png') no-repeat;
background-position: -0px -50px;
width: 44px;
height: 16px;
}
.fire
{
display: block;
background: url('images/image1.png') no-repeat;
background-position: -0px -66px;
width: 44px;
height: 16px;
}

Related

the Hover on button is not working in asp.net c#. Please read the description below

I hope someone can help me, i'm stuck. What I want to do is that I have a set of button. All I want is that when I hover on Button SPA, the buttons Pro1, Proii and Proiii changes color. I know since the div are nested maybe that is why the code is not working or you can provide me with some alternate Solution.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<%--<link href="Scripts\table.css" rel="stylesheet" type="text/css" />--%>
<link/ rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"/>
<style>
.custom_button {
background-color: black;
color: white;
padding: 10px 10px;
border: 1px solid black;
text-decoration: none;
}
#btnSpa:hover ~ #btnPro1,
#btnSpa:hover ~ #btnProii,
#btnSpa:hover ~ #btnProiii {
background-color: white;
color: black;
padding: 10px 10px;
border: 1px solid black;
text-decoration: none;
}
.container {
height: 200px;
position: relative;
border: 3px solid green;
}
.superleft {
margin: 0;
position: absolute;
top: 50%;
left: 10%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.left {
margin: 0;
position: absolute;
top: 25%;
left: 25%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.leftt {
margin: 0;
position: absolute;
top: 50%;
left: 25%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.leftdown {
margin: 0;
position: absolute;
top: 75%;
left: 25%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.middletop {
margin: 0;
position: absolute;
top: 25%;
left: 50%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.middle {
margin: 0;
position: absolute;
top: 50%;
left: 50%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.middledown {
margin: 0;
position: absolute;
top: 75%;
left: 50%;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div class="container">
<div class="superleft">
<asp:Button ID="btnSpa" runat="server" class="custom_button" Text="SPA"/>
</div>
<div class="left">
<asp:Button ID="btnPro1" runat="server" class="custom_button" Text="Pro1" />
</div>
<div class="leftt">
<asp:Button ID="btnProii" runat="server" class="custom_button" Text="Proii"/>
</div>
<div class="leftdown">
<asp:Button ID="btnProiii" runat="server" class="custom_button" Text="Proiii"/>
</div>
<div class="middletop">
<asp:Button ID="btnPro2" runat="server" class="custom_button" Text="Pro2" />
</div>
<div class="middle">
<asp:Button ID="btnPro2i" runat="server" class="custom_button" Text="Pro2i" />
</div>
<div class="middledown">
<asp:Button ID="btnPro2ii" runat="server" class="custom_button" Text="Pro2ii" />
</div>
</div>
</form>
</body>
</html>
When the asp.net renders the controls he changes the ID that you see on field ID="btnPro12" because this is the asp.net control to id to access it from code behind
To get the rendered on page control id you have to use this code <%=btnPro12.ClientID%> on each point that you have to use the client rendered id.
so change that on your code to make it work. One other way to debug this is to see the source code of the rendered page - there you can check if every id is correct used.
related : Accessing control client name and not ID in ASP.NET

Telerik Report not updating

I'm trying to use Telerik Q3 Reporting
When I'm changing anything in the report like a textbox's text it didn't reflect at runtime or preview, I make the report viewer EnableViewState=False but no reflection
<%# Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeBehind="Default.aspx.cs" Inherits="NoranReporting._Default" %>
<%# Register Assembly="Telerik.ReportViewer.WebForms, Version=7.2.13.1016, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
Namespace="Telerik.ReportViewer.WebForms" TagPrefix="telerik" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<telerik:ReportViewer ID="ReportViewer1" runat="server" ZoomMode="FullPage"
EnableViewState="False" Height="100%" ProgressText="يتم تجهيز التقرير..."
Width="100%" ></telerik:ReportViewer>
</asp:Content>
This is picture from design
http://postimg.org/image/41b4o3yu5/
and this is picture from runtime
http://postimg.org/image/htpjjqplp/
And why the report height is to small like this?
I tried
ZoomMode="FullPage" Height="100%"
but as you can see in the picture, it didn't work
Master Page:
<%# Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="NoranReporting.SiteMaster" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head runat="server">
<title></title>
<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form runat="server">
<div class="page">
<div class="header">
<div class="title">
<h1>
My ASP.NET Application
</h1>
</div>
<div class="clear hideSkiplink">
<asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal">
<Items>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/>
<asp:MenuItem NavigateUrl="~/About.aspx" Text="About"/>
</Items>
</asp:Menu>
</div>
</div>
<div class="main">
<asp:ContentPlaceHolder ID="MainContent" runat="server"/>
</div>
<div class="clear">
</div>
</div>
<div class="footer">
</div>
</form>
</body>
</html>
Css File:
/* DEFAULTS
----------------------------------------------------------*/
html#html, body#body, form#form1, div#content, center#center
{
border: 0px solid black;
float:right;
height: 100%;
}
body
{
background: #b6b7bc;
font-size: .80em;
font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif;
margin: 0px;
padding: 0px;
color: #696969;
}
a:link, a:visited
{
color: #034af3;
}
a:hover
{
color: #1d60ff;
text-decoration: none;
}
a:active
{
color: #034af3;
}
p
{
margin-bottom: 10px;
line-height: 1.6em;
}
/* HEADINGS
----------------------------------------------------------*/
h1, h2, h3, h4, h5, h6
{
font-size: 1.5em;
color: #666666;
font-variant: small-caps;
text-transform: none;
font-weight: 200;
margin-bottom: 0px;
}
h1
{
font-size: 1.6em;
padding-bottom: 0px;
margin-bottom: 0px;
}
h2
{
font-size: 1.5em;
font-weight: 600;
}
h3
{
font-size: 1.2em;
}
h4
{
font-size: 1.1em;
}
h5, h6
{
font-size: 1em;
}
/* this rule styles <h1> and <h2> tags that are the
first child of the left and right table columns */
.rightColumn > h1, .rightColumn > h2, .leftColumn > h1, .leftColumn > h2
{
margin-top: 0px;
}
/* PRIMARY LAYOUT ELEMENTS
----------------------------------------------------------*/
.page
{
width: 960px;
background-color: #fff;
margin: 0px auto 0px auto;
border: 1px solid #496077;
}
.header
{
position: relative;
margin: 0px;
padding: 0px;
background: #4b6c9e;
width: 100%;
}
.header h1
{
font-weight: 700;
margin: 0px;
padding: 0px 0px 0px 20px;
color: #f9f9f9;
border: none;
line-height: 2em;
font-size: 2em;
}
.main
{
padding: 0px 12px;
margin: 12px 8px 8px 8px;
min-height: 420px;
width:100%;
height:100%;
direction:rtl;
}
.leftCol
{
padding: 6px 0px;
margin: 12px 8px 8px 8px;
width: 200px;
min-height: 200px;
}
.footer
{
color: #4e5766;
padding: 8px 0px 0px 0px;
margin: 0px auto;
text-align: center;
line-height: normal;
}
/* TAB MENU
----------------------------------------------------------*/
div.hideSkiplink
{
background-color:#3a4f63;
width:100%;
}
div.menu
{
padding: 4px 0px 4px 8px;
}
div.menu ul
{
list-style: none;
margin: 0px;
padding: 0px;
width: auto;
}
div.menu ul li a, div.menu ul li a:visited
{
background-color: #465c71;
border: 1px #4e667d solid;
color: #dde4ec;
display: block;
line-height: 1.35em;
padding: 4px 20px;
text-decoration: none;
white-space: nowrap;
}
div.menu ul li a:hover
{
background-color: #bfcbd6;
color: #465c71;
text-decoration: none;
}
div.menu ul li a:active
{
background-color: #465c71;
color: #cfdbe6;
text-decoration: none;
}
/* FORM ELEMENTS
----------------------------------------------------------*/
fieldset
{
margin: 1em 0px;
padding: 1em;
border: 1px solid #ccc;
}
fieldset p
{
margin: 2px 12px 10px 10px;
}
fieldset.login label, fieldset.register label, fieldset.changePassword label
{
display: block;
}
fieldset label.inline
{
display: inline;
}
legend
{
font-size: 1.1em;
font-weight: 600;
padding: 2px 4px 8px 4px;
}
input.textEntry
{
width: 320px;
border: 1px solid #ccc;
}
input.passwordEntry
{
width: 320px;
border: 1px solid #ccc;
}
div.accountInfo
{
width: 42%;
}
/* MISC
----------------------------------------------------------*/
.clear
{
clear: both;
}
.title
{
display: block;
float: left;
text-align: left;
width: auto;
}
.loginDisplay
{
font-size: 1.1em;
display: block;
text-align: right;
padding: 10px;
color: White;
}
.loginDisplay a:link
{
color: white;
}
.loginDisplay a:visited
{
color: white;
}
.loginDisplay a:hover
{
color: white;
}
.failureNotification
{
font-size: 1.2em;
color: Red;
}
.bold
{
font-weight: bold;
}
.submitButton
{
text-align: right;
padding-right: 10px;
}
i uploaded a project sample with db sample here is the link:
https://www.wetransfer.com/downloads/add6db1cf706b3b044515342a0deb8ed20140521092303/3d5b86d6b747eddcc8861d858c32711d20140521092303/c08aab
Here is a sample Project with sample DB
I use VS 2013
SQL 2008
Telerik DevCraft Ultimate Q3 2013
1-The Main problem that the text box's text not updated even at preview tab of report
at the design mode text box's value is "تقرير تفصيلى "
but at run time or preview it viewed the text box's text "Report1"
2-the viewer is not 100% height of page
Could you post the code for the Master page it looks to me like the BodyContent is too small for the report viewer, you can see the scroll bar for the report on the left.

iTextSharp aspx to pdf, Server.Execute error

In ASP.net I have made webpage which is used to fill in an offer form.
There are 3 divs. The left div which has the TextBoxes to fill in.
The middlesector which is the form itself.
The right div which has the buttons.
So far I've been able to export only the midlesector to PDF with the stuff I filled in on the left and all. The problem is that it completely neglects the CSS, which has been made using absolute positioning. Therefore I would like to ask how to include the CSS style so that it looks the way it's supposed to instead of one continuous text.
This is the code for the middlesector:
<div id="middlesector" runat="server">
<%--><asp:GridView ID="GridView1" runat="server"></asp:GridView>--%>
<asp:Image ID="TextArea1" runat="server" ImageUrl="Images\VisserGroup.png"></asp:Image>
<label id="textarea2" runat="server" cols="20" name="S2"></label>
<label id="textarea3" runat="server" cols="20" name="S3">Visser International Trade & Engineering</label>
<label id="textarea4" runat="server" cols="20" name="S4">T.a.v</label>
<label id="textarea5" runat="server" cols="20" name="S5">Postbus</label>
<label id="textarea6" runat="server" name="S6"></label>
<label id="textarea7" runat="server" cols="20" name="S7"></label>
<label id="textarea8" runat="server" cols="20" name="S8"></label>
<label id="textarea9" runat="server" name="S9"></label>
<label id="textarea10" runat="server" cols="20" name="S10"></label>
<label id="textarea11" runat="server" cols="20" name="S11"></label>
<label id="textarea12" runat="server" cols="20" name="S12">-OFFERTE-</label>
<label id="textarea13" runat="server" name="S13">Geachte</label>
<label id="textarea14" runat="server" name="S14"></label>
<label id="textarea15" runat="server" cols="20" name="S15">Met referte aan het aangename onderhoud hebben wij het genoegen u bijgaand onze offerte te doen toekomen voor het leveren van:</label>
<label id="textarea16" runat="server" cols="20" name="S16"></label>
<label id="TextArea17" runat="server" cols="20" name="S17">Wij danken u voor deze aanvraag en hopen u hiermee een passend voorstel te hebben gedaan. Voor het bespreken van verdere details en toelichting op de offerte zullen wij op korte termijn contact met u opnemen. Indien u direct uw eventuele vragen aan ons wenst voor te leggen dan horen wij dit graag van u.</label>
<label id="TextArea18" runat="server" cols="20" name="S18">Wij vertrouwen u hiermee voldoende van dienst te zijn en houden ons van harte aanbevolen voor uw gewaardeerde opdracht.</label>
<label id="TextArea19" runat="server" cols="20" name="S19">Met vriendelijke groet,Visser Supplies B.V.</label>
<label id="TextArea20" runat="server" cols="20" name="S20">Personal info</label>
<label id="TextArea21" runat="server" cols="20" name="S21">Website : www.vissersupplies.nl</label>
<label id="TextArea22" runat="server" cols="20" name="S22">E-mail : personal info</label>
<label id="TextArea23" runat="server" cols="20" name="S23">Telefoonnummer : personal info 9894</label>
<label id="TextArea24" runat="server" cols="20" name="S24">Copyright Visser Supplies B.V.:</label>
<label id="TextArea25" runat="server" cols="20" name="S25">Deze offerte en alle andere informatie mogen alleen door geadresseerde gebruikt worden. Overdracht aan derden, in welke vorm dan ook, is slechts toegestaan na schriftelijk toestemming van Visser Supplies B.V.</label>
</div>
Here is the CSS:
#middlesector {
position:absolute; left: 150px; top: 60px;
}
#TextArea1 {
height: 250px;
width: 640px;
position: absolute; top:-40px;
border:none;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
}
#textarea2 {
border-style: none;
border-color: inherit;
border-width: medium;
height: 105px;
width: 320px;
position:absolute; top:220px;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
}
#textarea3 {
border-style: none;
border-color: inherit;
border-width: medium;
height: 30px;
width: 310px;
position:absolute; top:215px;
left: 410px;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
}
#textarea4 {
border-style: none;
border-color: inherit;
border-width: medium;
height: 15px;
width: 310px;
position:absolute; top:250px;
left: 410px;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
}
#textarea5 {
border-style: none;
border-color: inherit;
border-width: medium;
height: 15px;
width: 310px;
position:absolute; top:270px;
left: 410px;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
}
#textarea6 {
border-style: none;
border-color: inherit;
border-width: medium;
height: 15px;
width: 100px;
position:absolute; top:290px;
left: 410px;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
}
#textarea7 {
border-style: none;
border-color: inherit;
border-width: medium;
height: 15px;
width: 310px;
position:absolute; top:310px;
left: 410px;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
}
#textarea8 {
border-style: none;
border-color: inherit;
border-width: medium;
height: 15px;
width: 210px;
position:absolute; top:290px;
left: 480px;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
}
#textarea9 {
border-style: none;
border-color: inherit;
border-width: medium;
height: 15px;
width: 130px;
position:absolute; top: 360px;
left: 360px;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
}
#textarea10 {
height: 15px;
width: 180px;
position:absolute; top:360px;
left: 450px;
border:none;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
}
#textarea11 {
border-style: none;
border-color: inherit;
border-width: medium;
height: 15px;
width: 320px;
position:absolute; top:360px;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
left: 0px;
}
#textarea12 {
border-style: none;
border-color: inherit;
border-width: medium;
font-size: large;
font-weight: bold;
height: 25px;
width: 120px;
position:absolute; top:400px;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
left: 270px;
}
#textarea13 {
border-style: none;
border-color: inherit;
border-width: medium;
height: 15px;
width: 75px;
position:absolute; top:450px;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
left: 0px;
}
#textarea14 {
border-style: none;
border-color: inherit;
border-width: medium;
height: 15px;
width: 200px;
position:absolute; top:450px;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
left: 65px;
margin-left: auto;
}
#textarea15 {
height: 30px;
width: 640px;
text-align:start;
text-anchor:end;
position: absolute; top:480px;
border:hidden;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
left: 0px;
}
#textarea16 {
border-style: none;
border-color: inherit;
border-width: medium;
font-size:large;
font-weight: bold;
height: 25px;
width: 250px;
position:absolute; top:540px;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
left: 270px;
}
#TextArea17 {
height: 75px;
width: 645px;
text-align:start;
text-anchor:end;
position: absolute; top:580px;
border:hidden;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
left: 0px;
}
#TextArea18 {
height: 30px;
width: 640px;
text-align:start;
text-anchor:end;
position: absolute; top:660px;
border:hidden;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
left: 0px;
}
#TextArea19 {
width: 240px;
position: absolute; top: 700px;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
border:hidden;
left: 0px;
}
#TextArea20 {
height: 15px;
width: 400px;
position: absolute; top: 760px;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
border:hidden;
left: 0px;
}
#TextArea21 {
height: 15px;
width: 400px;
position: absolute; top: 800px;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
border:hidden;
left: 0px;
}
#TextArea22 {
height: 15px;
width: 400px;
position: absolute; top: 820px;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
border:hidden;
left: 0px;
}
#TextArea23 {
height: 15px;
width: 400px;
position: absolute; top: 840px;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
border:hidden;
left: 0px;
}
#TextArea24 {
height: 10px;
width: 400px;
font-size:smaller;
position: absolute; top: 880px;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
border:hidden;
left: 0px;
}
#TextArea25 {
height: 40px;
width: 550px;
font-size: x-small;
position: absolute; top: 895px;
scrollbar-3dlight-color: #fff;
scrollbar-arrow-color: #fff;
scrollbar-base-color: #fff;
border:hidden;
left: 0px;
}
And finally here is the code behind function: (Edited: 10-10-2013: 14:22:GTM+1)
protected void SaveAsPDF(object sender, EventArgs e)
{
System.Web.UI.HtmlControls.HtmlGenericControl middlesector = new System.Web.UI.HtmlControls.HtmlGenericControl("middlesector");
string strHtml = null;
//MemoryStream memStream = new MemoryStream();
StringWriter strWriter = new StringWriter();
Server.Execute("OfferteForm1.aspx", strWriter);
strHtml = strWriter.ToString();
strWriter.Close();
strWriter.Dispose();
iTextSharp.text.Image addLogo = default(iTextSharp.text.Image);
addLogo = iTextSharp.text.Image.GetInstance(Server.MapPath("Images") + "/VisserSupplies.jpg");
iTextSharp.text.Document docWorkingDocument = new iTextSharp.text.Document(PageSize.A4, 40, 40, 40, 40);
StringReader srdDocToString = null;
try
{
PdfWriter pdfWrite = default(PdfWriter);
var fileCounter = 1;
while (File.Exists("C:/Users/milans/Documents/PDFs/" + textarea11.InnerText + " - " + fileCounter + ".pdf"))
{
fileCounter++;
}
pdfWrite = PdfWriter.GetInstance(docWorkingDocument, new FileStream("C:/Users/milans/Documents/PDFs/" + textarea11.InnerText + " - " + fileCounter + ".pdf", FileMode.Create));
srdDocToString = new StringReader(strHtml);
docWorkingDocument.Open();
addLogo.ScalePercent(50);
addLogo.Alignment = iTextSharp.text.Image.ALIGN_CENTER;
docWorkingDocument.Add(addLogo);
XMLWorkerHelper.GetInstance().ParseXHtml(pdfWrite, docWorkingDocument, srdDocToString);
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
finally
{
if ((docWorkingDocument != null))
{
docWorkingDocument.Close();
docWorkingDocument.Dispose();
}
if ((srdDocToString != null))
{
srdDocToString.Close();
srdDocToString.Dispose();
}
}
//Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "myscript", "window.open('C:/Users/milans/Documents/PDFs/" + textarea11.InnerText + ".pdf" + "','_blank','location=0,menubar=0,status=0,titlebar=0,toolbar=0');", true);
}
public override void VerifyRenderingInServerForm(Control control)
{
}
I get an error at:
Server.Execute("middlesector", strWriter);
And the same error for:
Server.Execute("OfferteForm1.aspx", strWriter);
It has to do with permissions for IUSRS_machinename and ASPNET users.
But I don't know how to add permissions since I don't have a Manifest and somehow can't create one.
I've also tried:
Server.HtmlDecode("middlesector", strWriter);
And:
Server.HtmlDecode("OfferteForm1.aspx", strWriter);
It does compile a PDF but it only has the image.
All I want is for the XMLWorker to include the filled in form in the middlesector Div.

CSS for drop down menu using asp.net sitemap not changing color on mouse over

I am trying to get my drop down menu which is made from a sitemap to change colors when there is a mouse over. Here is my code to make the menu:
<asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1" StaticDisplayLevels="2"
Orientation="Horizontal" CssClass="aspmenu">
<StaticHoverStyle CssClass="test" />
</asp:Menu>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
Additionally here is the css file:
.level1
{
}
.level2
{
box-shadow: 10px 10px 5px #888888;
color: White;
font-style:italic;
text-align:center;
font-size: 1.3em;
background-color: #fdbe12;
width: 6em;
padding: 4px;
margin: 0px 25px 0px 0px;
}
.level3
{
box-shadow: 10px 10px 5px #888888;
color: White;
font-weight:100;
text-align:center;
font-size: 1.1em;
background-color: #fdbe12;
width: 6.85em;
padding: 0.25em;
}
.test
{
font-weight: bold;
background-color:Fuchsia;
color:Black;
}
Here is the pertinent part of the other CSS file:
body
{
background: #EAFDB3;
width: 100%;
}
#menuBar
{
text-align: left;
width: 43.5em;
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 7.75em;
}
Here is a pic:

Chrome Rounded Corner css?

Helo I Have a css code like this :
.rounded {
border-collapse:separate;
border:solid black 1px;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
-khtml-border-radius: 20px;
border-radius: 20px;
}
and I call on page container on Aspx page:
<div runat="server" id="placeholder_5" class="sf_cols placeholder_5">
<div runat="server" style="border-style: groove; border-width: medium; float: left;
width: 100%; margin: 0; background-color: #C0C0C0;" class="sf_colsOut rounded">
<div runat="server" style="padding: 7px;" class="sf_colsIn">
<asp:ContentPlaceHolder ID="placeholder_5_widget_0" runat="server" />
</div>
</div>
</div>
but when i debug the web, only Firefox shows the rounded corner, the Chrome didn't change the view, i look over internet, and the said on chrome use :
-webkit-border-radius: 20px;
is there any solutions?
Chrome seems to be working ok. http://jsfiddle.net/cjTYs/
.rounded {
border-collapse:separate;
border:solid black 1px;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
-khtml-border-radius: 20px;
border-radius: 20px;
}
Are you still experiencing any issues?

Categories