"Nathan Sokalski" <ns*******@kyledavidgroup.comwrote in message
news:uK**************@TK2MSFTNGP02.phx.gbl...
>I have a Button that uses the PostBackUrl property which is inside a
Repeater template. When I get to the Page that is being posted to (the one
specified in PostBackUrl), I am having trouble getting access to the Button
that was clicked, because I cannot use the PreviousPage.FindControl()
method since I do not know the id of the Button. What can I do to get
access to a Button that was inside a Repeater? Thanks.
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
The way i do it is a bit manual...
Any postback has 2 arguments...
function __doPostBack(eventTarget, eventArgument)
Unfortunatelly i am not sure how to use evenArgument.
So i would dump on my page (not in the repeater) empty (so it's not visible
on the page) LinkButton (id=LinkButton1) and write OnClick code..
and in DataRepeater will put my own <a
href="__doPostBack('<%#LinkButton1.UniqueID%>','<% #Eval(recordID)%>')">Click
here</a>
The in OnClick code i would get the recordId by
string sId = Request.Form["__EVENTARGUMENT"];
Hope you get an idea..
PS: I wrote of the memory so you might have to modify it a little (instead
of UniqueID use ClientID)....
George.