DataList   otázka

ASP.NET WebForms

Ahoj ALL

Mám menší problém s DataListem, potřebuju aby se mi zobrazoval v TOPu TD, zobrazuje se mi ve středu TDčka jak to udělat, pls poraďte. Díky

nahlásit spamnahlásit spam 0 odpovědětodpovědět

A co třeba použít CSS? ;) Mimochodem byste příště mohl lépe popsat problém,tenhle popis je skoro nic neříkající.

nahlásit spamnahlásit spam 0 odpovědětodpovědět

zde přikládám screeny

URL SCREENU 1:

http://screens.gold-files.cz/screen1.jpg takto to vypadá

URL SCREENU 2

http://screens.gold-files.cz/screen2.jpg takto by to mělo vypadat

nahlásit spamnahlásit spam 0 odpovědětodpovědět

Hoďte sem CSS file a zdrojovou stránku s Datalistem

nahlásit spamnahlásit spam 0 odpovědětodpovědět

zde je celá stránka

<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" %>

<script runat="server">

</script>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <td class="content" colspan="1">
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:pandora %>" 
            SelectCommand="SELECT * FROM [Home_Info] ORDER BY [IdHI]"></asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:pandora %>" 
            SelectCommand="SELECT * FROM [Applications] ORDER BY [IdApp]"></asp:SqlDataSource>
        <br />
        <div class="nadpis">Vlastnosti Serveru</div>
        <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1" 
            DataKeyField="IdHI">
            <ItemTemplate>
                <table>
                    <tr>
                        <td>
                            <asp:Label ID="NameLabel" runat="server"
                                Text='<%# Eval("Name") %>' />
                        </td>
                        <!--
                        <td>
                            <asp:Label ID="StatusLabel" runat="server"
                                Text='<%# Eval("Status") %>' />
                        </td>
                        -->
                    </tr>
                </table>
            </ItemTemplate>
        </asp:DataList>
        <br />
        <div class="nadpis">Aplikace možné aktivivat</div>
        <asp:DataList ID="DataList2" runat="server" DataSourceID="SqlDataSource2" 
            DataKeyField="IdApp">
            <ItemTemplate>
                <table>
                    <tr>
                        <td>
                            <asp:Label ID="NameLabel" runat="server"
                                Text='<%# Eval("Name") %>' />
                        </td>
                        <!--
                        <td>
                            <asp:Label ID="StatusLabel" runat="server"
                                Text='<%# Eval("Status") %>' />
                        </td>
                        -->
                    </tr>
                </table>
            </ItemTemplate>
        </asp:DataList>
    </td>
    <td class="content" colspan="2">
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
            ConnectionString="<%$ ConnectionStrings:pandora %>" 
            SelectCommand="SELECT * FROM [Hosting_News] ORDER BY [IdHN]"></asp:SqlDataSource>
        <asp:DataList ID="DataList3" runat="server" DataSourceID="SqlDataSource3" 
            DataKeyField="IdHN" Height="100%" Width="100%">
            <ItemTemplate>
                <table class="news">
                    <tr>
                        <td">
                            <asp:Label ID="NameLabel" runat="server" CssClass="newsnadpis"
                                Text='<%# Eval("Name") %>' />
                        </td>
                    </tr><tr>
                        <td>
                            <asp:Label ID="DESCRIPTIONSLabel" runat="server" CssClass="newsdesc"
                                Text='<%# Eval("DESCRIPTIONS") %>' />
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
        </asp:DataList>
    </td>
    <td class="content" colspan="1">
        <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
            ConnectionString="<%$ ConnectionStrings:pandora %>" 
            SelectCommand="SELECT * FROM [Useful_Links] ORDER BY [IdUL]"></asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource5" runat="server" 
            ConnectionString="<%$ ConnectionStrings:pandora %>" 
            SelectCommand="SELECT * FROM [More_Services]"></asp:SqlDataSource>
        <div class="nadpis">Užitečné odkazy</div>
        <asp:DataList ID="DataList4" runat="server" DataSourceID="SqlDataSource4" 
            DataKeyField="IdUL" Height="45%" width="100%">
            <ItemTemplate>
                <asp:Label ID="URLLabel" runat="server" Text='<%# Eval("URL") %>' />
                <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' />
            </ItemTemplate>
        </asp:DataList>
        <asp:DataList ID="DataList5" runat="server" DataSourceID="SqlDataSource5" 
            DataKeyField="IdMS" Height="45%" width="100%">
            <ItemTemplate>
                <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' />
                <asp:Label ID="DESCRIPTIONSLabel" runat="server" Text='<%# Eval("DESCRIPTIONS") %>' />
            </ItemTemplate>
        </asp:DataList>
    </td>
