Javascript Warning Expected Expression

2 posts, 0 answers
  1. David Penny
    David Penny avatar
    174 posts
    Member since:
    Jun 2006

    Posted 10 Oct 2008 Link to this post

    Hi,

    I have been using the following Javascript to get the current values from a Combox for a while now.  Have recently updated to VS2008 and I now get a warning squiggle which says "Expected Expression".

    var
    ProjectsCombo = <%=ddlProject.ClientID %>;

    Everything still seems to work OK, but I was just wondering whether I should be using a different syntax here to avoid the warning?

    I am using the RadControls for ASP.NET Ajax Q2 2008 with latest service pack.

    David Penny

     

  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 10 Oct 2008 Link to this post

    Hi David,

    I suggest you use the following code to get the client-side object of RadComboBox:

    var ProjectsCombo = $find("<%= ddlProject.ClientID %>");  

    Regards,
    Yana
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top