|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Who is the true Asp.Net MVP here?Can anyone explain *why* this happens (not how to work around it)?
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. Simple and I'm not even a mind reader, an expert, or an MVP. You're using a
server control that can postback and it doesn't have a value for its ID attribute. Provide the value and you can move on to other tasks. BTW - responding to what may be sloppy programming or accidental ommission or deletion of the value of the ID is not a work-around, it is a requirement of the compiler that will create an ID as you have discovered. You should learn how the page class events are processed and you will hopefully understand how and why auto-generated ID's occur and why they are needed. MSDN will help explain this. -- Show quoteHide quote<%= Clinton Gallagher METROmilwaukee (sm) "A Regional Information Service" NET csgallagher AT metromilwaukee.com URL http://metromilwaukee.com/ URL http://clintongallagher.metromilwaukee.com/ "Amelyan" <bamel***@wi.rr.com> wrote in message news:OTvQaBoeFHA.3040@TK2MSFTNGP14.phx.gbl... > Can anyone explain *why* this happens (not how to work around it)? > > 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. > > > I don't know, I think you do qualify for MVP :) Actually, every control that
postback has value set for ID. The thing is that it is an auto-generated id (like "_ctl8"). So, I am wondering why ID set to _ctl8 (auto-generated) would behave any differently from my explicitely set ID? I would like to just explicitely set it and move on, but I want to understand why. bwt, I am also from Milwaukee, what a coincidence... Show quoteHide quote "clintonG" <csgallag***@REMOVETHISTEXTmetromilwaukee.com> wrote in message news:%23zblZjoeFHA.2664@TK2MSFTNGP15.phx.gbl... > Simple and I'm not even a mind reader, an expert, or an MVP. You're using > a server control that can postback and it doesn't have a value for its ID > attribute. Provide the value and you can move on to other tasks. BTW - > responding to what may be sloppy programming or accidental ommission or > deletion of the value of the ID is not a work-around, it is a requirement > of the compiler that will create an ID as you have discovered. > > You should learn how the page class events are processed and you will > hopefully understand how and why auto-generated ID's occur and why they > are needed. MSDN will help explain this. > > -- > <%= Clinton Gallagher > METROmilwaukee (sm) "A Regional Information Service" > NET csgallagher AT metromilwaukee.com > URL http://metromilwaukee.com/ > URL http://clintongallagher.metromilwaukee.com/ > > > > > "Amelyan" <bamel***@wi.rr.com> wrote in message > news:OTvQaBoeFHA.3040@TK2MSFTNGP14.phx.gbl... >> Can anyone explain *why* this happens (not how to work around it)? >> >> 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. >> >> >> > > You are working in a disconnected type invirement, which means: though the
server generated the id, once it sends the page to the client it no longer keeps track of that id. Show quoteHide quote "Amelyan" wrote: > I don't know, I think you do qualify for MVP :) Actually, every control that > postback has value set for ID. The thing is that it is an auto-generated id > (like "_ctl8"). So, I am wondering why ID set to _ctl8 (auto-generated) > would behave any differently from my explicitely set ID? I would like to > just explicitely set it and move on, but I want to understand why. > > bwt, I am also from Milwaukee, what a coincidence... > > > "clintonG" <csgallag***@REMOVETHISTEXTmetromilwaukee.com> wrote in message > news:%23zblZjoeFHA.2664@TK2MSFTNGP15.phx.gbl... > > Simple and I'm not even a mind reader, an expert, or an MVP. You're using > > a server control that can postback and it doesn't have a value for its ID > > attribute. Provide the value and you can move on to other tasks. BTW - > > responding to what may be sloppy programming or accidental ommission or > > deletion of the value of the ID is not a work-around, it is a requirement > > of the compiler that will create an ID as you have discovered. > > > > You should learn how the page class events are processed and you will > > hopefully understand how and why auto-generated ID's occur and why they > > are needed. MSDN will help explain this. > > > > -- > > <%= Clinton Gallagher > > METROmilwaukee (sm) "A Regional Information Service" > > NET csgallagher AT metromilwaukee.com > > URL http://metromilwaukee.com/ > > URL http://clintongallagher.metromilwaukee.com/ > > > > > > > > > > "Amelyan" <bamel***@wi.rr.com> wrote in message > > news:OTvQaBoeFHA.3040@TK2MSFTNGP14.phx.gbl... > >> Can anyone explain *why* this happens (not how to work around it)? > >> > >> 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. > >> > >> > >> > > > > > > > Generating IDs is a CLR black box process that is used for garbage
collection and other tasks. It is not unique to any 'mode' presumed or documented as the serialized IDs are common to all compilation processes. With regard to Web Forms, each instance of a page class is initialized by the CLR, then each control in the class is initialized if it is CTS compliant and so on. The CLR has to have some way of keeping order of all the tasks the compilation process requires. It can be taken for granted until there is a need to learn to read IL (Intermediate Language). That's why we refer to many of these issues as black boxes. If you want to go artsy fartsy we can all it abstraction. I'm busy enough mastering application architecture, class design and implementation and while I appreciate the accolades we can't nominate ourselves as MVPs. Amelyan, we should kick it around in email or IM? <%= Clinton Gallagher METROmilwaukee (sm) "A Regional Information Service" NET csgallagher AT metromilwaukee.com URL http://metromilwaukee.com/ URL http://clintongallagher.metromilwaukee.com/ Show quoteHide quote "Harolds" <Haro***@discussions.microsoft.com> wrote in message news:081B2914-ACCE-4626-BA0A-9BF2EBA5F2D4@microsoft.com... > You are working in a disconnected type invirement, which means: though the > server generated the id, once it sends the page to the client it no longer > keeps track of that id. > > "Amelyan" wrote: > >> I don't know, I think you do qualify for MVP :) Actually, every control >> that >> postback has value set for ID. The thing is that it is an auto-generated >> id >> (like "_ctl8"). So, I am wondering why ID set to _ctl8 (auto-generated) >> would behave any differently from my explicitely set ID? I would like to >> just explicitely set it and move on, but I want to understand why. >> >> bwt, I am also from Milwaukee, what a coincidence... >> >> >> "clintonG" <csgallag***@REMOVETHISTEXTmetromilwaukee.com> wrote in >> message >> news:%23zblZjoeFHA.2664@TK2MSFTNGP15.phx.gbl... >> > Simple and I'm not even a mind reader, an expert, or an MVP. You're >> > using >> > a server control that can postback and it doesn't have a value for its >> > ID >> > attribute. Provide the value and you can move on to other tasks. BTW - >> > responding to what may be sloppy programming or accidental ommission or >> > deletion of the value of the ID is not a work-around, it is a >> > requirement >> > of the compiler that will create an ID as you have discovered. >> > >> > You should learn how the page class events are processed and you will >> > hopefully understand how and why auto-generated ID's occur and why they >> > are needed. MSDN will help explain this. >> > >> > -- >> > <%= Clinton Gallagher >> > METROmilwaukee (sm) "A Regional Information Service" >> > NET csgallagher AT metromilwaukee.com >> > URL http://metromilwaukee.com/ >> > URL http://clintongallagher.metromilwaukee.com/ >> > >> > >> > >> > >> > "Amelyan" <bamel***@wi.rr.com> wrote in message >> > news:OTvQaBoeFHA.3040@TK2MSFTNGP14.phx.gbl... >> >> Can anyone explain *why* this happens (not how to work around it)? >> >> >> >> 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. >> >> >> >> >> >> >> > >> > >> >> >>
Validation controls validate before form submits
HtmlInputFile issue binding - DropDownList flaw/bug? asp 2.0 wizard control (how to set focus on button) Trying hard to implement globalisation. Strange error message(urgent help needeed) Can't get the Microsoft Web Library Easy way to use bound combo with foreignkey id/value on webform? Implicit conversion from one object to another DropDownList replaces the & with & Right Justify Amounts in TextBox |
|||||||||||||||||||||||