[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webcontrols

asp.net page not seeing custom control, can't set properties

usenet_daughter

2/17/2004 5:34:00 PM

I have a asp.net.vb page with a custom control, and for some reason
the codebehind is not seeing the control.



The control is in a file "page_footer.ascx" in the root of the site
and contains the following:

<%@ Control Language="vb" AutoEventWireup="false"
Codebehind="page_footer.ascx.vb" Inherits="mysite1.page_footer"
TargetSchema="http://schemas.microsoft.com/intellisense... %>
<script language="VB" runat="server">
Public sFooterText As String = ""
</script>
<table border="0" width="100%" cellSpacing="0" cellPadding="0">
<tr>
<td align="right"><font
class="copy"><%=sFooterText%></font>&nbsp;&nbsp;&nbsp;</td>
</tr>
</table>



The control is defined in my ASPX page (also in the root of the site)
at the top of the HTML as:

<%@ Register TagPrefix="site1" TagName="page_footer"
Src="page_footer.ascx" %>




An instance is defined in the HTML body as:

<site1:page_footer id="page_footer_1" runat="server"
sFooterText="Copyright 2004"></site1:page_footer><br>



In the codebehind I try this:

page_footer_1.sFooterText = "Copyright 2003"
^^^^^^^^^^^^^

but "page_footer_1" is underlined in blue and I get the error 'Name
"page_footer_1" is not declared.'



What am I doing wrong?
5 Answers

Alessandro Zifiglio

2/19/2004 1:33:00 PM

0

declare your control in your codebehind class first, just like you would do
with any asp.net control. Otherwise it is undefined ;P

public page_footer_1 as page_footer

page_footer_1.sFooterText = "Copyright 2003"

"Mad Scientist Jr" <usenet_daughter@yahoo.com> wrote in message
news:7a93f3c4.0402170934.6b3a4eae@posting.google.com...
> I have a asp.net.vb page with a custom control, and for some reason
> the codebehind is not seeing the control.
>
>
>
> The control is in a file "page_footer.ascx" in the root of the site
> and contains the following:
>
> <%@ Control Language="vb" AutoEventWireup="false"
> Codebehind="page_footer.ascx.vb" Inherits="mysite1.page_footer"
> TargetSchema="http://schemas.microsoft.com/intellisense... %>
> <script language="VB" runat="server">
> Public sFooterText As String = ""
> </script>
> <table border="0" width="100%" cellSpacing="0" cellPadding="0">
> <tr>
> <td align="right"><font
> class="copy"><%=sFooterText%></font>&nbsp;&nbsp;&nbsp;</td>
> </tr>
> </table>
>
>
>
> The control is defined in my ASPX page (also in the root of the site)
> at the top of the HTML as:
>
> <%@ Register TagPrefix="site1" TagName="page_footer"
> Src="page_footer.ascx" %>
>
>
>
>
> An instance is defined in the HTML body as:
>
> <site1:page_footer id="page_footer_1" runat="server"
> sFooterText="Copyright 2004"></site1:page_footer><br>
>
>
>
> In the codebehind I try this:
>
> page_footer_1.sFooterText = "Copyright 2003"
> ^^^^^^^^^^^^^
>
> but "page_footer_1" is underlined in blue and I get the error 'Name
> "page_footer_1" is not declared.'
>
>
>
> What am I doing wrong?


A Moose in Love

1/29/2009 8:01:00 PM

0

On Jan 29, 2:47 pm, "Patrick Keenan" <t...@dev.null> wrote:
> "Bent Attorney Esq." <parkstreetboo...@gmail.com> wrote in messagenews:84bff8a5-d8d8-4dc1-b19f-a3b2f9d9be92@e18g2000vbe.googlegroups.com...
> On Jan 29, 12:48 pm, "Patrick Keenan" <t...@dev.null> wrote:
>
>
>
> > "Bent Attorney Esq." <parkstreetboo...@gmail.com> wrote in
> > messagenews:9786b906-1cd4-4af2-ad6b-05d8469c3fef@p37g2000yqd.googlegroups.com...
> > and gets a new jethttp://drorly.blo...
> > scroll down or read this:
>
> > Nanci Pelosi, from reader James Canon
> > Remember the big flap about Sarah Palin's dress? Americans! Where are
> > you? Are you awake? We haven't heard any comment on "Queen Madam"
> > Pelosi's snit about having to ride home in the small private, economy
> > jet that comes with the Speaker's job. Remember how Madame Pel's was
> > so aggravated that this little jet had to refuel while transporting
> > her to California every week? Remember that she insisted on a
> > luxurious 200 seat jet to fly her to California nonstop, instead?
> > Hello Folks! Are you awake? Can you muster even a little indignation?
> > ===================
> > <snippage>
>
> > Perhaps it might be better to muster a little bit of fact-checking, such
> > as
> > what is conveniently contained
> > here:http://www.snopes.com/politics/pelo...
>
> > where we find that....
>
> > 1) Ms. Pelosi did *not* request a larger jet. The request, which was *not
> > a demand*, came from the House Sgt. at Arms, for security and safety
> > reasons, which apply to *anyone* holding an office at that level.
>
> > 2) The previously used smaller planes require ideal weather to make this
> > trip without refuelling, and ideal weather is not always in stock;
>
> > 3) The "luxurious" jet is a military aircraft, based on a 737, and it does
> > not seat 200. At most, it can seat 121 and carry 20 tons of cargo;
>
> > 4) And it's likely that Ms. Pelosi is not the only occupant of the craft
> > when it flies.
>
> > In short, the story posted is a work of fiction, based rather loosely on a
> > real event. The essential points in the complaint, however, are
> > fabrications.
>
> > And so we see that the "bent attorney" really just is not very good at
> > research.
>
> > I wonder if he believed the story he posted.
>
> > Hope this helps.
> > -pk
>
> Bullshit.  You have yet to prove your accusations P. Lousy lover.  So
> she has to refuel?  So what?  She should live in Washington and fly
> home on her own hook in the first place.  But you're a lover of
> corrupt government, and you'll defend them in all of their corrupt
> splendor.
> ===================
>
> You didn't actually read the Snopes article, did you?
>
> And it looks like you *did* fall for the crap you posted.
>
> -pk

