Cross page postback

J

jazzart

Hi all,

I have been trying to implement cross page postback with a Repeater,
to no avail..

I have a Repeater on search.aspx which lists items from a database. In
each item template is a linkbutton that performs a cross page postback
to details.aspx.

On details.aspx I need to find the item in which the linkbutton was
selected. Is there any way at all to achieve this? Either by passing a
value (like the id of the data item), or by using FindControl to find
a textbox in that item.

I have searched high and low on google and various forums for a whole
day and have found nothing on this. All the examples I've found on
cross page postback reference static controls that are hard coded but
what about data bound items?

Any help would be greatly greatly appreciated.

Cheers,
Karen
 
B

bruce barker

I see no reason to do a postback at all. use a hyperlink with
display.aspx?id=<itemid> and in display.aspx use
Request.QueryString["id"] to get the value. then no javascript is
required, and bookmarks work.

-- bruce (sqlwork.com)
 
J

jazzart

The reason I need to do a cross page postback is because the target
page needs to know information from the previous page in order to do
things like paging (going to the next and previous result in the paged
data table) and also to remember the search results to navigate back
to.

Can you suggest an alternative way of maintaining this information?
Should I be storing all of this in the session object instead?


I see no reason to do apostbackat all. use a hyperlink with
display.aspx?id=<itemid> and in display.aspx use
Request.QueryString["id"] to get the value. then no javascript is
required, and bookmarks work.

-- bruce (sqlwork.com)

I have been trying to implementcrosspagepostbackwith a Repeater,
to no avail..
I have a Repeater on search.aspx which lists items from a database. In
each item template is a linkbutton that performs acrosspagepostback
to details.aspx.
On details.aspx I need to find the item in which the linkbutton was
selected. Is there any way at all to achieve this? Either by passing a
value (like the id of the data item), or by using FindControl to find
a textbox in that item.
I have searched high and low on google and various forums for a whole
day and have found nothing on this. All the examples I've found on
crosspagepostbackreference static controls that are hard coded but
what about data bound items?
Any help would be greatly greatly appreciated.
Cheers,
Karen
 

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

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top