Problem with asp Variables

Joined
Mar 4, 2009
Messages
1
Reaction score
0
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:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,102
Messages
2,570,645
Members
47,245
Latest member
ShannonEat

Latest Threads

Top