I am new to using Master Pages and have just set one up, but sometimes my data expands below my Content Place Holder Is their a way that I can set my Content Place Holder
Master Page Syntax
<form id="Form1" runat="server">
<asp:ScriptManager ID="sptScriptManager" runat="server"></asp:ScriptManager>
<div class="White" style="height: 14px;"></div>
<div class="main" id="divMain">
<asp:ContentPlaceHolder ID="MainContent" runat="server"></asp:ContentPlaceHolder>
</div>
<div class="RGB123" style="height: 4px;"></div>
<div class="GRE" style="height: 300px;">
<div style="text-align: center;">
<asp:Label runat="server" ID="lblDataForToday" CssClass="BoldTextWhiteOpenSans"></asp:Label>
</div>
</div>
</form>
Page Usage
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
Big grid goes here
</asp:Content>
Below is the CSS referenced in the syntax below
CSS
.White
{
background-color: #ffffff;
padding: 0px 0px 0px 0px;
height: 40px;
}
.main
{
padding: 0px 12px;
margin: 12px 8px 8px 8px;
min-height: 200px;
max-height: auto;
}
.RGB123
{
background-color: #618e1d;
background-repeat: repeat-x;
height: 55px;
}
.GRE
{
background-color: #333333;
padding: 0px 0px 0px 0px;
height: 20px;
}
Related
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
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.
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?
I'm trying to get a <asp:Label> to appear centered under a <asp:ImageButton>. Right now, the buttons are tied to objects in a List and so I have them all in a ListView control like this:
<asp:ListView ID="lv_WantedBooks" runat="server">
<ItemTemplate>
<asp:ImageButton ID="bookImageButton" runat="server" CssClass="BookImageButton" ImageUrl='<%# Eval("Image.ImageUrl") %>' OnClick="bookImageButton_Click" ToolTip='<%# Eval("Title") %>' CommandName='<%# Eval("Title") %>' />
<asp:Label ID="bookVoteCount" runat="server" Text='<%# Eval("Votes") %>' cssclass="VoteFont"/>
</ItemTemplate>
</asp:ListView>
For this, I have the following CSS:
.BookImageButton
{
padding: 25px 25px 25px 25px;
background: #625863;
height: 220px;
width: 182px;
}
.VoteFont
{
font-size: 1.8em;
color: #C3980D;
font-weight: bolder;
}
Right now, the <asp:Label> is appearing to the far right under the ImageButtons. I've been trying various CSS styles to get them centered under, but I've just not been able to get the CSS right.
Does anyone know how I can get the styling just right? Thanks A TON in advance! Also, this could be an issue with my Markup design/layout. I'm not opposed to changing that if necessary - I just figured the issue could be fixed via CSS.
Here is an example of what I mean and also the outputted HTML code that is created:
<p>
<input type="image" name="ctl00$MainContent$lv_WantedBooks$ctrl0$bookImageButton" id="MainContent_lv_WantedBooks_bookImageButton_0" title="Pride and Prejudice" class="BookImageButton" src="[blah, blah, this is correct in the output, trust me.]" />
<span id="MainContent_lv_WantedBooks_bookVoteCount_0" class="voteFont">1</span>
<input type="image" name="ctl00$MainContent$lv_WantedBooks$ctrl1$bookImageButton" id="MainContent_lv_WantedBooks_bookImageButton_1" title="Sense and Sensibility" class="BookImageButton" src="[blah, blah, this is correct in the output, trust me.]" />
<span id="MainContent_lv_WantedBooks_bookVoteCount_1" class="voteFont">1</span>
<br />
<div align="center"><h2><b>Don't See Your Choice? Enter it Below!</b></h2>
<input name="ctl00$MainContent$tb_NewBookTitle" type="text" id="MainContent_tb_NewBookTitle" style="height:20px;width:275px;" />
<br /></div>
</p>
Add the following to the .VoteFont
display: block;
[edit] based on your output...
Essentially I am wrapping imagebutton, span in their own divs. And wrapping both the divs in another div with the css class column. And span's parent div is styled to align the text to center.
CSS
.column {
float:left; position:relative;margin:5px;
}
Asp.net code
<div class="column">
<div>
<asp:ImageButton ID="bookImageButton" runat="server" CssClass="BookImageButton" ImageUrl="..." /></div>
<div style="text-align: center;">
<asp:Label ID="bookVoteCount" runat="server" CssClass="VoteFont" Text="1" /></div>
</div>
Resulting Html
<div class="column">
<div>
<input type="image" name="ctl00$MainContent$lv_WantedBooks$ctrl0$bookImageButton" id="MainContent_lv_WantedBooks_bookImageButton_0" align="bottom" title="Pride and Prejudice" class="BookImageButton" />
</div>
<div style="text-align: center">
<span id="MainContent_lv_WantedBooks_bookVoteCount_0" class="voteFont">1</span></div>
</div>
<div class="column">
<div>
<input type="image" name="ctl00$MainContent$lv_WantedBooks$ctrl1$bookImageButton" id="MainContent_lv_WantedBooks_bookImageButton_1" title="Sense and Sensibility" class="BookImageButton" />
</div>
<div style="text-align: center">
<span id="MainContent_lv_WantedBooks_bookVoteCount_1" class="voteFont">1</span>
</div>
</div>
Give .VoteFont a width and apply a margin to it. Margin auto will center it on the container.
.VoteFont {
font-size: 1.8em;
color: #C3980D;
font-weight: bolder;
width: 80px;
margin: auto;
}
Try adding
text-align: center;
to .VoteFont block
do this
.VoteFont
{
font-size: 1.8em;
color: #C3980D;
font-weight: bolder;
float: left;
display: block;
margin: auto;
}
this should do the trick
.VoteFont
{
font-size: 1.8em;
color: #C3980D;
font-weight: bolder;
position: relative;
left: -30px;
}
Try this:
.BookImageButton
{
padding: 25px 25px 25px 25px;
background: #625863;
height: 220px;
width: 182px;
margin-bottom: 25px;
}
.VoteFont
{
font-size: 1.8em;
color: #C3980D;
font-weight: bolder;
position: relative;
left: -157px;
display: inline-block;
margin-top: 50px;
}
If This wouldn't work try to replace
display: inline-block;
with
display: inline-table;
I'm using a ProgressBar as below:
<ajaxToolkit:ModalPopupExtender ID="mpeWait" runat="server" Drag="false" PopupControlID="pnlWaitDialog"
TargetControlID="btnDummy" EnableViewState="true" BackgroundCssClass="modalBackground">
</ajaxToolkit:ModalPopupExtender>
<asp:Button runat="server" ID="btnDummy" Style="display: none;" />
<div id="pnlWaitDialog" runat="server"
style="display: none; background-color: Transparent; position: absolute;">
<div align="center">
<img src="Images/Loading.gif" alt="" />
</div>
</div>
Now, I need to show that if the DataSet (for the export to Excel) takes time to fill. Is it possible to show that?
I'm assuming that the DataSet is populated on some click event of some sort? Have you tried using the actual UpdateProgress control?
<asp:UpdateProgress ID="prgLoadingStatus" runat="server" DynamicLayout="true">
<ProgressTemplate>
<div id="overlay">
<div id="modalprogress">
<div id="theprogress">
<asp:Image ID="imgWaitIcon" runat="server" ImageAlign="AbsMiddle" ImageUrl="/images/wait.gif" />
Please wait...
</div>
</div>
</div>
</ProgressTemplate>
</asp:UpdateProgress>
Here's the CSS, if you need it:
#overlay {
position: fixed;
z-index: 99;
top: 0px;
left: 0px;
background-color: #f8f8f8;
width: 100%;
height: 100%;
filter: Alpha(Opacity=90);
opacity: 0.9;
-moz-opacity: 0.9;
}
#theprogress {
background-color: #fff;
border:1px solid #ccc;
padding:10px;
width: 300px;
height: 30px;
line-height:30px;
text-align: center;
filter: Alpha(Opacity=100);
opacity: 1;
-moz-opacity: 1;
}
#modalprogress {
position: absolute;
top: 40%;
left: 50%;
margin: -11px 0 0 -150px;
color: #990000;
font-weight:bold;
font-size:14px;
}