View Single Post
Old August 27th, 2008, 11:19 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

quote:I don't know why, but it works and that's the key.
It's important to understand the why, in order to do something like this in the future again.

The idea apparently was to pass the ID of the record through the query string. I suggested that, but you never confirmed. Here's what happens:

imgStatus(i).OnClientClick = String.Format("'Review.aspx?Id={0}');" , row1("TSRNumber"))

When this code is run, you end up with something like:

<img src="'Review.aspx?Id=12345');" ... />

When you click the image, you are taken to:


On that page, Request.QueryString("Id") gives you the ID of the selected record.

BTW: you don't need the javascript: prefix, and AFAIK, you don't need the array of ImageButton controls either.

Hope this helps,


Imar Spaanjaars
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.