473,395 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Placeholder Control

Hi

I am trying to add a property to a class that is derive from
asp:placeholder. ? I have tried this but get an ambigous name error:

Imports System.ComponentModel

Imports System.Web.UI

<DefaultProperty("Text"), ToolboxData("<{0}:WebCustomControl1
runat=server></{0}:WebCustomControl1>")Public Class WebCustomControl1

Inherits System.Web.UI.WebControls.PlaceHolder

Dim _text As String

Dim _kutje As String

<Bindable(True), Category("Appearance"), DefaultValue("")Property [Text]()
As String

Get

Return _text

End Get

Set(ByVal Value As String)

_text = Value

End Set

End Property

Public Property kutje() As String

Get

Return _kutje

End Get

Set(ByVal Value As String)

_kutje = Value

End Set

End Property

Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)

output.Write([Text])

End Sub

End Class
How to go about?

thanks

B
Dec 10 '06 #1
3 1308
Remove the "Text" property from the class file.

The Grand Master
Bert wrote:
Hi

I am trying to add a property to a class that is derive from
asp:placeholder. ? I have tried this but get an ambigous name error:

Imports System.ComponentModel

Imports System.Web.UI

<DefaultProperty("Text"), ToolboxData("<{0}:WebCustomControl1
runat=server></{0}:WebCustomControl1>")Public Class WebCustomControl1

Inherits System.Web.UI.WebControls.PlaceHolder

Dim _text As String

Dim _kutje As String

<Bindable(True), Category("Appearance"), DefaultValue("")Property [Text]()
As String

Get

Return _text

End Get

Set(ByVal Value As String)

_text = Value

End Set

End Property

Public Property kutje() As String

Get

Return _kutje

End Get

Set(ByVal Value As String)

_kutje = Value

End Set

End Property

Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)

output.Write([Text])

End Sub

End Class
How to go about?

thanks

B
Dec 11 '06 #2
I just ran your code and it worked fine

The Grand Master
Bert wrote:
Hi

I am trying to add a property to a class that is derive from
asp:placeholder. ? I have tried this but get an ambigous name error:

Imports System.ComponentModel

Imports System.Web.UI

<DefaultProperty("Text"), ToolboxData("<{0}:WebCustomControl1
runat=server></{0}:WebCustomControl1>")Public Class WebCustomControl1

Inherits System.Web.UI.WebControls.PlaceHolder

Dim _text As String

Dim _kutje As String

<Bindable(True), Category("Appearance"), DefaultValue("")Property [Text]()
As String

Get

Return _text

End Get

Set(ByVal Value As String)

_text = Value

End Set

End Property

Public Property kutje() As String

Get

Return _kutje

End Get

Set(ByVal Value As String)

_kutje = Value

End Set

End Property

Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)

output.Write([Text])

End Sub

End Class
How to go about?

thanks

B
Dec 12 '06 #3
Thats very nice of you. Post a message then never reply when someone
tries to help you. Learn some manners you ignorant fuck.

The Grand Master


Bert wrote:
Hi

I am trying to add a property to a class that is derive from
asp:placeholder. ? I have tried this but get an ambigous name error:

Imports System.ComponentModel

Imports System.Web.UI

<DefaultProperty("Text"), ToolboxData("<{0}:WebCustomControl1
runat=server></{0}:WebCustomControl1>")Public Class WebCustomControl1

Inherits System.Web.UI.WebControls.PlaceHolder

Dim _text As String

Dim _kutje As String

<Bindable(True), Category("Appearance"), DefaultValue("")Property [Text]()
As String

Get

Return _text

End Get

Set(ByVal Value As String)

_text = Value

End Set

End Property

Public Property kutje() As String

Get

Return _kutje

End Get

Set(ByVal Value As String)

_kutje = Value

End Set

End Property

Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)

output.Write([Text])

End Sub

End Class
How to go about?

thanks

B
Dec 13 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: patrick_a | last post by:
Hello, I am trying to insert multiple instances of a custom user control into a placeholder on an aspx page, based on the records retrieved from the database. I use the datareader to loop through...
2
by: Mike Speak | last post by:
I have a user control that I want to use to render 4 menu items (retrieved from db) on the top of each of my asp.net pages. The user control defines a table, with one TR and one TD. Within the...
1
by: Dan | last post by:
I have an asp.net page default.aspx with a user control and a placeholder control. <html> <body> <form id="myform" method="post" runat="server" /> <PageHeader:Header id="header1"...
0
by: shark | last post by:
I have a placeholder in a control that is in turn, used as a control in a placeholder in a form. I am getting a viewstate error so I believe I have to clear my placeholder before I load the...
1
by: Angel | last post by:
I have added controls to the placeholder control. All the controls that were added have EnableViewState = true including the placeholder. One of the controls has a button that performs a postback. My...
2
by: Ben de Vette | last post by:
Hi, I like to load a UserControl onto a placeholder with some more control then just doing protected System.Web.UI.WebControls.PlaceHolder placeHolder; UserControl ascx =...
2
by: Don Wash | last post by:
Hi There! I'm creating my website with ASP.NET + XHTML, which means I will strictly adhere the XHTML standards for my web page output. I use Panel or PlaceHolder WebControls to place...
5
by: studio60podcast | last post by:
I have an ASP:Placeholder and I'm trying to populate with Label controls from the code behind after a button click, essentially creating a list of selections. But each time I click the button,...
6
by: David Colliver | last post by:
Hi, using vb.net 1.1 I am trying to add a control to a placeholder but am having problems with it. I do it practically the same way as i do in C# (I have more C# skill than VB.NET)and I...
7
by: Brad Baker | last post by:
I am trying to programmatically set a placeholder control in csharp which is nested inside a repeater control between <ItemTemplateand </ItemTemplate> tags, however I am running into problems. I've...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.