Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Displaying Response.Output.Write in a certain location on a web form

  • 24-07-2007 3:16pm
    #1
    Registered Users, Registered Users 2 Posts: 546 ✭✭✭


    Hi,

    Using Asp .net 2.0 and C#

    I have some javascript that builds up a tree of data that gets displayed on my webform using Response.Output.Write
    Code works fine but I'm trying to move the results below the other controls in my webform. Response.Output.Write obviously prints it at the top
    Response.Output.Write("<ul class=\"tree\">\n");
    .....<work>.......
    Response.Output.Write("</ul>\n");
    

    I can move my results around the page using div. However this is not ideal as I won't be certain it will always display below my controls
    Response.Output.Write("<div style='position: absolute; top: 390; left: 30'><ul class=\"tree\">\n");
    .....<work>.......
    Response.Output.Write("</ul></div>\n");
    
    

    I've tried to add the results to a label but can't get it to work.
    Any ideas if this is possible since i'm using Response.Output.Write instead of a string


Comments

  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    Could you build the tree up as a string then set a page elements InnerHTML to equal the string?


  • Registered Users, Registered Users 2 Posts: 15,065 ✭✭✭✭Malice


    What were the issues you encountered when trying to use a label? That was the first thing I thought of when I saw the thread title.:)
    I find when using labels that I sometimes have to have them inside <div> tags e.g.

    [PHP]<div id="footer">
    <asp:Label id="footerText" runat="server"></asp:Label>
    </div>[/PHP]
    I normally just use a StringBuilder object to build up the HTML output and then set the text of the label.


Advertisement