href onclick and eval problem

B

Beto

I am working on a project and I was thinking about implement ajax instead of
using pure asp.net, however I've got a problem.

The page:
the page is like a google, yahoo or any other search engine, but with a
difference: when you click a link, instead of go to a page, a text will be
added above the link, like expanding the page on the line above the link.

The idea:
The idea is populate a gridview where each row is a link. When the user
click one of the links (I am trying to use a simple <a href html tag), the
onclick attribute will make a call to an ajax method, passing a parameter
that I will get from the database (using the _Eval approach).
The method will call a codebehind method using the parameter to get the text
to be populated below to the link (I am planning use a <DIV> tag, where the
ID will be the same value passed as a parameter to Ajax).

The problem:
This code snipped is not working (specially the OnClick attribute):
<a href="http://mail.yahoo.com/config/login?/Default.aspx" ID="lkbArticle"
runat='server' onfiltered='getArticle(<%# _Eval("ArticleID")%>);return
false;'>
<%# _Eval("title")%> </a>
<br /><div id="<%# _Eval("ArticleID")%>"></div>

Inside of OnClick attribute, ASP.Net is not using the _Eval value, but the
string "<%# _Eval("ArticleID")%>"

I tried change quotes, etc, but anything seems to solve the problem.
Can anyone please give me a help?

Thanks a lot!
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top