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


    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".

    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
    Yana avatar
    4604 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 %>");  

    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top