Center Align Label and Hyperlink Control

Discussion in 'ASP .Net' started by Tom Bernsen, Apr 22, 2004.

  1. Tom Bernsen

    Tom Bernsen Guest

    This should be simple, I did it with a datagrid easily enough. Using VS Net
    1.1, I want a label over the datagrid and a hyperlink below it (from
    WebForms toolbox), with BOTH of them centered (text and control) over the
    page. In other words, everything centered, automatic with window size.

    If you have a solution not using VS (or HTML substitutes but would prefer
    using VS controls, clearly need datagrid and aspx), I'm all ears also.

    Thanks in advance to all
    Tom Bernsen, Apr 22, 2004
    #1
    1. Advertising

  2. Can't you just wrap the label, datagrid and hyperlink inside a div like
    this:

    <div align="center">
    <asp:label..../>
    <asp:datagrid.../>
    <asp:hyperlink.../>
    </div>

    Maybe I missed your need?

    Ken

    "Tom Bernsen" <> wrote in message
    news:...
    > This should be simple, I did it with a datagrid easily enough. Using VS
    > Net
    > 1.1, I want a label over the datagrid and a hyperlink below it (from
    > WebForms toolbox), with BOTH of them centered (text and control) over the
    > page. In other words, everything centered, automatic with window size.
    >
    > If you have a solution not using VS (or HTML substitutes but would prefer
    > using VS controls, clearly need datagrid and aspx), I'm all ears also.
    >
    > Thanks in advance to all
    >
    >
    >
    Ken Cox [Microsoft MVP], Apr 23, 2004
    #2
    1. Advertising

  3. Tom Bernsen

    Tom Bernsen Guest

    Ken,

    Thanks, although I had to do some serious tweaking in VS.Net, your
    suggestion was the basis of the solution. I suppose this is another thread,
    but it seems to me that the HTML editor in VS.NET is a pain, I'm almost
    tempted to do something like write all possible HTML elsewhere, bring it
    into VS, and then add anything I need from there.....thoughts?

    Thanks Again,

    Tom Bernsen

    "Ken Cox [Microsoft MVP]" <> wrote in message
    news:u$...
    > Can't you just wrap the label, datagrid and hyperlink inside a div like
    > this:
    >
    > <div align="center">
    > <asp:label..../>
    > <asp:datagrid.../>
    > <asp:hyperlink.../>
    > </div>
    >
    > Maybe I missed your need?
    >
    > Ken
    >
    > "Tom Bernsen" <> wrote in message
    > news:...
    > > This should be simple, I did it with a datagrid easily enough. Using VS
    > > Net
    > > 1.1, I want a label over the datagrid and a hyperlink below it (from
    > > WebForms toolbox), with BOTH of them centered (text and control) over

    the
    > > page. In other words, everything centered, automatic with window size.
    > >
    > > If you have a solution not using VS (or HTML substitutes but would

    prefer
    > > using VS controls, clearly need datagrid and aspx), I'm all ears also.
    > >
    > > Thanks in advance to all
    > >
    > >
    > >

    >
    Tom Bernsen, Apr 23, 2004
    #3
  4. Hi Tom,

    Yes, the GUI editor can be a pain. At times, I've created content in
    DreamWeaver and then pasted the HTML code into the Source view of VS.NET.

    I'm assuming that your HTML was too complex to create manually directly into
    Source view.

    Ken

    "Tom Bernsen" <> wrote in message
    news:...
    > Ken,
    >
    > Thanks, although I had to do some serious tweaking in VS.Net, your
    > suggestion was the basis of the solution. I suppose this is another
    > thread,
    > but it seems to me that the HTML editor in VS.NET is a pain, I'm almost
    > tempted to do something like write all possible HTML elsewhere, bring it
    > into VS, and then add anything I need from there.....thoughts?
    >
    > Thanks Again,
    >
    > Tom Bernsen
    >
    > "Ken Cox [Microsoft MVP]" <> wrote in message
    > news:u$...
    >> Can't you just wrap the label, datagrid and hyperlink inside a div like
    >> this:
    >>
    >> <div align="center">
    >> <asp:label..../>
    >> <asp:datagrid.../>
    >> <asp:hyperlink.../>
    >> </div>
    >>
    >> Maybe I missed your need?
    >>
    >> Ken
    >>
    Ken Cox [Microsoft MVP], Apr 23, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kay
    Replies:
    2
    Views:
    7,122
  2. shank

    CSS and center align

    shank, Sep 29, 2003, in forum: HTML
    Replies:
    7
    Views:
    27,913
    b_imam77
    Dec 30, 2008
  3. Steve Richter
    Replies:
    1
    Views:
    875
    Mark Rae
    Jun 24, 2007
  4. Alan Z. Scharf

    Web Label Control - Align:Center

    Alan Z. Scharf, Aug 4, 2003, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    152
    Alan Z. Scharf
    Aug 5, 2003
  5. Knut Krueger
    Replies:
    8
    Views:
    236
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page