</asp:Content>

Zde je style.css

body
{
    background-color: #DEDEDE;
    font-family:Modern;
    font-size:15px;
	text-align: center;
}
a, a:visited {
  text-decoration: none;
  color: white;
  font-weight:bold;
  font-size:15px;
  font-family:Harrington;
}

a:hover {
  color:white;
  text-decoration: underline;
  font-weight:bold;
  font-size:15px;
  font-family:Harrington;
}

a#white {
	color: white;
	text-decoration: underline;
	font-family:Harrington;
}
.page
{
    background: url(images/page.png) repeat-y top;
    background-color:#DEDEDE;
    width:100%;
    border-collapse:collapse;
}
.table
{
    color:Gray;
    background:#ededed;    
}
.header
{
    background: url(images/header.png) repeat-x top;
    background-color:#DEDEDE;
    width:100%;
    height:171px;
    border-collapse:collapse;
}
.mainmenu
{
    text-align:center;
    background: url(images/menu.png) repeat-x top;
    width:25%;
    border-collapse:collapse;
}
.menu
{
    background: url(images/menu.png) repeat-x top;
    background-color:#DEDEDE;
    width:1000px;
    height:43px;
    border-collapse:collapse;
}
.tarif-bg
{
    float:left;
    background: url(images/tarif-bg.png) repeat-x top left;
    height:176px;
    padding-left:45px;
    margin:0;
    margin-top:0px;

}
.tarif
{
    float: left;
    background: url(images/tarif.png) no-repeat left top;
    width: 216px;
    height: 141px;
    margin-left: 0px;
}
.content
{
    padding: 0px 0px 0px 0px;
    background-color:#ededed;
}
.kontent
{
    border-color:#ededed;

}
.copy
{
    text-align:left;
    color:Gray;
    font-size:13px;
    font-family:Modern;
    font-weight:bold;
}
/*footer
{
    background: url(images/footer.png) no-repeat top;
    background-color:#DEDEDE;
}*/
.logo
{
    text-align:left;
}
.nadpis
{
    font-size: 20px;
    color:Black;
    font-weight:bold;
    text-align:center;
}
.popis
{
    font-size: 15px;
    border-collapse:inherit;
}
.HI_ON
{
    color:Lime;
    font-weight:bold;
}
.HI_NAME
{
    color:Gray;
    font-weight:bold;
}
.news
{
    width:95%;
    height:100%;
}
.newsnadpis
{
    color:Gray;
    background:#ffffff;
    font-size:20px;
    font-weight:bold;
}
.newsdesc
{
    color:Silver;
    background:#ffffff;
    font-size:15px;
}

Zde je layout.css