Crap? She sits her royal ass down on a seat whose price is
ridiculous, and you call my posting crap?
You need your head examined Mr. government ass kisser.

A Moose in Love

1/30/2009 1:32:00 AM

0

On Jan 29, 7:44 pm, Roger <Roger@ .> wrote:
> In one age, called the Second Age by some,
>    (an Age yet to come, an Age long past)
>       someone claiming to be Bent Attorney Esq. wrote
>          in message
> <84bff8a5-d8d8-4dc1-b19f-a3b2f9d9b...@e18g2000vbe.googlegroups.com>:
>
>
>
> >On Jan 29, 12:48 pm, "Patrick Keenan" <t...@dev.null> wrote:
> >> Perhaps it might be better to muster a little bit of fact-checking,  such as
> >> what is conveniently contained here:http://www.snopes.com/politics/pelo...
>
> >> where we find that....
>
> >> 1) Ms. Pelosi did *not* request a larger jet.   The request, which was *not
> >> a demand*, came from the House Sgt. at Arms, for security and safety
> >> reasons, which apply to *anyone* holding an office at that level.
>
> >> 2) The previously used smaller planes require ideal weather to make this
> >> trip without refuelling, and ideal weather is not always in stock;
>
> >> 3) The "luxurious" jet is a military aircraft, based on a 737, and it does
> >> not seat 200.   At most, it can seat 121 and carry 20 tons of cargo;
>
> >> 4) And it's likely that Ms. Pelosi is not the only occupant of the craft
> >> when it flies.
>
> >> In short, the story posted is a work of fiction, based rather loosely on a
> >> real event.   The essential points in the complaint, however, are
> >> fabrications.
>
> >> And so we see that the "bent attorney" really just is not very good at
> >> research.
>
> >> I wonder if he believed the story he posted.
>
> >> Hope this helps.
> >> -pk
> >Bullshit.  
>
> Yes, your post was.
>
> >You have yet to prove your accusations P.
>
> No, is it is *you* that has failed at this.  Which specific point
> above are you disputing?
>
> >Lousy lover.  
>
> I don't think he's that into you, b.a.
>
> >So she has to refuel?  So what?  She should live in Washington and fly
> >home on her own hook in the first place.  
>
> Because you say so?

