mmk.
I had to jump into Visual Basic for this. Here is my code that works:
Code:
Partial Class WebUserControl
Inherits System.Web.UI.UserControl
Private _foo As Integer
Public Property Foo() As Integer
Get
Return _foo
End Get
Set(ByVal value As Integer)
_foo = value
End Set
End Property
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Response.Write(_foo)
End Sub
End Class
then on the aspx side:
Code:
<uc1:WebUserControl Foo="5" ID="WebUserControl1" runat="server" />
Sorry its been an awfully long time since I have done any
VB development, I am apparently a bit rusty!
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========