Click here to Skip to main content
15,920,801 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to open a modal dialog as result of client click. The issue is not being able to pass a parameter in the click event. If I don't use a link button it will work, but I need to be able to use the link button do to other requirements.

This works:
HTML
<a class="linkoff" onmouseover="this.className = 'linkon'"  önmouseout="this.className='linkoff'">
        id="A4"  önclick="javascript:OpenAssignDialog'<%=BIN %>'); return false;"  href="#">Add to Dreamsheet</a>


This doesn't:
ASP.NET
<asp:LinkButton runat="server" ID="lbAddDS" OnClientClick="javascript:OpenAssignDialog('<%=BIN %>'); return false;"  Text="Add">

I am trying to pass the BIN variable
Posted
Updated 10-Mar-13 11:09am
v2
Comments
Prasad Khandekar 10-Mar-13 14:58pm    
Have you checked the generated HTML? Please check it and see whether the output is correct or has some errors.

1 solution

I figuured out how to fix this. Changed ('<%=BIN %> to ('<%# Eval(BIN)%>') which allowed passing the parameter.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900