Results 1 to 3 of 3

Thread: [RESOLVED] Assign a value to a html control from Public Function

  1. #1

    Thread Starter
    Lively Member SpagettiProg's Avatar
    Join Date
    Dec 2004
    Location
    Miami, Florida
    Posts
    82

    Resolved [RESOLVED] Assign a value to a html control from Public Function

    Hi everyone,

    Recently, I filled up a datagrid using column templates. Each column pointed to Public Function in the code behind.

    Can I use this on html controls also?
    Example....

    <input type="button" onclick="btnEmail('check')" name="buttonEmail" value='<%# TestAddTextToButton() %>'>

    It does not seem to work, and I'm wondering if either...
    1-I'm using the wrong syntax
    2-It's not possible to do this.

    Note: I can't use response.write because that will place my control on top of the page.


    Any help is greatly appreciated.

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359

    Re: Assign a value to a html control from Public Function

    No, but all you have to do is convert it to a Server Control and you can
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3

    Thread Starter
    Lively Member SpagettiProg's Avatar
    Join Date
    Dec 2004
    Location
    Miami, Florida
    Posts
    82

    Re: Assign a value to a html control from Public Function

    Quote Originally Posted by plenderj
    No, but all you have to do is convert it to a Server Control and you can
    thank you. that worked

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