Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP Control names in resulting HTML

Reply
Thread Tools

ASP Control names in resulting HTML

 
 
Anatoli Trifonov
Guest
Posts: n/a
 
      06-06-2004
Hi all

Please point me to a link if this can be changed, fixed or something

I have the following control in my UserControl

<img src="pic/dot.gif" border="0" width="50" height="50"
id="imgCenterImage" runat="server" alt="">

After aspx runs through

imgCenterImage.Src = bla bla bla
imgCenterImage.Width = iImageWidth
imgCenterImage.Height = iImageHeight
imgCenterImage.Alt = bla bla bla

Result is this in HTML

<img src="pic/icon_top_how_we_can.gif"
id="_ctl0_ctrlTopMenu__ctl2_imgCenterImage" border="0" width="95"
height="72" alt="How We Can Help" />


Is there any way to control the resulting ID?
This line
id="_ctl0_ctrlTopMenu__ctl2_imgCenterImage"
makes aspx unusable for creation of web sites for search engines

ID starting with "_" is not allowed in

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Thanks

--
_____________________________________
Anatoli Trifonov
Software Developer & Consultant

Minds are like parachutes - they only function when open.
--Thomas Dewar


 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      06-06-2004
"Anatoli Trifonov" <(E-Mail Removed)> wrote in message
news:Ogi$aQ%(E-Mail Removed)...
> Hi all
>
> Please point me to a link if this can be changed, fixed or something
>
> I have the following control in my UserControl
>
> <img src="pic/dot.gif" border="0" width="50" height="50"
> id="imgCenterImage" runat="server" alt="">
>
> After aspx runs through
>
> imgCenterImage.Src = bla bla bla
> imgCenterImage.Width = iImageWidth
> imgCenterImage.Height = iImageHeight
> imgCenterImage.Alt = bla bla bla
>
> Result is this in HTML
>
> <img src="pic/icon_top_how_we_can.gif"
> id="_ctl0_ctrlTopMenu__ctl2_imgCenterImage" border="0" width="95"
> height="72" alt="How We Can Help" />
>
>
> Is there any way to control the resulting ID?
> This line
> id="_ctl0_ctrlTopMenu__ctl2_imgCenterImage"
> makes aspx unusable for creation of web sites for search engines


Really? You know of a search engine which chokes on the leading "_"? Please
tell us which one.

> ID starting with "_" is not allowed in
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


Your "imgCenterImage" id is being changed because it is inside of some
control which implements INamingContainer. THat control appears to have a
defaulted id of "_ctl2". It is inside of "ctlTopMenu", which is inside of
"_ctl0". You should locate the control which is being called "_ctl0" and
give it an explicit id.
--
John Saunders
johnwsaundersiii at hotmail


 
Reply With Quote
 
 
 
 
Anatoli Trifonov
Guest
Posts: n/a
 
      06-07-2004
Thanks for your help.

> Really? You know of a search engine which chokes on the leading "_"?

Please
> tell us which one.


What do you mean by "chokes"? Page will be indexed of course.
Question is how ...


--
_____________________________________
Anatoli Trifonov
Software Developer & Consultant
Minds are like parachutes - they only function when open.
--Thomas Dewar
"John Saunders" <(E-Mail Removed)> wrote in message
news:%23soIDG$(E-Mail Removed)...
> "Anatoli Trifonov" <(E-Mail Removed)> wrote in message
> news:Ogi$aQ%(E-Mail Removed)...
> > Hi all
> >
> > Please point me to a link if this can be changed, fixed or something
> >
> > I have the following control in my UserControl
> >
> > <img src="pic/dot.gif" border="0" width="50" height="50"
> > id="imgCenterImage" runat="server" alt="">
> >
> > After aspx runs through
> >
> > imgCenterImage.Src = bla bla bla
> > imgCenterImage.Width = iImageWidth
> > imgCenterImage.Height = iImageHeight
> > imgCenterImage.Alt = bla bla bla
> >
> > Result is this in HTML
> >
> > <img src="pic/icon_top_how_we_can.gif"
> > id="_ctl0_ctrlTopMenu__ctl2_imgCenterImage" border="0" width="95"
> > height="72" alt="How We Can Help" />
> >
> >
> > Is there any way to control the resulting ID?
> > This line
> > id="_ctl0_ctrlTopMenu__ctl2_imgCenterImage"
> > makes aspx unusable for creation of web sites for search engines

