altering .UniqueID | | |
Is there any way to alter this? I am aware that it's read only.
Essentially the problem is that I have a webcontrol that dynamically
creates a textbox and a requiredfieldvalidator control with the
validator validating the textbox. This worked fine in my test harness
and works fine in my other projects using master page based pages when
in IE but in Firefox, the other project doesn't work. I've been able to
narrow it down to teh fact that we've got a preappend on the ID of the
controls of "_ctl0" and as an underscore isn't a valid start character,
firefox doesn't run the javascript (quite rightly).
I'd prefer to alter this within the original code that creates the sub
controls rather than hack it in the other project as it's to be part of
a common library for use elsewhere. | | | | re: altering .UniqueID
Can you try the name tag instead?
<jason.hau@gmail.comschreef in bericht
news:1158923113.734164.140280@i3g2000cwc.googlegro ups.com... Quote:
Is there any way to alter this? I am aware that it's read only.
Essentially the problem is that I have a webcontrol that dynamically
creates a textbox and a requiredfieldvalidator control with the
validator validating the textbox. This worked fine in my test harness
and works fine in my other projects using master page based pages when
in IE but in Firefox, the other project doesn't work. I've been able to
narrow it down to teh fact that we've got a preappend on the ID of the
controls of "_ctl0" and as an underscore isn't a valid start character,
firefox doesn't run the javascript (quite rightly).
I'd prefer to alter this within the original code that creates the sub
controls rather than hack it in the other project as it's to be part of
a common library for use elsewhere.
>
| | | | re: altering .UniqueID
Not really an option, the validators work by writing a javascript array
called Page_Validators, automatically generated by .NET itself. This is
then referenced by another automatically generated item, a javascript
file, which it pulls out using a handler via
webresource.axd?somerandomguid. As such, can't really alter the
javascript call itself where the validation fires off nor is it really
practical to try and reverse engineer this js file.
I have found another ID reference: ClientID but again, read only. The
only one which you appera to be able to alter is ID which is of no use
whatsoever. All I want is to be able to change the ID, I fail to
understand why this is so hard, especially as I keep hearing "oh yes,
validators have been fixed to work with Firefox in .NET 2.0".
BTW, Test Harness works in Firefox because it lacks the auto
pre-append. I'm not exactly sure where this auto generated _ctl0 is
coming from. Admittedly the control sits inside an ascx (which has a
normal id) and then itself with a contentplaceholder based off a
seperate master page. If I knew where that was coming from I would be
able to override it but the control has an ID, the placeholder has an
ID and I'm at a loss to determine why it's appearing.
Edwin Knoppert wrote: Quote:
Can you try the name tag instead?
>
>
<jason.hau@gmail.comschreef in bericht
news:1158923113.734164.140280@i3g2000cwc.googlegro ups.com... Quote:
Is there any way to alter this? I am aware that it's read only.
Essentially the problem is that I have a webcontrol that dynamically
creates a textbox and a requiredfieldvalidator control with the
validator validating the textbox. This worked fine in my test harness
and works fine in my other projects using master page based pages when
in IE but in Firefox, the other project doesn't work. I've been able to
narrow it down to teh fact that we've got a preappend on the ID of the
controls of "_ctl0" and as an underscore isn't a valid start character,
firefox doesn't run the javascript (quite rightly).
I'd prefer to alter this within the original code that creates the sub
controls rather than hack it in the other project as it's to be part of
a common library for use elsewhere.
| | | | re: altering .UniqueID
I don't have ff installed but i often needed to use document.GetEl.. ByID(
'name of control') to get an object refer.
Is the quoted way not a solution?
"RVB" <jason.hau@gmail.comschreef in bericht
news:1158932946.946956.249610@m7g2000cwm.googlegro ups.com... Quote:
Not really an option, the validators work by writing a javascript array
called Page_Validators, automatically generated by .NET itself. This is
then referenced by another automatically generated item, a javascript
file, which it pulls out using a handler via
webresource.axd?somerandomguid. As such, can't really alter the
javascript call itself where the validation fires off nor is it really
practical to try and reverse engineer this js file.
I have found another ID reference: ClientID but again, read only. The
only one which you appera to be able to alter is ID which is of no use
whatsoever. All I want is to be able to change the ID, I fail to
understand why this is so hard, especially as I keep hearing "oh yes,
validators have been fixed to work with Firefox in .NET 2.0".
BTW, Test Harness works in Firefox because it lacks the auto
pre-append. I'm not exactly sure where this auto generated _ctl0 is
coming from. Admittedly the control sits inside an ascx (which has a
normal id) and then itself with a contentplaceholder based off a
seperate master page. If I knew where that was coming from I would be
able to override it but the control has an ID, the placeholder has an
ID and I'm at a loss to determine why it's appearing.
Edwin Knoppert wrote: Quote:
>Can you try the name tag instead?
>>
>>
><jason.hau@gmail.comschreef in bericht
>news:1158923113.734164.140280@i3g2000cwc.googlegr oups.com... Quote:
Is there any way to alter this? I am aware that it's read only.
Essentially the problem is that I have a webcontrol that dynamically
creates a textbox and a requiredfieldvalidator control with the
validator validating the textbox. This worked fine in my test harness
and works fine in my other projects using master page based pages when
in IE but in Firefox, the other project doesn't work. I've been able to
narrow it down to teh fact that we've got a preappend on the ID of the
controls of "_ctl0" and as an underscore isn't a valid start character,
firefox doesn't run the javascript (quite rightly).
I'd prefer to alter this within the original code that creates the sub
controls rather than hack it in the other project as it's to be part of
a common library for use elsewhere.
>
>
| | | | re: altering .UniqueID
Like:
var o = document.getElementById('<%=txt_Index.ClientID%>') ;
o.value = ....
"RVB" <jason.hau@gmail.comschreef in bericht
news:1158932946.946956.249610@m7g2000cwm.googlegro ups.com... Quote:
Not really an option, the validators work by writing a javascript array
called Page_Validators, automatically generated by .NET itself. This is
then referenced by another automatically generated item, a javascript
file, which it pulls out using a handler via
webresource.axd?somerandomguid. As such, can't really alter the
javascript call itself where the validation fires off nor is it really
practical to try and reverse engineer this js file.
I have found another ID reference: ClientID but again, read only. The
only one which you appera to be able to alter is ID which is of no use
whatsoever. All I want is to be able to change the ID, I fail to
understand why this is so hard, especially as I keep hearing "oh yes,
validators have been fixed to work with Firefox in .NET 2.0".
BTW, Test Harness works in Firefox because it lacks the auto
pre-append. I'm not exactly sure where this auto generated _ctl0 is
coming from. Admittedly the control sits inside an ascx (which has a
normal id) and then itself with a contentplaceholder based off a
seperate master page. If I knew where that was coming from I would be
able to override it but the control has an ID, the placeholder has an
ID and I'm at a loss to determine why it's appearing.
Edwin Knoppert wrote: Quote:
>Can you try the name tag instead?
>>
>>
><jason.hau@gmail.comschreef in bericht
>news:1158923113.734164.140280@i3g2000cwc.googlegr oups.com... Quote:
Is there any way to alter this? I am aware that it's read only.
Essentially the problem is that I have a webcontrol that dynamically
creates a textbox and a requiredfieldvalidator control with the
validator validating the textbox. This worked fine in my test harness
and works fine in my other projects using master page based pages when
in IE but in Firefox, the other project doesn't work. I've been able to
narrow it down to teh fact that we've got a preappend on the ID of the
controls of "_ctl0" and as an underscore isn't a valid start character,
firefox doesn't run the javascript (quite rightly).
I'd prefer to alter this within the original code that creates the sub
controls rather than hack it in the other project as it's to be part of
a common library for use elsewhere.
>
>
| | | | re: altering .UniqueID
As far as I'm aware, it's not, reason being that the actual javascript
array creation is done by the .NET framework automatically if it
detects that there are validators in the validator collection. It is
doing essentially the same as your snippet, it just outputs the actual
clientid for the validator control (at that point rendered as a span)
instead of doing a codebehind call. I can't actually get alter this
array and in any case, it wouldn't work because of the actual format of
the ID:
Using your example, "txt_Index.ClientID" would equate to
"_ctl0_txt_Index1". As it starts with an underscore, firefox doesn't
recognize it as a correct ID. So, as you can see, the problem stems
from the whole auto-generation of the clientID. Fix that and you'd be
laughing.
Several other people have apparently got around this by doing
control.ClientID = control.ClientID.Replace("_","") but I find that
highly unlikely as you -cannot- set the ClientID property, nor the
UniqueID.
Edwin Knoppert wrote: Quote:
Like:
var o = document.getElementById('<%=txt_Index.ClientID%>') ;
o.value = ....
>
>
"RVB" <jason.hau@gmail.comschreef in bericht
news:1158932946.946956.249610@m7g2000cwm.googlegro ups.com... Quote:
Not really an option, the validators work by writing a javascript array
called Page_Validators, automatically generated by .NET itself. This is
then referenced by another automatically generated item, a javascript
file, which it pulls out using a handler via
webresource.axd?somerandomguid. As such, can't really alter the
javascript call itself where the validation fires off nor is it really
practical to try and reverse engineer this js file.
I have found another ID reference: ClientID but again, read only. The
only one which you appera to be able to alter is ID which is of no use
whatsoever. All I want is to be able to change the ID, I fail to
understand why this is so hard, especially as I keep hearing "oh yes,
validators have been fixed to work with Firefox in .NET 2.0".
BTW, Test Harness works in Firefox because it lacks the auto
pre-append. I'm not exactly sure where this auto generated _ctl0 is
coming from. Admittedly the control sits inside an ascx (which has a
normal id) and then itself with a contentplaceholder based off a
seperate master page. If I knew where that was coming from I would be
able to override it but the control has an ID, the placeholder has an
ID and I'm at a loss to determine why it's appearing.
Edwin Knoppert wrote: Quote:
Can you try the name tag instead?
>
>
<jason.hau@gmail.comschreef in bericht
news:1158923113.734164.140280@i3g2000cwc.googlegro ups.com...
Is there any way to alter this? I am aware that it's read only.
Essentially the problem is that I have a webcontrol that dynamically
creates a textbox and a requiredfieldvalidator control with the
validator validating the textbox. This worked fine in my test harness
and works fine in my other projects using master page based pages when
in IE but in Firefox, the other project doesn't work. I've been able to
narrow it down to teh fact that we've got a preappend on the ID of the
controls of "_ctl0" and as an underscore isn't a valid start character,
firefox doesn't run the javascript (quite rightly).
I'd prefer to alter this within the original code that creates the sub
controls rather than hack it in the other project as it's to be part of
a common library for use elsewhere.
| | | | re: altering .UniqueID
I had the thought the quoted situation might have helped
(getElementById('...')
Have you actually tried this approach?
"RVB" <jason.hau@gmail.comschreef in bericht
news:1158940568.937879.33250@i3g2000cwc.googlegrou ps.com... Quote:
As far as I'm aware, it's not, reason being that the actual javascript
array creation is done by the .NET framework automatically if it
detects that there are validators in the validator collection. It is
doing essentially the same as your snippet, it just outputs the actual
clientid for the validator control (at that point rendered as a span)
instead of doing a codebehind call. I can't actually get alter this
array and in any case, it wouldn't work because of the actual format of
the ID:
Using your example, "txt_Index.ClientID" would equate to
"_ctl0_txt_Index1". As it starts with an underscore, firefox doesn't
recognize it as a correct ID. So, as you can see, the problem stems
from the whole auto-generation of the clientID. Fix that and you'd be
laughing.
Several other people have apparently got around this by doing
control.ClientID = control.ClientID.Replace("_","") but I find that
highly unlikely as you -cannot- set the ClientID property, nor the
UniqueID.
>
Edwin Knoppert wrote: Quote:
>Like:
>var o = document.getElementById('<%=txt_Index.ClientID%>') ;
>o.value = ....
>>
>>
>"RVB" <jason.hau@gmail.comschreef in bericht
>news:1158932946.946956.249610@m7g2000cwm.googlegr oups.com... Quote:
Not really an option, the validators work by writing a javascript array
called Page_Validators, automatically generated by .NET itself. This is
then referenced by another automatically generated item, a javascript
file, which it pulls out using a handler via
webresource.axd?somerandomguid. As such, can't really alter the
javascript call itself where the validation fires off nor is it really
practical to try and reverse engineer this js file.
I have found another ID reference: ClientID but again, read only. The
only one which you appera to be able to alter is ID which is of no use
whatsoever. All I want is to be able to change the ID, I fail to
understand why this is so hard, especially as I keep hearing "oh yes,
validators have been fixed to work with Firefox in .NET 2.0".
BTW, Test Harness works in Firefox because it lacks the auto
pre-append. I'm not exactly sure where this auto generated _ctl0 is
coming from. Admittedly the control sits inside an ascx (which has a
normal id) and then itself with a contentplaceholder based off a
seperate master page. If I knew where that was coming from I would be
able to override it but the control has an ID, the placeholder has an
ID and I'm at a loss to determine why it's appearing.
Edwin Knoppert wrote:
>Can you try the name tag instead?
>>
>>
><jason.hau@gmail.comschreef in bericht
>news:1158923113.734164.140280@i3g2000cwc.googlegr oups.com...
Is there any way to alter this? I am aware that it's read only.
Essentially the problem is that I have a webcontrol that dynamically
creates a textbox and a requiredfieldvalidator control with the
validator validating the textbox. This worked fine in my test
harness
and works fine in my other projects using master page based pages
when
in IE but in Firefox, the other project doesn't work. I've been able
to
narrow it down to teh fact that we've got a preappend on the ID of
the
controls of "_ctl0" and as an underscore isn't a valid start
character,
firefox doesn't run the javascript (quite rightly).
I'd prefer to alter this within the original code that creates the
sub
controls rather than hack it in the other project as it's to be part
of
a common library for use elsewhere.
>
>
>
| | | | re: altering .UniqueID
I -cannot- alter the javascript as it is auto-generated and the API
does not provide me with an entry point to do so.
I have gotten a touch further, the original _ctrl0 was coming from the
ID of the Master.ID property on the page itself. When I altered the ID
of the Page.Master property, I was able to remove the "_" from the
generated clientID so it ends up as "ctrl0_txtSomething_ctrl1" which,
as far as I can see is definately a valid ID which can be passed to the
document.getElementById function. However, still doesn't work.
Additionally, I've crossposted to the javascript newsgroup but has
anyone hit this before in .NET?
Edwin Knoppert wrote: Quote:
I had the thought the quoted situation might have helped
(getElementById('...')
Have you actually tried this approach?
>
>
"RVB" <jason.hau@gmail.comschreef in bericht
news:1158940568.937879.33250@i3g2000cwc.googlegrou ps.com... Quote:
As far as I'm aware, it's not, reason being that the actual javascript
array creation is done by the .NET framework automatically if it
detects that there are validators in the validator collection. It is
doing essentially the same as your snippet, it just outputs the actual
clientid for the validator control (at that point rendered as a span)
instead of doing a codebehind call. I can't actually get alter this
array and in any case, it wouldn't work because of the actual format of
the ID:
Using your example, "txt_Index.ClientID" would equate to
"_ctl0_txt_Index1". As it starts with an underscore, firefox doesn't
recognize it as a correct ID. So, as you can see, the problem stems
from the whole auto-generation of the clientID. Fix that and you'd be
laughing.
Several other people have apparently got around this by doing
control.ClientID = control.ClientID.Replace("_","") but I find that
highly unlikely as you -cannot- set the ClientID property, nor the
UniqueID.
Edwin Knoppert wrote: Quote:
Like:
var o = document.getElementById('<%=txt_Index.ClientID%>') ;
o.value = ....
>
>
"RVB" <jason.hau@gmail.comschreef in bericht
news:1158932946.946956.249610@m7g2000cwm.googlegro ups.com...
Not really an option, the validators work by writing a javascript array
called Page_Validators, automatically generated by .NET itself. This is
then referenced by another automatically generated item, a javascript
file, which it pulls out using a handler via
webresource.axd?somerandomguid. As such, can't really alter the
javascript call itself where the validation fires off nor is it really
practical to try and reverse engineer this js file.
I have found another ID reference: ClientID but again, read only. The
only one which you appera to be able to alter is ID which is of no use
whatsoever. All I want is to be able to change the ID, I fail to
understand why this is so hard, especially as I keep hearing "oh yes,
validators have been fixed to work with Firefox in .NET 2.0".
BTW, Test Harness works in Firefox because it lacks the auto
pre-append. I'm not exactly sure where this auto generated _ctl0 is
coming from. Admittedly the control sits inside an ascx (which has a
normal id) and then itself with a contentplaceholder based off a
seperate master page. If I knew where that was coming from I would be
able to override it but the control has an ID, the placeholder has an
ID and I'm at a loss to determine why it's appearing.
Edwin Knoppert wrote:
Can you try the name tag instead?
>
>
<jason.hau@gmail.comschreef in bericht
news:1158923113.734164.140280@i3g2000cwc.googlegro ups.com...
Is there any way to alter this? I am aware that it's read only.
Essentially the problem is that I have a webcontrol that dynamically
creates a textbox and a requiredfieldvalidator control with the
validator validating the textbox. This worked fine in my test
harness
and works fine in my other projects using master page based pages
when
in IE but in Firefox, the other project doesn't work. I've been able
to
narrow it down to teh fact that we've got a preappend on the ID of
the
controls of "_ctl0" and as an underscore isn't a valid start
character,
firefox doesn't run the javascript (quite rightly).
I'd prefer to alter this within the original code that creates the
sub
controls rather than hack it in the other project as it's to be part
of
a common library for use elsewhere. | | | | re: altering .UniqueID
>I -cannot- alter the javascript as it is auto-generated and the API does Quote:
>not provide me with an entry point to do so.
That was not my point.
I asked if you tried to obtain an object using this getElementById('...')
often people directly refer to a control in js, which not always works.
Obtaining a refer to the control using getElementById('...') is imo better.
So.. a simple:
alert( getElementById(' your clientid stuff here ') );
Does that result in an object or null?
"RVB" <jason.hau@gmail.comschreef in bericht
news:1159199147.464521.284870@i3g2000cwc.googlegro ups.com... Quote:
>I -cannot- alter the javascript as it is auto-generated and the API
does not provide me with an entry point to do so.
>
I have gotten a touch further, the original _ctrl0 was coming from the
ID of the Master.ID property on the page itself. When I altered the ID
of the Page.Master property, I was able to remove the "_" from the
generated clientID so it ends up as "ctrl0_txtSomething_ctrl1" which,
as far as I can see is definately a valid ID which can be passed to the
document.getElementById function. However, still doesn't work.
>
Additionally, I've crossposted to the javascript newsgroup but has
anyone hit this before in .NET?
>
Edwin Knoppert wrote:
> Quote:
>I had the thought the quoted situation might have helped
>(getElementById('...')
>Have you actually tried this approach?
>>
>>
>"RVB" <jason.hau@gmail.comschreef in bericht
>news:1158940568.937879.33250@i3g2000cwc.googlegro ups.com... Quote:
As far as I'm aware, it's not, reason being that the actual javascript
array creation is done by the .NET framework automatically if it
detects that there are validators in the validator collection. It is
doing essentially the same as your snippet, it just outputs the actual
clientid for the validator control (at that point rendered as a span)
instead of doing a codebehind call. I can't actually get alter this
array and in any case, it wouldn't work because of the actual format of
the ID:
Using your example, "txt_Index.ClientID" would equate to
"_ctl0_txt_Index1". As it starts with an underscore, firefox doesn't
recognize it as a correct ID. So, as you can see, the problem stems
from the whole auto-generation of the clientID. Fix that and you'd be
laughing.
Several other people have apparently got around this by doing
control.ClientID = control.ClientID.Replace("_","") but I find that
highly unlikely as you -cannot- set the ClientID property, nor the
UniqueID.
>
Edwin Knoppert wrote:
>Like:
>var o = document.getElementById('<%=txt_Index.ClientID%>') ;
>o.value = ....
>>
>>
>"RVB" <jason.hau@gmail.comschreef in bericht
>news:1158932946.946956.249610@m7g2000cwm.googlegr oups.com...
Not really an option, the validators work by writing a javascript
array
called Page_Validators, automatically generated by .NET itself. This
is
then referenced by another automatically generated item, a
javascript
file, which it pulls out using a handler via
webresource.axd?somerandomguid. As such, can't really alter the
javascript call itself where the validation fires off nor is it
really
practical to try and reverse engineer this js file.
I have found another ID reference: ClientID but again, read only.
The
only one which you appera to be able to alter is ID which is of no
use
whatsoever. All I want is to be able to change the ID, I fail to
understand why this is so hard, especially as I keep hearing "oh
yes,
validators have been fixed to work with Firefox in .NET 2.0".
BTW, Test Harness works in Firefox because it lacks the auto
pre-append. I'm not exactly sure where this auto generated _ctl0 is
coming from. Admittedly the control sits inside an ascx (which has a
normal id) and then itself with a contentplaceholder based off a
seperate master page. If I knew where that was coming from I would
be
able to override it but the control has an ID, the placeholder has
an
ID and I'm at a loss to determine why it's appearing.
Edwin Knoppert wrote:
>Can you try the name tag instead?
>>
>>
><jason.hau@gmail.comschreef in bericht
>news:1158923113.734164.140280@i3g2000cwc.googlegr oups.com...
Is there any way to alter this? I am aware that it's read only.
Essentially the problem is that I have a webcontrol that
dynamically
creates a textbox and a requiredfieldvalidator control with the
validator validating the textbox. This worked fine in my test
harness
and works fine in my other projects using master page based pages
when
in IE but in Firefox, the other project doesn't work. I've been
able
to
narrow it down to teh fact that we've got a preappend on the ID
of
the
controls of "_ctl0" and as an underscore isn't a valid start
character,
firefox doesn't run the javascript (quite rightly).
I'd prefer to alter this within the original code that creates
the
sub
controls rather than hack it in the other project as it's to be
part
of
a common library for use elsewhere.
>
>
>
>
| | | | re: altering .UniqueID
Sorry for the mix up.
I've actually got a touch further in that it now does populate the
array correctly but the actual validation function isn't being called.
I've checked with various formats of IDs and it definately wasn't
picking it up when using an underscore as the beginning character, i.e.
the array was empty. Got it to output without that beginning underscore
and it now picks up the elements. Now just seeing why it doesn't
register the validator.IsValid property as false.
Edwin Knoppert wrote: Quote: Quote:
I -cannot- alter the javascript as it is auto-generated and the API does
not provide me with an entry point to do so.
>
That was not my point.
I asked if you tried to obtain an object using this getElementById('...')
often people directly refer to a control in js, which not always works.
Obtaining a refer to the control using getElementById('...') is imo better.
>
So.. a simple:
alert( getElementById(' your clientid stuff here ') );
>
Does that result in an object or null?
>
>
"RVB" <jason.hau@gmail.comschreef in bericht
news:1159199147.464521.284870@i3g2000cwc.googlegro ups.com... Quote:
I -cannot- alter the javascript as it is auto-generated and the API
does not provide me with an entry point to do so.
I have gotten a touch further, the original _ctrl0 was coming from the
ID of the Master.ID property on the page itself. When I altered the ID
of the Page.Master property, I was able to remove the "_" from the
generated clientID so it ends up as "ctrl0_txtSomething_ctrl1" which,
as far as I can see is definately a valid ID which can be passed to the
document.getElementById function. However, still doesn't work.
Additionally, I've crossposted to the javascript newsgroup but has
anyone hit this before in .NET?
Edwin Knoppert wrote: Quote:
I had the thought the quoted situation might have helped
(getElementById('...')
Have you actually tried this approach?
>
>
"RVB" <jason.hau@gmail.comschreef in bericht
news:1158940568.937879.33250@i3g2000cwc.googlegrou ps.com...
As far as I'm aware, it's not, reason being that the actual javascript
array creation is done by the .NET framework automatically if it
detects that there are validators in the validator collection. It is
doing essentially the same as your snippet, it just outputs the actual
clientid for the validator control (at that point rendered as a span)
instead of doing a codebehind call. I can't actually get alter this
array and in any case, it wouldn't work because of the actual format of
the ID:
Using your example, "txt_Index.ClientID" would equate to
"_ctl0_txt_Index1". As it starts with an underscore, firefox doesn't
recognize it as a correct ID. So, as you can see, the problem stems
from the whole auto-generation of the clientID. Fix that and you'd be
laughing.
Several other people have apparently got around this by doing
control.ClientID = control.ClientID.Replace("_","") but I find that
highly unlikely as you -cannot- set the ClientID property, nor the
UniqueID.
Edwin Knoppert wrote:
Like:
var o = document.getElementById('<%=txt_Index.ClientID%>') ;
o.value = ....
>
>
"RVB" <jason.hau@gmail.comschreef in bericht
news:1158932946.946956.249610@m7g2000cwm.googlegro ups.com...
Not really an option, the validators work by writing a javascript
array
called Page_Validators, automatically generated by .NET itself. This
is
then referenced by another automatically generated item, a
javascript
file, which it pulls out using a handler via
webresource.axd?somerandomguid. As such, can't really alter the
javascript call itself where the validation fires off nor is it
really
practical to try and reverse engineer this js file.
I have found another ID reference: ClientID but again, read only.
The
only one which you appera to be able to alter is ID which is of no
use
whatsoever. All I want is to be able to change the ID, I fail to
understand why this is so hard, especially as I keep hearing "oh
yes,
validators have been fixed to work with Firefox in .NET 2.0".
BTW, Test Harness works in Firefox because it lacks the auto
pre-append. I'm not exactly sure where this auto generated _ctl0 is
coming from. Admittedly the control sits inside an ascx (which has a
normal id) and then itself with a contentplaceholder based off a
seperate master page. If I knew where that was coming from I would
be
able to override it but the control has an ID, the placeholder has
an
ID and I'm at a loss to determine why it's appearing.
Edwin Knoppert wrote:
Can you try the name tag instead?
>
>
<jason.hau@gmail.comschreef in bericht
news:1158923113.734164.140280@i3g2000cwc.googlegro ups.com...
Is there any way to alter this? I am aware that it's read only.
Essentially the problem is that I have a webcontrol that
dynamically
creates a textbox and a requiredfieldvalidator control with the
validator validating the textbox. This worked fine in my test
harness
and works fine in my other projects using master page based pages
when
in IE but in Firefox, the other project doesn't work. I've been
able
to
narrow it down to teh fact that we've got a preappend on the ID
of
the
controls of "_ctl0" and as an underscore isn't a valid start
character,
firefox doesn't run the javascript (quite rightly).
I'd prefer to alter this within the original code that creates
the
sub
controls rather than hack it in the other project as it's to be
part
of
a common library for use elsewhere. |  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,501 network members.
|