Results 1 to 24 of 24

Thread: Changing Label to TextBox on Run-Time

Threaded View

  1. #1

    Thread Starter
    Addicted Member Claude2005's Avatar
    Join Date
    Jan 2010
    Location
    Philippines
    Posts
    166

    Changing Label to TextBox on Run-Time

    Hi there,

    First, my code:

    Code:
    <asp:Table>
        <asp:TableRow>
            <asp:TableCell>Name:</asp:TableCell>
            <asp:TableCell><asp:Label>John Doe</asp:Label></asp:TableCell>
        </asp:TableRow>
    </asp:Table>
    I want to change the Label Control to a Textbox Control once I've triggered a Button.Click event. So my output will be:

    Code:
    <asp:Table>
        <asp:TableRow>
            <asp:TableCell>Name:</asp:TableCell>
            <asp:TableCell><asp:TextBox>John Doe</asp:TextBox></asp:TableCell>
        </asp:TableRow>
    </asp:Table>
    Is this possible?

    EDIT: The label part is for display the information from the database. I'm using a button as a trigger to edit that label by changing it to a textbox and I'll be using another button as a trigger to save the changes made in the textbox and then changing it back to a label.
    Last edited by Claude2005; Mar 18th, 2010 at 01:57 AM. Reason: Additional Input

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width