/* CSS Document */
* {margin:0; padding:0;	font-size:9pt; font-family: "Nimbus Sans L", Arial, Helvetica, sans-serif; color: #a2a2a2;}
/*body {text-align:center; background-color: #212121;}*/

img {vertical-align:top; margin: 0;}
a img {border:0;}
ul {list-style:none;}

h1 { font-size: 22pt; font-weight: bold; color: #f8c809; margin-bottom: 15px;}
h2 { font-size: 16pt; font-weight: bold; color: #ffffff; margin-bottom: 19px; margin-top: 6px}

.clear {clear:both;}
.left {float:left;}

/***************header***************/
#top { margin: 0; background-color:#303030; width: 1000px; height: 15px; margin: 0; margin-bottom: 3px; vertical-align: top;}
#header {background: url(../img/bg-menu.jpg) repeat-x left top; width: 1000px; height: 176px;} 
#headern {text-indent: -10000px;}
#header ul {padding-bottom: 15px; padding-top :12px; text-align:left; vertical-align: top; background: url(../img/bg-menua.jpg) repeat-x left top; height:15px;}
#header .menu li {padding:0; background:none; margin-left:81px; display: inline;}
#header .menu li a {text-decoration:none; background:none; color:#000000; font-weight: bold;}
#header .menu li a:hover {text-decoration:underline; background:none; color:#807F7F;}
#headerl {float: left; background: url(../img/bg-headerl.jpg) repeat-x top right; width: 520px; height: 171px;}
#headerl1 {background: url(../img/bg-headerl.jpg) repeat-x top right; min-height: 100%; margin: 0; padding: 0; float: left;}
#headerr {float: right; background: url(../img/bg-headerr.jpg) no-repeat top right; width: 480px; height: 171px;}

#logo {margin: 10px 0 0 40px; display: block;}
#webhosting {margin: 5px 0 0 80px; display: block;}

#kvsluzby {display: inline; margin: 8px 0 0 40px;}
#kvsluzby1 {display: inline; margin: 5px 25px 0 61px;}
#poadmin {display: inline; margin: 5px 0 0 40px;}
#poadmin1 {display: inline; margin: 12px 25px 0 100px;}

#tarif_bg { float:left; background: url(../img/bg-nabidky.jpg) repeat-x top left; height: 176px; padding-left: 45px; margin: 0; margin-top: 0px; }
#tarif_1 {float: left; background: url(../img/bg-ramnabidky1.jpg) no-repeat left top; width: 216px; height: 141px; margin-left: 0px;}
#tarif_2 {float: left; background: url(../img/bg-ramnabidky2.jpg) no-repeat left top; width: 216px; height: 141px; margin-left: 0px;}
#tarif_3 {float: left; background: url(../img/bg-ramnabidky3.jpg) no-repeat left top; width: 216px; height: 141px; margin-left: 0px;}
#tarif_1 img, #tarif_2 img, #tarif_3 img {margin: 15px 0 0px 10px; padding: 0;}
#tarif_1_1 {width: 214px; height: 81px; }
#tarif_2_1 {width: 216px; height: 81px; }
#tarif_3_1 {width: 215px; height: 81px; }

#popis1, #popis2, #popis3 {float: left; width: 150px; height: 70px; margin-top: 12px; }
#popis1 ul , #popis2 ul , #popis3 ul { background: none; margin: 0; padding: 0; _margin-left: -15px; _ma\rgin-left: 0px;}
#popis1 li, #popis2 li, #popis3 li {padding: 0; margin-left: 10px; text-align: left; font-size:9pt; color: #f8c809; height: 22px;}
#popis1 li strong, #popis2 li strong, #popis3 li strong {color: #f8c809; font-size:12pt;}
#popis1 li span, #popis2 li span, #popis3 li span {color: #f8c809; font-weight: bold; font-size: 10pt;}
#popis1 li img,#popis2 li img,#popis3 li img { margin: 2px 3px 0 0;} 

#cena1, #cena2, #cena3 {float: right; background: none; margin: 0px 0px 0 0px; padding: 0; width: 63px; height: 78px;}
#cena1 img, #cena2 img, #cena3 img { margin: 0px 0px 0 0px; padding: 0; width: 63px; height: 78px;}

#info1 , #info2 , #info3 {width: 199px; padding: 0 0px 0 13px; pa\dding-right: 7px; height: 26px;}
.pole1 {float: left; background: url(../img/pole.gif) no-repeat left top; margin: 0; padding: 5px 0 0 10px; width: 87px; height: 26px;}
.pole2 {float: right; background: url(../img/pole.gif) no-repeat left top; margin: 0; padding: 5px 0 0 12px; width: 87px; height: 26px;}
.pole1 a, .pole2 a {text-decoration:none; background:none; font-weight: bold; color:#a2a2a2;}
.pole1 a:hover, .pole2 a:hover {text-decoration:underline; background:none; color:#dddddd;}

#rightoddelovac {float: left; width: 16px; height: 157px;}
#rightblok {float: left; width: 288px; height: 157px; margin-left: 3px;}
#obaladmin {width: 288px; height: 10px;}
#odskok {float: left; padding-left: 20px;}
#odskok img {margin: 0; padding: 0; display: block;}
#obalkoule {float: left; background: url(../img/bg-koule.gif) repeat-x top left; width: 153px;}
#obalkoule img {margin: 0; padding: 0; margin-left: -3px;}



/***************content***************/
#bott { margin: 0; background-color:#121212; width: 1000px; height: 35px;}
#content {margin: 0; padding: 0; padding-left: 55px; _padding-left: 35px; _paddi\ng-left: 55px; width: 945px; text-align: left; margin-top: 213px; _margin-top: 0px;}
#content .col-3 {float:right; padding-right: 5px; padding-left: 10px;}
#content .col-1, #content .col-2, #content .col-3 {float:right; padding-right: 5px; padding-left: 0px;}
#content .col-1 .inner, #content .col-2 .inner, #content .col-3 .inner {padding-right: 0px;}
#content .col-2 .inner, #content .col-3 .inner {padding-left:0px; _padding-left:5px; _paddi\ng-left:0px; }
#content .col-3 {padding-right:20px; text-align: justify;}
#content .wrapper {width:945px;	 _width: 955px; _wid\th: 945px; margin-right: 10px; }
#content .wrapaper {width: 945px; }

.zlute { background: none; margin: 0; padding: 0; }
.zlute li {padding: 0; margin-left: 0px; text-align: left; height: 25px; }
.zlute  li img { margin: -2px 5px 0 0;} 

.reference { background: none; margin: 0; padding: 0; margin-bottom: 20px;}
.reference li {padding: 0; margin-left: 0px; text-align: left;}
.reference li img { margin: -2px 40px 0px 0; border: 1px solid #2a2a2a; padding: 3px; } 
.reference .ref {margin-bottom: 25px;}
.reference span { font-weight: bold; font-size: 11pt; }
.reference p { margin-top: 3px; height: 54px;}
.reference a {text-decoration:underline; font-weight: bold; color:#f8c809;}
.reference a:hover {text-decoration:none; }

.bile { background: none; margin: 0; padding: 0; margin-left: 15px;}
.bile li {padding: 0; margin-left: 0px; text-align: left; margin-bottom: 5px;}
.bile li img { margin: -2px 5px 0 0;} 
.bile span {color: #ffffff; font-weight: bold; margin-right: 5px;}

.cisla { background: none; margin: 0; padding: 0; }
.cisla li {padding: 0; margin-left: 0px; text-align: left; margin-bottom: 8px;}
.cisla li img { margin: -2px 5px 0 0;} 
.cisla span {font-weight: bold; margin-right: 5px;}
.cisla a {text-decoration:underline; font-weight: bold; color:#f8c809;}
.cisla a:hover {text-decoration:none; }
.cisla p { margin: 0px 0px 8px 22px;} 

.uvozovky { background: none; margin: 0; padding: 0; }
.uvozovky li {padding: 0; margin-left: 0px; text-align: left; margin-bottom: 15px; font-weight: bold;}
.uvozovky li img { margin: -5px 5px 0 0;} 
.uvozovky span {font-weight: bold; margin-right: 5px;}
.uvozovky a {text-decoration:underline; font-weight: bold;}
.uvozovky a:hover {text-decoration:none; }
.uvozovky p { font-weight: normal; margin: 2px 0px 8px 22px;} 

#zdarmadomeny {margin: 15px 0 15px 0;}

#content .zluty span {color: #f8c809;}
#content table {background: #222222; text-align: left;}
#content .white {color: #ffffff;}
#content .white strong {font-weight: bold; color: #ffffff;}

/***************footer***************/
#footer {margin: 0; padding: 15px 0 0px 40px; font-weight: bold; background: #212121; text-align: left; width: 1000px; margin-bottom: 30px;}
#footer a {border-left:1px solid #807F7F; margin-left:10px; padding-left:10px; text-decoration:none; background:none; font-weight: bold; color:#807F7F;}
#footer a:hover {text-decoration:underline; background:none; color:#dddddd;}
#footerright {margin-left: 245px; display: inline; }

.mapa {padding: 10px 0 3px 0; font-weight: bold;}
.mapa1 {padding: 0px 0 3px 0;}
.mapa10 {padding: 10px 0 3px 0; font-weight: bold;}
.mapa11 {padding: 10px 0 3px 0; font-weight: bold;}
.mapa12 {padding: 10px 0 3px 0; font-weight: bold;}
.mapa13 {padding: 10px 0 3px 0; font-weight: bold;}

.srovnani {border: 1px solid #555555; border-collapse: collapse; }
.srovnani THEAD TD {border: 1px solid #555555; text-align: center; vertical-align: bottom; padding-bottom: 10px; padding-top:20px; font-weight: bold; color: #efefef;}
.srovnani TBODY TD {border: 1px solid #555555; text-align: center; vertical-align: bottom; padding-top:5px; padding-bottom: 2px; }
.srovnani TBODY TD.srovtucne {font-weight: bold;}
.srovinfo {text-decoration:underline; font-weight: bold; color: #a2a2a2;}
.srovinfo:hover {text-decoration:underline; font-weight: bold; color: #fefefe;}
.srovobj {text-decoration:underline; font-weight: bold; color: #f8c809;}
.srovobj:hover {text-decoration:none; font-weight: bold; color: #f8c809;}
.srovnani TBODY TD.srovpopis {text-align: left; font-weight: normal; padding-left: 10px;}
.srovnani TBODY TD.srovpopisa {text-align: left; font-weight: normal; padding-left: 10px; padding-bottom: 7px;}
.srovnani TBODY TD.srovprice {font-weight: bold; color: #f8c809; font-size: 14pt;}
.srovtab {font-size: 10pt; font-weight: bold; color: #efefef;}
.srovtab:hover {text-decoration: none; font-size: 10pt; font-weight: bold; color: #efefef;}

#obj table {background: #121212; text-align: left; width: 700px;}
#obj table td { background-color: #333333; padding: 3px 0 3px 5px; color: #a2a2a2; }
#obj .red { display: inline; color: #ff0000; }
#obj table td.nic { background-color: #121212; height: 10px; }
#obj select, #obj input {
	font-family: Geneva, Arial, Helvetica, sans-serif;
	height: 22px;
	font-size: 12px;
	color: #a2a2a2;
	padding: 0;
	background-color: #232323;
	background-repeat: repeat-x;
	border: 1px solid #494949;
	padding-top: 2px;
	padding-bottom: 0px;
	width: 350px;
}
#obj textarea {
	font-family: Geneva, Arial, Helvetica, sans-serif;
	height: 150px;
	font-size: 12px;
	color: #a2a2a2;
	padding: 0;
	background-color: #232323;
	background-repeat: repeat-x;
	border: 1px solid #494949;
	padding-top: 2px;
	padding-bottom: 0px;
	width: 350px;
}
#obj #textput {
    display: none;
}
#obj select { font-size: 14px; width: 450px; }
#obj select option { height: 26px; }
#obj input.button {
	font-family: Geneva, Arial, Helvetica, sans-serif;
	height: 26px;
	font-size: 14px;
	color: #131313;
	font-weight: bold;
	text-align: center;
	background-image: url(../img/button.jpg);
	cursor: pointer;
	cursor: hand;
	background-repeat: repeat;
	border: 1px solid #326BC0;
	width: 200px;
	color: expression(this.onmouseover = new Function("this.className += ' hover';"),
	this.onmouseout = new Function("this.className = this.className.replace(' hover','')"));
}
#obj input.button:hover, #obj input.button.hover {
    color: #494949;
}
.ok {
    color: #f8c809;
    font-weight: bold;
}
.ko {
    color: #ff0000;
    font-weight: bold;
}
.chyba {
    color: #ff0000;
    font-weight: bold;
}
#obj .checky {
	font-family: Geneva, Arial, Helvetica, sans-serif;
	padding: 0px;
	width: 15px;
}
#obj a.linkdark, #obj a.linkdark:link, #obj a.linkdark:visited {
	color:			#F8C809;
	text-decoration:	underline;
	font-weight:		normal;
}
nahlásit spamnahlásit spam 0 odpovědětodpovědět

Nebude lepší tu celou stránku vystavit někam na web, abychom se na to mohli podívat nějakým Firebugem nebo pomocí IE Developer Tools? V tomhle tu chybu nikdo hledat nebude.

nahlásit spamnahlásit spam 0 odpovědětodpovědět

no bylo by to lepší ale kam to mám hodit, na asp2.cz nejde připojit DT

nahlásit spamnahlásit spam 0 odpovědětodpovědět

Co na asp2 nejde připojit? Freehostignů je celá řada, aspone.cz, qsh.cz atd.

nahlásit spamnahlásit spam 0 odpovědětodpovědět

tak tento server asi nee

http://qsh.cz/

SERVER is temporary under maintenance.

nahlásit spamnahlásit spam 0 odpovědětodpovědět
                       
Nadpis:
Antispam: Komu se občas házejí perly?
Příspěvek bude publikován pod identitou   anonym.
  • Administrátoři si vyhrazují právo komentáře upravovat či mazat bez udání důvodu.
    Mazány budou zejména komentáře obsahující vulgarity nebo porušující pravidla publikování.
  • Pokud nejste zaregistrováni, Vaše IP adresa bude zveřejněna. Pokud s tímto nesouhlasíte, příspěvek neodesílejte.

přihlásit pomocí externího účtu

přihlásit pomocí jména a hesla

Uživatel:
Heslo:

zapomenuté heslo

 

založit nový uživatelský účet

zaregistrujte se

 
zavřít

Nahlásit spam

Opravdu chcete tento příspěvek nahlásit pro porušování pravidel fóra?

Nahlásit Zrušit

Chyba

zavřít

feedback