Don't Understand error

Discussion in 'ASP .Net' started by Wayne Wengert, Nov 26, 2005.

  1. I am using a Gridview in an ASP.NET 2.0 (VB) application. In a hyperlink
    template column I want to build a url wich includes passing a couple of
    query strings that I need to populate dynamically.

    When that code is as shown here - it works fine:
    ======================
    NavigateUrl=
    <%#"javascript:javascript:eek:penWindow('ViewNominationText.aspx?id=4', 600,
    400 ,0 ,0 ,0 ,0 ,0 ,1 ,10 ,10 );" %>

    text="View">

    ======================

    When I change the code to:
    ======================
    NavigateUrl=
    <%#"javascript:javascript:eek:penWindow('ViewNominationText.aspx?id=" +
    DataBinder.Eval(Container.DataItem, "id")', 600, 400 ,0 ,0 ,0 ,0 ,0 ,1 ,10
    ,10 );" %>

    text="View">

    ==============================

    VWD 2005 flags the line with the error "')' expected" ?



    Something about the DataBinderEval process seems to be triggering the error
    and I cannot see the problem. Any thoughts will be much appreciated!



    Wayne
    Wayne Wengert, Nov 26, 2005
    #1
    1. Advertising

  2. You are replacing the ID with a dynamic value. Your string is not
    properly formatted:

    You have (only relevant part):

    xt.aspx?id=" + DataBinder.Eval(Container.DataItem, "id")', 600,

    It should be:

    xt.aspx?id=" + DataBinder.Eval(Container.DataItem, "id") + "', 600,

    Notice the + " after the databinder.eval statement.

    ----
    700cb Development, Inc.
    http://www.700cb.net
    ..NET utilities, developer tools,
    and enterprise solutions

    "Wayne Wengert" <> wrote in
    news::

    > I am using a Gridview in an ASP.NET 2.0 (VB) application. In a
    > hyperlink template column I want to build a url wich includes passing
    > a couple of query strings that I need to populate dynamically.
    >
    > When that code is as shown here - it works fine:
    > ======================
    > NavigateUrl=
    > <%#"javascript:javascript:eek:penWindow('ViewNominationText.aspx?id=4',
    > 600, 400 ,0 ,0 ,0 ,0 ,0 ,1 ,10 ,10 );" %>
    >
    > text="View">
    >
    > ======================
    >
    > When I change the code to:
    > ======================
    > NavigateUrl=
    > <%#"javascript:javascript:eek:penWindow('ViewNominationText.aspx?id=" +
    > DataBinder.Eval(Container.DataItem, "id")', 600, 400 ,0 ,0 ,0 ,0 ,0 ,1
    > ,10 ,10 );" %>
    >
    > text="View">
    >
    > ==============================
    >
    > VWD 2005 flags the line with the error "')' expected" ?
    >
    >
    >
    > Something about the DataBinderEval process seems to be triggering the
    > error and I cannot see the problem. Any thoughts will be much
    > appreciated!
    >
    >
    >
    > Wayne
    >
    >
    >




    --
    cbDevelopment, Dec 4, 2005
    #2
    1. Advertising

  3. Thanks

    Wayne

    "cbDevelopment" <dev2005@remove.700cb.net> wrote in message
    news:Xns97225226E3860cbDevelopment@207.46.248.16...
    > You are replacing the ID with a dynamic value. Your string is not
    > properly formatted:
    >
    > You have (only relevant part):
    >
    > xt.aspx?id=" + DataBinder.Eval(Container.DataItem, "id")', 600,
    >
    > It should be:
    >
    > xt.aspx?id=" + DataBinder.Eval(Container.DataItem, "id") + "', 600,
    >
    > Notice the + " after the databinder.eval statement.
    >
    > ----
    > 700cb Development, Inc.
    > http://www.700cb.net
    > .NET utilities, developer tools,
    > and enterprise solutions
    >
    > "Wayne Wengert" <> wrote in
    > news::
    >
    >> I am using a Gridview in an ASP.NET 2.0 (VB) application. In a
    >> hyperlink template column I want to build a url wich includes passing
    >> a couple of query strings that I need to populate dynamically.
    >>
    >> When that code is as shown here - it works fine:
    >> ======================
    >> NavigateUrl=
    >> <%#"javascript:javascript:eek:penWindow('ViewNominationText.aspx?id=4',
    >> 600, 400 ,0 ,0 ,0 ,0 ,0 ,1 ,10 ,10 );" %>
    >>
    >> text="View">
    >>
    >> ======================
    >>
    >> When I change the code to:
    >> ======================
    >> NavigateUrl=
    >> <%#"javascript:javascript:eek:penWindow('ViewNominationText.aspx?id=" +
    >> DataBinder.Eval(Container.DataItem, "id")', 600, 400 ,0 ,0 ,0 ,0 ,0 ,1
    >> ,10 ,10 );" %>
    >>
    >> text="View">
    >>
    >> ==============================
    >>
    >> VWD 2005 flags the line with the error "')' expected" ?
    >>
    >>
    >>
    >> Something about the DataBinderEval process seems to be triggering the
    >> error and I cannot see the problem. Any thoughts will be much
    >> appreciated!
    >>
    >>
    >>
    >> Wayne
    >>
    >>
    >>

    >
    >
    >
    > --
    Wayne Wengert, Dec 4, 2005
    #3
    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. simon

    Error message I don't understand

    simon, Dec 5, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    315
    Hatim R
    Dec 5, 2003
  2. m miller

    don't understand error

    m miller, Jan 9, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    1,731
    smitdso
    Sep 8, 2006
  3. Wayne  Wengert

    Don't Understand This error?

    Wayne Wengert, Mar 3, 2005, in forum: ASP .Net
    Replies:
    10
    Views:
    1,112
    George Christopher
    Jan 4, 2006
  4. Tobias Langner

    compiler error I don't understand

    Tobias Langner, Aug 1, 2003, in forum: C++
    Replies:
    7
    Views:
    328
    Jakob Bieling
    Aug 1, 2003
  5. Chris Saunders

    Don't understand syntax error

    Chris Saunders, May 16, 2005, in forum: C Programming
    Replies:
    9
    Views:
    473
    CBFalconer
    May 17, 2005
Loading...

Share This Page