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

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.
 
J

Juan T. Llibre

re:
Can anyone explain *why* this happens

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






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.
 
A

Amelyan

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.






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.
 
J

Juan T. Llibre

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!






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.



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.
 
J

John Timney \(ASP.NET MVP\)

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.






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.
 
A

Amelyan

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.






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.
 
A

Amelyan

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!






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.



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.
 

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

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top