Because I possess common sense. You are a lover of taking from the
dumbed down taxpayer. However, I'll give you one thing. The dumbed
down taxpayer deserves to have his cash seized so that P. Lousy can
revel in luxury. P. Lousy's post shouldn't even exist. It serves
nothing except to put cash in her pocket. What does she produce?
Software? Durable goods? Does she teach students how to become
boiler makers? No. She siphons the cream off the worker.

>
> >But you're a lover of
> >corrupt government, and you'll defend them in all of their corrupt
> >splendor.
>
> No, he is rather fond of *truth* (since you are unfamiliar with the
> term, you should probably look it up) and defends it against your
> lies.

BS. Show me where I've lied idioto.

???

1/30/2009 6:42:00 AM

0

these wolves; frankie p.keenan and a few of socialists of democrat
gangs will protect the criminals including the imposter obama.
man. i thought this old woman pelosi is in nursing home. this old
woman is stupid than any politician women I read about. she is below
hillary clinton thousand times, and since gov plain is better than
hillary, don't kvession me more.


On Jan 29, 7:32 pm, "Bent Attorney Esq." <parkstreetboo...@gmail.com>
wrote:
> On Jan 29, 7:44 pm, Roger <Roger@ .> wrote:
>
>
>
>
>
> > In one age, called the Second Age by some,
> >    (an Age yet to come, an Age long past)
> >       someone claiming to be Bent Attorney Esq. wrote
> >          in message
> > <84bff8a5-d8d8-4dc1-b19f-a3b2f9d9b...@e18g2000vbe.googlegroups.com>:
>
> > >On Jan 29, 12:48 pm, "Patrick Keenan" <t...@dev.null> wrote:
> > >> Perhaps it might be better to muster a little bit of fact-checking,  such as
> > >> what is conveniently contained here:http://www.snopes.com/politics/pelo...
>
> > >> where we find that....
>
> > >> 1) Ms. Pelosi did *not* request a larger jet.   The request, which was *not
> > >> a demand*, came from the House Sgt. at Arms, for security and safety
> > >> reasons, which apply to *anyone* holding an office at that level.
>
> > >> 2) The previously used smaller planes require ideal weather to make this
> > >> trip without refuelling, and ideal weather is not always in stock;
>
> > >> 3) The "luxurious" jet is a military aircraft, based on a 737, and it does
> > >> not seat 200.   At most, it can seat 121 and carry 20 tons of cargo;
>
> > >> 4) And it's likely that Ms. Pelosi is not the only occupant of the craft
> > >> when it flies.
>
> > >> In short, the story posted is a work of fiction, based rather loosely on a
> > >> real event.   The essential points in the complaint, however, are
> > >> fabrications.
>
> > >> And so we see that the "bent attorney" really just is not very good at
> > >> research.
>
> > >> I wonder if he believed the story he posted.
>
> > >> Hope this helps.
> > >> -pk
> > >Bullshit.  
>
> > Yes, your post was.
>
> > >You have yet to prove your accusations P.
>
> > No, is it is *you* that has failed at this.  Which specific point
> > above are you disputing?
>
> > >Lousy lover.  
>
> > I don't think he's that into you, b.a.
>
> > >So she has to refuel?  So what?  She should live in Washington and fly
> > >home on her own hook in the first place.  
>
> > Because you say so?
>
> Because I possess common sense.  You are a lover of taking from the
> dumbed down taxpayer.  However, I'll give you one thing.  The dumbed
> down taxpayer deserves to have his cash seized so that P. Lousy can
> revel in luxury.  P. Lousy's post shouldn't even exist.  It serves
> nothing except to put cash in her pocket.  What does she produce?
> Software?  Durable goods?  Does she teach students how to become
> boiler makers?  No.  She siphons the cream off the worker.
>
>
>
> > >But you're a lover of
> > >corrupt government, and you'll defend them in all of their corrupt
> > >splendor.
>
> > No, he is rather fond of *truth* (since you are unfamiliar with the
> > term, you should probably look it up) and defends it against your
> > lies.
>
> BS.  Show me where I've lied idioto.- Hide quoted text -
>
> - Show quoted text -

