Web User Controls(ascx) 1.1 VS 2.0

Discussion in 'ASP .Net Web Controls' started by Pony Tsui, Jun 19, 2006.

  1. Pony Tsui

    Pony Tsui Guest

    I writed a user controls in vs2003, it's work fine, recently i move it to
    VS2005, open IE, everything is fine, but when i open the firefox, the control
    can not run, the control use client side javascript, so i check the firefox's
    javascript console, it show a error: myControlID(in ascx)_controlID(in aspx)
    not found, i open the Vs2003 & 2005 web page from IE & FireFox and view the
    rend out html page source, i found the control ID in page source is different:

    in vs2003 page IE & Firefox is myControlID(in ascx):controlID(in aspx)
    in vs2005 page IE myControlID(in ascx):controlID(in aspx)
    but Firefox is myControlID(in ascx)$controlID(in aspx)
    the different is ':' & '$'

    i don't know the exact problem is, can anyone help me, thanks.

    --
    Pony Tsui
     
    Pony Tsui, Jun 19, 2006
    #1
    1. Advertising

  2. Hi Pony,

    Thank you for your post.

    Based on my understanding, the problem is: you're reference some server
    control in your client-side javascript and found that the generated control
    id is different in different browser. If I've misunderstood anything,
    please feel free to post here.

    It is recommended that you do not rely on directly referencing the IDs as
    you can see them in the browser. The formula used to generate unique IDs
    for child controls can change. Instead, get the value of the child
    control's ClientID property and use that value to reference the child
    control. For more info, please refer to following MSDN documentation:

    #Client Script in ASP.NET Web Pages
    http://msdn2.microsoft.com/en-us/3hc29e2a.aspx#IdentifyingServerControlsInCl
    ientScript


    Regards,
    Walter Wang
    Microsoft Online Community Support

    ==================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    ==================================================

    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Walter Wang [MSFT], Jun 19, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Quentin
    Replies:
    1
    Views:
    497
    Quentin
    Jul 29, 2003
  2. Jason Shohet
    Replies:
    1
    Views:
    488
    Kevin Spencer
    Nov 10, 2003
  3. Holger (David) Wagner
    Replies:
    2
    Views:
    1,955
    Holger (David) Wagner
    Jul 3, 2004
  4. Andy B
    Replies:
    4
    Views:
    2,696
    Juan T. Llibre
    Apr 25, 2008
  5. Joe
    Replies:
    1
    Views:
    386
    Jeffrey Tan[MSFT]
    Feb 16, 2004
Loading...

Share This Page