1
   <div style="float: left">
                        <a href="javascript:void(0)" onclick="javascript:chatWith('Ankit')">
                            <asp:Label ID="NameLbl2" Text='<%# Eval("Values")  %>' runat="server"></asp:Label></a></div>

this is the code that I am using inside a repeater with a java script function onclick="javascript:chatWith('userName')" , I want to use another name at the place of "userName" with the help of "EVAL()".??????

1 Answer 1

1

If the userNamefield is member of dataSource then use Eval():

<a href="javascript:void(0)" 
   onclick=javascript:chatWith('<%# Eval("userName") %>')>
   Someting...
</a>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.