Panel control is quite enough ?

Discussion in 'ASP .Net' started by Raghu Raman, Dec 5, 2004.

  1. Raghu Raman

    Raghu Raman Guest

    Hi,

    am a biginner in .net designing.Does the panel control is enough to act
    as a container .Because if , i design my controls in textboxes rows&
    cols , i heared that the aclignment won't change in run time across the
    browsers.

    is it true? if the panel provides guaruntee that it keeps the controls
    alignment same in runtime across the browsers, i can very well use the
    panel control instead of tables ,to make it easier to control in server
    side.


    Please give u r comments
    Regards
    a drop in the ocean.



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Raghu Raman, Dec 5, 2004
    #1
    1. Advertising

  2. ASP.net server controls allows adaptive rendering, which means the HTML
    markup of a server control can vary from browser to browser. I did a simple
    test of a Panel server control and looked at the HTML source of Internet
    Explorer 6 and Firefox 1.0 (Mozilla).

    If you are using the .NET Framework 1.1, a Panel server control will render
    the contents of a Panel surrounded by a <div> element (for example, if you
    have this:

    <asp:panel runat="server">
    Test
    </asp:panel>

    the HTML in IE will be:

    <div>

    Test

    </div>

    The extra whitespace shouldn't matter with your styling.) However, if that
    same page is viewed in the newest Firefox, the .NET 1.1 Framework renders
    this:

    <table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td>

    Test

    </td></tr></table>

    I found it very strange the developers of .NET would do this, but you have
    to remember that .NET 1.x came out several years ago, before Firefox was
    even thought of. Needless to say, anything you have inside the Panel server
    control will remain intact. It's just what's surrounding it that changes
    from browser to browser.

    If you're curious, I also tried this with the latest 2.0 build of the .NET
    framework. Both browsers rendered the <div> way.

    Happy coding,
    Johann MacDonagh


    "Raghu Raman" <> wrote in message
    news:%...
    > Hi,
    >
    > am a biginner in .net designing.Does the panel control is enough to act
    > as a container .Because if , i design my controls in textboxes rows&
    > cols , i heared that the aclignment won't change in run time across the
    > browsers.
    >
    > is it true? if the panel provides guaruntee that it keeps the controls
    > alignment same in runtime across the browsers, i can very well use the
    > panel control instead of tables ,to make it easier to control in server
    > side.
    >
    >
    > Please give u r comments
    > Regards
    > a drop in the ocean.
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    Johann MacDonagh, Dec 6, 2004
    #2
    1. Advertising

  3. Raghu Raman

    Raghu Raman Guest

    Hi Johann ,

    Thx for that.U r article shows that , all the inner control alignment
    will remain intact .So i can very well use asp panel instead of html
    .table.

    U 've also said that the <div> will also be included.yes it is.

    But could u pls tell me how to get the scroll bars in the panel controls


    Thanks a lot
    A drop in the ocean.
    Raghu

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Raghu Raman, Dec 6, 2004
    #3
    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. Harry
    Replies:
    3
    Views:
    540
    Harry Singh
    Nov 10, 2003
  2. Simon Harvey
    Replies:
    3
    Views:
    606
    Kevin Spencer
    Aug 6, 2004
  3. HS1
    Replies:
    3
    Views:
    486
  4. Ulf Meinhardt
    Replies:
    0
    Views:
    609
    Ulf Meinhardt
    Jul 7, 2009
  5. Robin Wenger
    Replies:
    0
    Views:
    2,925
    Robin Wenger
    Aug 18, 2011
Loading...

Share This Page