Results 1 to 8 of 8

Thread: no way to get the text from a panel control?

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    no way to get the text from a panel control?

    well it doesnt have a .Text property but you can type text in it... I'm wondering is there a way to get the text in a panel control by code?
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    I just tried and I cant directly type text on the panel. If you use a label, then you can.

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by DevGrp
    I just tried and I cant directly type text on the panel. If you use a label, then you can.
    waa? you CAN directly type in the panel. just click on it a few times (kinda like you click on a file to rename it...)
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  4. #4
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    Ah damn, I did'nt realize that you were refering to the ASP.NET version . Thought it was the WinForm version.

  5. #5
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    Ok, I tried again. I dont think there is a way to get the text.

  6. #6

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by DevGrp
    Ah damn, I did'nt realize that you were refering to the ASP.NET version . Thought it was the WinForm version.
    hehehe

    it sounds rather stupid, ms lets you type in it but doesnt let you read what you've typed oh well, it would have been really nice
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  7. #7
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Here you go, u just gotta dig alittle deeper:

    Code:
        LiteralControl l = ((LiteralControl)Panel1.Controls[0]);
        Response.Write(String.Format("The text I contain is {0}", l.Text));
    The panel web control renders a span tag, so you'll have to grab his first child control to read the text value.

  8. #8

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by Lethal
    Here you go, u just gotta dig alittle deeper:

    Code:
        LiteralControl l = ((LiteralControl)Panel1.Controls[0]);
        Response.Write(String.Format("The text I contain is {0}", l.Text));
    The panel web control renders a span tag, so you'll have to grab his first child control to read the text value.
    w00T cool many thanks! you da man!
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

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