Reputation: 1
I am using ASP.NET 2.0
. I am building a table with an ImageButton
in each cell.
If the user clicks on a dropdown
, I do a postback and rebuild the table with a new set of ImageButtons.
When the user clicks on an ImageButton, I show the PostBackURL
property in a Javascript confirm box, and it is correct.
However, when I proceed after the postback described above, the actual PostBackURL
is the one from that cell before the page did the postback.
I am building each ImageButton
with a unique ID
on each page.
Does anyone have any ideas why the PostBackURL
shown on the ImageButton click is not actually being used?
Upvotes: 0
Views: 1133
Reputation: 116
Just check the spelling used. It should be Url instead of URL. So, try using PostBackUrl
instead of PostBackURL
.
Upvotes: 0
Reputation: 1
and?..or else just do this.
image button has a post back url r8 so when the user clicks on an image capture its id using jquery [$('#imagebutton').attr('id')] and just save this info in a hidden field and retreive the value using request.form["hiddenfield"]..
Upvotes: 0
Reputation: 1
Use a query string to capture the image buttons id.. Depending on the query string, the required image is displayed inside the image button
eg: response.redirect("home.aspx?imgid"+ib.id);
in the home page: string a=request.querystring("imgid");
Upvotes: 0