???

1/30/2009 7:00:00 AM

0

i meant to say gov. palin.

On Jan 30, 12:41 am, ??? <destinyofmank...@gmail.com> wrote:
> these wolves; frankie p.keenan and a few of socialists of democrat
> gangs will protect the criminals including the imposter obama.
> man.  i thought this old woman pelosi is in nursing home. this old
> woman is stupid than any politician women I read about. she is below
> hillary clinton thousand times, and since gov palin is better than
> hillary, don't kvession me more.
>
> On Jan 29, 7:32 pm, "Bent Attorney Esq." <parkstreetboo...@gmail.com>
> wrote:
>
>
>
> > On Jan 29, 7:44 pm, Roger <Roger@ .> wrote:
>
> > > In one age, called the Second Age by some,
> > >    (an Age yet to come, an Age long past)
> > >       someone claiming to be Bent Attorney Esq. wrote
> > >          in message
> > > <84bff8a5-d8d8-4dc1-b19f-a3b2f9d9b...@e18g2000vbe.googlegroups.com>:
>
> > > >On Jan 29, 12:48 pm, "Patrick Keenan" <t...@dev.null> wrote:
> > > >> Perhaps it might be better to muster a little bit of fact-checking,  such as
> > > >> what is conveniently contained here:http://www.snopes.com/politics/pelo...
>
> > > >> where we find that....
>
> > > >> 1) Ms. Pelosi did *not* request a larger jet.   The request, which was *not
> > > >> a demand*, came from the House Sgt. at Arms, for security and safety
> > > >> reasons, which apply to *anyone* holding an office at that level.
>
> > > >> 2) The previously used smaller planes require ideal weather to make this
> > > >> trip without refuelling, and ideal weather is not always in stock;
>
> > > >> 3) The "luxurious" jet is a military aircraft, based on a 737, and it does
> > > >> not seat 200.   At most, it can seat 121 and carry 20 tons of cargo;
>
> > > >> 4) And it's likely that Ms. Pelosi is not the only occupant of the craft
> > > >> when it flies.
>
> > > >> In short, the story posted is a work of fiction, based rather loosely on a
> > > >> real event.   The essential points in the complaint, however, are
> > > >> fabrications.
>
> > > >> And so we see that the "bent attorney" really just is not very good at
> > > >> research.
>
> > > >> I wonder if he believed the story he posted.
>
> > > >> Hope this helps.
> > > >> -pk
> > > >Bullshit.  
>
> > > Yes, your post was.
>
> > > >You have yet to prove your accusations P.
>
> > > No, is it is *you* that has failed at this.  Which specific point
> > > above are you disputing?
>
> > > >Lousy lover.  
>
> > > I don't think he's that into you, b.a.
>
> > > >So she has to refuel?  So what?  She should live in Washington and fly
> > > >home on her own hook in the first place.  
>
> > > Because you say so?
>
> > Because I possess common sense.  You are a lover of taking from the
> > dumbed down taxpayer.  However, I'll give you one thing.  The dumbed
> > down taxpayer deserves to have his cash seized so that P. Lousy can
> > revel in luxury.  P. Lousy's post shouldn't even exist.  It serves
> > nothing except to put cash in her pocket.  What does she produce?
> > Software?  Durable goods?  Does she teach students how to become
> > boiler makers?  No.  She siphons the cream off the worker.
>
> > > >But you're a lover of
> > > >corrupt government, and you'll defend them in all of their corrupt
> > > >splendor.
>
> > > No, he is rather fond of *truth* (since you are unfamiliar with the
> > > term, you should probably look it up) and defends it against your
> > > lies.
>
> > BS.  Show me where I've lied idioto.- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -