Requires help of true Super-MVP to explain a particular aspect of Asp.Net behavior?

  • Thread starter Thread starter Amelyan
  • Start date Start date
A

Amelyan

Can anyone explain *why* this happens (not how to work around it)?
[Step-by-step explanation would be great]

An error has occurred because a control with auto-generated id '_ctl8' could
not be located to raise a postback event. To avoid this error, explicitly
set the ID property of controls that raise postback events.
 
re:
Can anyone explain *why* this happens

You didn't explicitly set the ID property
of a control that raises a postback event.




Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

Amelyan said:
Can anyone explain *why* this happens (not how to work around it)? [Step-by-step
explanation would be great]

An error has occurred because a control with auto-generated id '_ctl8' could not be
located to raise a postback event. To avoid this error, explicitly set the ID property
of controls that raise postback events.
 
Yeah, I could kind of figure out that much on my own.

What I am looking for is a good explanation of why?



Juan T. Llibre said:
re:
Can anyone explain *why* this happens

You didn't explicitly set the ID property
of a control that raises a postback event.




Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

Amelyan said:
Can anyone explain *why* this happens (not how to work around it)?
[Step-by-step explanation would be great]

An error has occurred because a control with auto-generated id '_ctl8'
could not be located to raise a postback event. To avoid this error,
explicitly set the ID property of controls that raise postback events.
 
What do you mean by "why" ?

The explanation I gave you, and which you
were given by the error message is "why"!

That's what you asked for, wasn't it ?

What else do you want to know,
given that you ruled out "how to work around it".

If you want to avoid that error, you must explicitly set the
ID property of a control that raises a postback event.

Did you ? If you didn't, you must!




Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

Amelyan said:
Yeah, I could kind of figure out that much on my own.
What I am looking for is a good explanation of why?


Juan T. Llibre said:
re:
Can anyone explain *why* this happens

You didn't explicitly set the ID property
of a control that raises a postback event.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

Amelyan said:
Can anyone explain *why* this happens (not how to work around it)? [Step-by-step
explanation would be great]

An error has occurred because a control with auto-generated id '_ctl8' could not be
located to raise a postback event. To avoid this error, explicitly set the ID property
of controls that raise postback events.
 
Something connected to _ctl8 is not being set in page load, thus the
controls events dont exist - in theory the control does not exist. It can
be connected to viewstate not being present for the control, sometimes
because of caching and thus not passing the correct information back in the
aspx postback - usually because oif dynamically generated controls that will
accept postback events requiring an ID thats not there.

The warning is telling you what the solution probably is - make sure you
explicitely set the ID.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

Amelyan said:
Yeah, I could kind of figure out that much on my own.

What I am looking for is a good explanation of why?



Juan T. Llibre said:
re:
Can anyone explain *why* this happens

You didn't explicitly set the ID property
of a control that raises a postback event.




Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

Amelyan said:
Can anyone explain *why* this happens (not how to work around it)?
[Step-by-step explanation would be great]

An error has occurred because a control with auto-generated id '_ctl8'
could not be located to raise a postback event. To avoid this error,
explicitly set the ID property of controls that raise postback events.
 
John,

Thanks again for your help. An explanation of why it happens is what I was
looking for, and you provided it.


John Timney (ASP.NET MVP) said:
Something connected to _ctl8 is not being set in page load, thus the
controls events dont exist - in theory the control does not exist. It can
be connected to viewstate not being present for the control, sometimes
because of caching and thus not passing the correct information back in
the aspx postback - usually because oif dynamically generated controls
that will accept postback events requiring an ID thats not there.

The warning is telling you what the solution probably is - make sure you
explicitely set the ID.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

Amelyan said:
Yeah, I could kind of figure out that much on my own.

What I am looking for is a good explanation of why?



Juan T. Llibre said:
re:
Can anyone explain *why* this happens

You didn't explicitly set the ID property
of a control that raises a postback event.




Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

Can anyone explain *why* this happens (not how to work around it)?
[Step-by-step explanation would be great]

An error has occurred because a control with auto-generated id '_ctl8'
could not be located to raise a postback event. To avoid this error,
explicitly set the ID property of controls that raise postback events.
 
In other words, what you are saying is you do what the message tells you to
do. However, you don't really try to understand why. Why do I need to
explicitely set ID? Why automatically generated IDs are not good enough in
this case? were my questions.

The thing is I try to understand why, instead of just blindly doing what I
am told to do.


Juan T. Llibre said:
What do you mean by "why" ?

The explanation I gave you, and which you
were given by the error message is "why"!

That's what you asked for, wasn't it ?

What else do you want to know,
given that you ruled out "how to work around it".

If you want to avoid that error, you must explicitly set the
ID property of a control that raises a postback event.

Did you ? If you didn't, you must!




Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

Amelyan said:
Yeah, I could kind of figure out that much on my own.
What I am looking for is a good explanation of why?


Juan T. Llibre said:
re:
Can anyone explain *why* this happens

You didn't explicitly set the ID property
of a control that raises a postback event.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

Can anyone explain *why* this happens (not how to work around it)?
[Step-by-step explanation would be great]

An error has occurred because a control with auto-generated id '_ctl8'
could not be located to raise a postback event. To avoid this error,
explicitly set the ID property of controls that raise postback events.
 
Back
Top