Search:
Namespaces
Discussions
.NET v1.1
Feedback
Codebehind Web Control
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngcontrolsvb' list
.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Bob Levittan (VIP)
I'm taking a page from beta1->beta2. It worked in beta1 without using
codebehind.
I now have a codebehind user control I'm using in a codebehind page. The
control exposes a function:
public function Brand() as string
Return cellBID.Text
end function
It's registered and declared in the html code:
<bbk:navbar id="Navbar2" ForeColor="Silver" WidthPct="100"
BackColor="LightSteelBlue" runat="server"></bbk:navbar>
In the codebehind of my main page, I'm trying to access "Navbar2.Brand" but
the compiler says that Navbar2 is not declared. I figured that it was
because the control wasn't declared in the codebehind, so I added:
protected withevents Navbar2 as
UserControl
and now it says, "The name Brand is not a member of
System.Web.UI.Usercontrol".
I tried to look in ibuyspy to see how they did it, but they're not using
codebehind (see my other post.)
Any ideas?
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
Reply to this message...
Doug Seven
Can we see the whole user control and web form? Or at least the important
parts?
Doug
-----Original Message-----
From: Bob Levittan [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, June 28, 2001 7:34 PM
To: aspngcontrolsvb
Subject: [aspngcontrolsvb] Codebehind Web Control
I'm taking a page from beta1->beta2. It worked in beta1 without using
codebehind.
I now have a codebehind user control I'm using in a codebehind page. The
control exposes a function:
public function Brand() as string
Return cellBID.Text
end function
It's registered and declared in the html code:
<bbk:navbar id="Navbar2" ForeColor="Silver" WidthPct="100"
BackColor="LightSteelBlue" runat="server"></bbk:navbar>
In the codebehind of my main page, I'm trying to access "Navbar2.Brand" but
the compiler says that Navbar2 is not declared. I figured that it was
because the control wasn't declared in the codebehind, so I added:
protected withevents Navbar2 as
UserControl
and now it says, "The name Brand is not a member of
System.Web.UI.Usercontrol".
I tried to look in ibuyspy to see how they did it, but they're not using
codebehind (see my other post.)
Any ideas?
_________________________________________________________________
Get your FREE download of MSN Explorer at
http://explorer.msn.com
| [aspngcontrolsvb] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngcontrolsvb.asp
= JOIN/QUIT
|
http://www.asplists.com/search
= SEARCH Archives
Reply to this message...
Bob Levittan (VIP)
I already answered this one myself (and posted the answer) earlier. The
answer was:
protected withevents Navbar2 as colorm.C_navbar
where colorm is my program's namespace and C_navbar is the class name of the
user control.
........................
Can we see the whole user control and web form? Or at least the important
parts?
Doug
-----Original Message-----
From: Bob Levittan [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, June 28, 2001 7:34 PM
To: aspngcontrolsvb
Subject: [aspngcontrolsvb] Codebehind Web Control
I'm taking a page from beta1->beta2. It worked in beta1 without using
codebehind.
I now have a codebehind user control I'm using in a codebehind page. The
control exposes a function:
public function Brand() as string
Return cellBID.Text
end function
It's registered and declared in the html code:
<bbk:navbar id="Navbar2" ForeColor="Silver" WidthPct="100"
BackColor="LightSteelBlue" runat="server"></bbk:navbar>
In the codebehind of my main page, I'm trying to access "Navbar2.Brand" but
the compiler says that Navbar2 is not declared. I figured that it was
because the control wasn't declared in the codebehind, so I added:
protected withevents Navbar2 as
UserControl
and now it says, "The name Brand is not a member of
System.Web.UI.Usercontrol".
I tried to look in ibuyspy to see how they did it, but they're not using
codebehind (see my other post.)
Any ideas?
_________________________________________________________________
Get your FREE download of MSN Explorer at
http://explorer.msn.com
| [aspngcontrolsvb] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngcontrolsvb.asp
= JOIN/QUIT
|
http://www.asplists.com/search
= SEARCH Archives
| [aspngcontrolsvb] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngcontrolsvb.asp
= JOIN/QUIT
|
http://www.asplists.com/search
= SEARCH Archives
_________________________________________________________________
Get your FREE download of MSN Explorer at
http://explorer.msn.com
Reply to this message...
System.Web.UI.UserControl
System.Windows.Forms.UserControl
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com