>
> Really? You know of a search engine which chokes on the leading "_"?

Please
> tell us which one.
>
> > ID starting with "_" is not allowed in
> >
> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

>
> Your "imgCenterImage" id is being changed because it is inside of some
> control which implements INamingContainer. THat control appears to have a
> defaulted id of "_ctl2". It is inside of "ctlTopMenu", which is inside of
> "_ctl0". You should locate the control which is being called "_ctl0" and
> give it an explicit id.
> --
> John Saunders
> johnwsaundersiii at hotmail
>
>



 
Reply With Quote
 
John Saunders
Guest
Posts: n/a
 
      06-07-2004
"Anatoli Trifonov" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Thanks for your help.
>
> > Really? You know of a search engine which chokes on the leading "_"?

> Please
> > tell us which one.

>
> What do you mean by "chokes"? Page will be indexed of course.
> Question is how ...


But will there be any difference in how its indexed between a leading "_" in
the id and no leading "_". In what way will the "_" make a difference?
--
John Saunders
johnwsaundersiii at hotmail


 
Reply With Quote
 
Anatoli Trifonov
Guest
Posts: n/a
 
      06-07-2004
"John Saunders" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "Anatoli Trifonov" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Thanks for your help.
> >
> > > Really? You know of a search engine which chokes on the leading "_"?

> > Please
> > > tell us which one.

> >
> > What do you mean by "chokes"? Page will be indexed of course.
> > Question is how ...

>
> But will there be any difference in how its indexed between a leading "_"

in
> the id and no leading "_". In what way will the "_" make a difference?
> --
> John Saunders
> johnwsaundersiii at hotmail
>
>

If you declare that page uses HTML 4.0 or 4.1 then
ID="_bla_bla_bla" is not allowed in HTML 4.0 or 4.1.

I'm under assumption that search engine checks for things like this.

Anatoli Trifonov


 
Reply With Quote
 
John Saunders
Guest
Posts: n/a
 
      06-07-2004
"Anatoli Trifonov" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "John Saunders" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > "Anatoli Trifonov" <(E-Mail Removed)> wrote in message
> > news:%(E-Mail Removed)...
> > > Thanks for your help.
> > >
> > > > Really? You know of a search engine which chokes on the leading "_"?
> > > Please
> > > > tell us which one.
> > >
> > > What do you mean by "chokes"? Page will be indexed of course.
> > > Question is how ...

> >
> > But will there be any difference in how its indexed between a leading

"_"
> in
> > the id and no leading "_". In what way will the "_" make a difference?
> > --
> > John Saunders
> > johnwsaundersiii at hotmail
> >
> >

> If you declare that page uses HTML 4.0 or 4.1 then
> ID="_bla_bla_bla" is not allowed in HTML 4.0 or 4.1.
>
> I'm under assumption that search engine checks for things like this.


I think that this would be a false assumption. I can't think of any way in
which checking for standards compliance would benefit a search engine.
--
John Saunders
johnwsaundersiii at hotmail


 
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
How send email of resulting aspx page? VB Programmer ASP .Net 5 04-19-2005 03:48 AM
problems with decoding: resulting image is corrupt Bjorn Jensen Perl 2 03-22-2005 06:52 PM
How get resulting HTML of datagrid VB Programmer ASP .Net 3 08-04-2004 10:44 PM
SHA1 length of resulting hash Dil via .NET 247 ASP .Net 0 08-04-2004 12:53 PM
Setting a Range Parameter in a crystal report and streaming resulting report as a pdf James Wallace ASP .Net 0 10-17-2003 04:42 PM



Advertisments