Re: call javascript function with databinder-value?

Discussion in 'ASP .Net' started by Raterus, May 24, 2004.

  1. Raterus

    Raterus Guest

    What exact problem do you have, you definitely look to be on the right track though. If I had to guess though, the compiler is getting confused with single-quotes within single-quotes.

    --Michael

    "p dietz" <> wrote in message news:...
    > Hello NG,
    > I want to create a asp.net-Hyperlink-Button by using Databinder-methods within a javascript-call, but i'm not able to find the right way.
    > I believed something like this:
    > <asp:hyperlink id=Hyperlink1 runat="server" Font-Names="Tahoma" Font-Size="XX-Small" NavigateUrl="javascript:OpenCal('<%# DataBinder.Eval(Container, 'DataItem.GEBURTSDATUM', '{0:d}') %>','txEditGebDat')">Kalender</asp:hyperlink>
    >
    > OpenCal is the javascript-function which should open a calender with the given date (by databinder).
    > In fact, in the generated html-page it should be
    > <a href="javascript:OpenCal('24.05.2003','txtEditGebDat')>
    >
    > What must i do to make it run?
    > Thanks
    > Peter
    >
    Raterus, May 24, 2004
    #1
    1. Advertising

  2. Hello
    I've tried a lots of possibility - nothing works. One time, the page can not be loaded because of compiler error in this line, or other times it loads, but does not work ( the link gets something like javascript:eek:penCal("<%# databinder..."))
    I've also tried to make a "normal" HTML-Link by <a href="javascript.openCal(' databinder-expression '), but this has the same problem. I also believe that the key to work is the correct use of ' and " - but how is the correct use
    =?Utf-8?B?cCBkaWV0eg==?=, May 24, 2004
    #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. Tom Lee
    Replies:
    2
    Views:
    821
    Chris Carter
    Dec 9, 2003
  2. Kylin
    Replies:
    0
    Views:
    347
    Kylin
    Jun 20, 2005
  3. Replies:
    2
    Views:
    750
    Laurent Bugnion
    May 20, 2006
  4. grbgooglefan
    Replies:
    2
    Views:
    409
    Pascal Bourguignon
    Jan 30, 2008
  5. grbgooglefan
    Replies:
    4
    Views:
    428
    Kenny McCormack
    Jan 30, 2008
Loading...

Share This Page