Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Urgent (please help): Post-back problem

Reply
Thread Tools

Urgent (please help): Post-back problem

 
 
Amir
Guest
Posts: n/a
 
      11-30-2004
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
 
Reply With Quote
 
 
 
 
Amir
Guest
Posts: n/a
 
      12-02-2004
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

"Leon Friesema" wrote:

> On Tue, 30 Nov 2004 00:41:03 -0800, "Amir"
> <(E-Mail Removed)> 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.
>

 
Reply With Quote
 
 
 
 
Amir
Guest
Posts: n/a
 
      12-03-2004
I'm using ItemCommand and CommandArgument ...
When I trace the code execution,I see that when I click the generated
LinkButton, It make postback and execute the Page_Load event handler, but
dose not find the ItemCommand event Handler.
The generated javascript code for the generated LinkButton in the repeater
is like this:


href="javascript:{if (typeof(Page_ClientValidate) != 'function' ||
Page_ClientValidate())
__doPostBack('Issues_Pager$Repeater1$_ctl1$LinkBut ton1','')} "


Amir

"Leon Friesema" wrote:

> On Wed, 1 Dec 2004 18:55:04 -0800, "Amir"
> <(E-Mail Removed)> wrote:
>
>
> >
> >"Leon Friesema" wrote:
> >
> >> On Tue, 30 Nov 2004 00:41:03 -0800, "Amir"
> >> <(E-Mail Removed)> 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!
>
> Leon.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
URGENT RichA <rander3127@gmail.com> For rec.photo.digital MVP of all time. Vote now!! URGENT. Griffin Digital Photography 0 08-27-2010 08:18 AM
urgent help....need urgent help on say string task.. pooja Software 0 03-03-2009 06:16 AM
!!URGENT!! Tor Vulnerability Discovered !!URGENT!! Security Advisory Computer Security 1 08-11-2007 09:04 PM
URGENT !! QUEUE STL PROBLEM URGENT!! Sachin Jagtap C++ 4 04-29-2005 12:08 PM
Urgent problem, repeat, Urgent problem. Rob Javascript 3 05-18-2004 12:05 AM



Advertisments