Home All Groups Group Topic Archive Search About
Author
21 Apr 2005 3:11 AM
Tony Doyle
Has anybody come across this before...

Basically my issue is this.

In ASP.NET I have a Class module, functions.vb

This inherits from System.Web.UI.Page

In order to use the controls function inside this class, I have used the
following line

  Protected WithEvents phTopmostFloat As
System.Web.UI.WebControls.PlaceHolder

And declared this at the top of the module

Inside any .net aspx page, if I inherit from functions.vb instead of
system.web.ui.page, when I want to use my place holder control, I put it on
the page and the

  Protected WithEvents phTopmostFloat As
System.Web.UI.WebControls.PlaceHolder

Is then also declared locally in the code behind which then gives errors on
run.

The only way to run the page is to delete the lines in the code behind, the
dynamic help advises to use the Shadows keyword, but this doesn't seem to
work i.e

   Protected Shadows WithEvents phTopmostFloat As
System.Web.UI.WebControls.PlaceHolder

Can anyone help me solve this issue...

Cheers

Td

Author
21 Apr 2005 8:11 AM
MasterGaurav
You've just marked it Protected. Haven't defined it Virtual.

I'm not an expert in VB.Net, but I think "overridable" is what is
missing.

--
Cheers,
Gaurav Vaish
http://mastergaurav.org
http://mastergaurav.blogspot.com
---------------------
Author
21 Apr 2005 12:09 PM
Tony Doyle
How do I define this in code then...

Im no expert either, just beginning, but this doesnt seem to make sense...

Td

Show quoteHide quote
"MasterGaurav" <gaurav.va***@gmail.com> wrote in message
news:1114071101.280315.203650@g14g2000cwa.googlegroups.com...
> You've just marked it Protected. Haven't defined it Virtual.
>
> I'm not an expert in VB.Net, but I think "overridable" is what is
> missing.
>
> --
> Cheers,
> Gaurav Vaish
> http://mastergaurav.org
> http://mastergaurav.blogspot.com
> ---------------------
>
Author
21 Apr 2005 3:36 PM
Mythran
Show quote Hide quote
"Tony Doyle" <nospam@myhome.com> wrote in message
news:OG0SqsmRFHA.2356@TK2MSFTNGP14.phx.gbl...
> How do I define this in code then...
>
> Im no expert either, just beginning, but this doesnt seem to make sense...
>
> Td
>
> "MasterGaurav" <gaurav.va***@gmail.com> wrote in message
> news:1114071101.280315.203650@g14g2000cwa.googlegroups.com...
>> You've just marked it Protected. Haven't defined it Virtual.
>>
>> I'm not an expert in VB.Net, but I think "overridable" is what is
>> missing.
>>
>> --
>> Cheers,
>> Gaurav Vaish
>> http://mastergaurav.org
>> http://mastergaurav.blogspot.com
>> ---------------------
>>
>
>

You have it marked as Protected in the base file.  Therefore, you
"shouldn't" need it defined in the derived class (code-behind).  Try
removing it from the derived class and still try accessing from the derived
class.  It "should" work.

Mythran
Author
22 Apr 2005 2:32 AM
Tony Doyle
Cheers Myhran,

But there in lies the problem, I dont have it in the code behind, however
Visual Studio every time you open the page adds it into the Web designer
section by its own free will, this then causes it to crash.
Any ideas on how to stop it getting put in?

Cheers

Td

Show quoteHide quote
"Mythran" <kip_potter@hotmail.comREMOVETRAIL> wrote in message
news:euqArfoRFHA.3496@TK2MSFTNGP12.phx.gbl...
>
> "Tony Doyle" <nospam@myhome.com> wrote in message
> news:OG0SqsmRFHA.2356@TK2MSFTNGP14.phx.gbl...
>> How do I define this in code then...
>>
>> Im no expert either, just beginning, but this doesnt seem to make
>> sense...
>>
>> Td
>>
>> "MasterGaurav" <gaurav.va***@gmail.com> wrote in message
>> news:1114071101.280315.203650@g14g2000cwa.googlegroups.com...
>>> You've just marked it Protected. Haven't defined it Virtual.
>>>
>>> I'm not an expert in VB.Net, but I think "overridable" is what is
>>> missing.
>>>
>>> --
>>> Cheers,
>>> Gaurav Vaish
>>> http://mastergaurav.org
>>> http://mastergaurav.blogspot.com
>>> ---------------------
>>>
>>
>>
>
> You have it marked as Protected in the base file.  Therefore, you
> "shouldn't" need it defined in the derived class (code-behind).  Try
> removing it from the derived class and still try accessing from the
> derived class.  It "should" work.
>
> Mythran
>
Author
22 Apr 2005 3:32 PM
Mythran
"Tony Doyle" <nospam@myhome.com> wrote in message
news:%23afZxOuRFHA.3052@TK2MSFTNGP09.phx.gbl...
> Cheers Myhran,
>
> But there in lies the problem, I dont have it in the code behind, however
> Visual Studio every time you open the page adds it into the Web designer
> section by its own free will, this then causes it to crash.
> Any ideas on how to stop it getting put in?
>
> Cheers
>
> Td
>

Ouch...no.

That stinks.

Sorry I could not be more help.

Mythran