Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding Verticle Image And Label
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Adding Verticle Image And Label
Divers
Thread ID:
01451036
Message ID:
01451036
Vues:
95
I have a long verticle image i want to display across the top of my page. I want to also have the page's caption displayed as a label centered over the image. The lable seems to be behind the image.
protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
        tblHeader = new Table();
        tblHeader.Visible = true;
        tblHeader.ID = "tblHeader";
        tblHeader.Attributes.Add("width", "100%");

        TableRow Row0 = new TableRow();
        tblHeader.Rows.Add(Row0);

        System.Web.UI.WebControls.Image imgHeader = new System.Web.UI.WebControls.Image();
        imgHeader.ImageUrl = "Images/page_header.gif";

        TableCell Cell0 = new TableCell();
        Cell0.Controls.Add(imgHeader);
        Cell0.ColumnSpan = 0;
        Cell0.Width = 400;

        Label lblCaption = new Label();
        lblCaption.Text = "Apex Management Reports";
        lblCaption.Font.Bold = true;
        lblCaption.Font.Name = "Arial";
        lblCaption.Font.Size = 14;
        lblCaption.ForeColor = Color.Red;

        TableCell Cell1 = new TableCell();
        Cell1.Controls.Add(lblCaption);

        Row0.Cells.Add(Cell0);
        Row0.Cells.Add(Cell1);

        this.Controls.Add(tblHeader);
    }
}
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform