Onclick event for anchor tag.

Last Reply on Dec 28, 2011 02:26 AM By Mudassar

Posted on Dec 28, 2011 01:36 AM

Hi....

I'm facing a problem from onclick event for anchor tag.In my code,I create a anchor tag in repeater,and I bind the url's dynamically to href attribute.nw i want capture the clicks on that anchor tag.for that in databindg of repeter,i;m giving an id and i want just pass that id into server side method.

Please Help to me..

thanks...

You are viewing reply posted by: Mudassar on Dec 28, 2011 02:26 AM.
Posted on Dec 28, 2011 02:26 AM

Use a linkbutton instead of Anchor tag

Then you can fetch the Linkbutton parameters in the click event

http://www.aspsnippets.com/Articles/ASPNet-Repeater-Get-Item-ItemIndex-CommandName-and-CommandArgument-on-Click-Events.aspx