Results 1 to 4 of 4

Thread: CallByName multiple property levels?

Threaded View

  1. #1

    Thread Starter
    Fanatic Member Graff's Avatar
    Join Date
    Jan 2002
    Location
    Calgary
    Posts
    668

    CallByName multiple property levels?

    I want to add attributes to 24 textboxes but am not sure how to go about it.

    I have

    Code:
    for i = 1 to 24
        CallByName("textbox"+i,"attributes.add",CallType.Method,"'onclick','CheckTxtBox(this)'")
    next i
    And it throws up on this saying

    Exception Details: System.MissingMemberException: Public member 'Attributes.Add' on type 'String' not found.

    [MissingMemberException: Public member 'Attributes.Add' on type 'String' not found.]
    Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn) +883
    Microsoft.VisualBasic.Interaction.CallByName(Object ObjectRef, String ProcName, CallType UseCallType, Object[] Args) +48
    imac.WebForm1.Page_Load(Object sender, EventArgs e) in C:\Documents and Settings\Jared\VSWebCache\index.aspx.vb:109
    System.Web.UI.Control.OnLoad(EventArgs e) +67
    System.Web.UI.Control.LoadRecursive() +35
    System.Web.UI.Page.ProcessRequestMain() +731

    I'm pretty sure it doesn't want me putting in more than just attributes but I need to access the add.... Help would be appriciated.
    Last edited by Graff; Aug 24th, 2004 at 01:22 AM.
    If wishes were fishes we'd all cast nets.

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