|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Protected Shadows With Events.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 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. 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 > --------------------- >
Show quote
Hide quote
"Tony Doyle" <nospam@myhome.com> wrote in message You have it marked as Protected in the base file. Therefore, you 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 >> --------------------- >> > > "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 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 > "Tony Doyle" <nospam@myhome.com> wrote in message Ouch...no.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 > That stinks. Sorry I could not be more help. Mythran
Page.RegisterClientScriptBlock() is not working ..... :-(
How do I access HTML controls from the code behind? e.Item.Cells.Count in UpdateCommand event of Datagrid Binding Data to IE Treeview control Can a User Control display a pdf or static html file? ASP.NET Book Recommendation How to filter two combos on grid clientside How do I create an "event" to deal with textarea and DataGrid? Nested Repeater with a Listbox Failed to map the path System.Web.HttpException |
|||||||||||||||||||||||