asp.net variable work as an argument of the OnCLientClick of the imagebutton. I have tried everything I can think of, including making the <a> runat="server" and that just brings me back to the same problem.
Here is some code I wil lonly paste the essential, there is much more going on in the loop, but this is where the problem is:
If I can find a way to pass this value to javascript or to code behind I can slve my problem.
Any help is appreciated.
Thanks.
Here is some code I wil lonly paste the essential, there is much more going on in the loop, but this is where the problem is:
Code:
<% int index = 0;
foreach (String id in IdCollection)
{
%>
<asp:imagebutton runat="server" ID="Imagebutton1"
ImageUrl="/images/loadImage.jpg"
AlternateText="Load This ID"
ActiveImageUrl="/images/loadImage_down.jpg"
OnClientClick="javascript:loadHiddenField('<% id %>');" />
<%
}
%>
If I can find a way to pass this value to javascript or to code behind I can slve my problem.
Any help is appreciated.
Thanks.