View Single Post
  #8 (permalink)  
Old August 27th, 2008, 11:19 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Quote:
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("window.open('Review.aspx?Id={0}');" , row1("TSRNumber"))

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

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

When you click the image, you are taken to:

Review.aspx?Id=12345

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

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
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.