Click here to Skip to main content
15,896,497 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i creating a web control and TableCell
in table cells i want to give a link to this envet:
tmpCell.Text += "<a href='#'   runat="server"   önclick='<% album_review();%>' style='height:7px;width:40px;border:outset'>download</a>";

to this event:
private void album_review(object sender, EventArgs e)
  {
      Response.Write("Da");
  }

But it does not work
please help :
Posted
Comments
ChauhanAjay 9-Sep-14 2:01am    
You cannot call a server side function from client side link.
Instead of using a client side link you could use a hyperlink button and call its click event.
Member 10631195 9-Sep-14 2:07am    
but button is not chaild of table
Member 10631195 9-Sep-14 2:05am    
i wont create links in cell of table in onclick go to function in serer
Member 10631195 9-Sep-14 2:14am    
ist not working . Maybe I will try "LinkButton"?

1 solution

See this Thread on StackOverflow, This may be help you. And Again I can see double dots on your 'O' of OnClick

http://stackoverflow.com/questions/4537490/call-a-c-sharp-function-in-asp-net-when-clicking-on-a-html-link-a[^]
 
Share this answer
 
v3
Comments
Member 10631195 9-Sep-14 2:24am    
i did this and it not work
<pre>
tmpCell.Text += "<asp:LinkButton id='album" + row["Pruduce"].ToString() + "' runat='server' OnClick='album_review'/>LinkButton";
</pre>
Gihan Liyanage 9-Sep-14 2:28am    
<a href="#" runat="server" onServerClick="MyFuncion_Click" />
Gihan Liyanage 15-Sep-14 6:29am    
Did you got a solution from my support, I can see you have not accepted any answer.If you are ok with this answer plz accept it. Then any user having same problem can identified it has solved the problem..

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

  Print Answers RSS


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