On Wed, 1 Dec 2004 18:55:04 -0800, "Amir"
[quoted text, click to view] <Amir@discussions.microsoft.com> wrote:
[quoted text, click to view] >
>"Leon Friesema" wrote:
>
>> On Tue, 30 Nov 2004 00:41:03 -0800, "Amir"
>> <Amir@discussions.microsoft.com> wrote:
>>
>> >Hello every one
>> >My problem is very clear but crazy.
>> >I have a DataRepeater in my page that I have made the paging mechanisem for
>> >it with a user control. This user control contains a Repeater too. Let's call
>> >this control Paging Control.
>> >
>> >The Paging control provide some links for paging.
>> >When I click the links, It post-back and fill the main repeater in the page.
>> >
>> >It looks the paging repeater dosen't postback. When I click on the links
>> >that have generated in paging control, page dosen't poskback and the related
>> >event handler dose not get executes. so the main repeater remain empty.
>> >Because I fill the main repeater again in these links' event handler.
>> >
>> >I think there is some problems in client-side script that .NET Framework
>> >generates.
>> >Please help me.
>> >It's urgent for me to solve this problem.
>> >
>> >Thanks in advance
>> >Amir
>>
>> Is AutoPostBack True?
>> Other then that, post some code.
>>
>> Leon.
>>
>Thnks a lot for your response Leon
>But there is not such property (AutoPostBack) in DataRepeater..
>I think It's a problem in generated Javascript.
>This is another sample for the problem.
>
>A usercontrol that contains a Repeater and a linkbutton.
>The repeater itself contains 2 link button.
>
>When click the button, it postback and execute page_load and then it's click
>event handler.
>When click the the repeater's linkbutton, it postback and only execute
>page_load. It can not find and don't execute the repeater's ItemCommand Event
>handler.
>
>Regards,
>Amir
Uhm.. you're not refreshing your data (in other words: rebinding your
dataset) on Postback are you? In that case the click event will never
fire. Furthermore you should handle the click-event for the button not
in a specific event for the buttons itself but in the ItemCommand for
the repeater (use a CommandArgument to distinguish the different rows
if needed), because; let's say you got two rows, with each two
buttons, so a row1.button1, row1.button2, row2.button1, row2.button2
and you click button1 --> which in that case should go to
button1_click. From which row was it clicked? Use ItemCommand!