Ya that is fine. Let me give me some more details.
I am developing a payment user control which can be used in any application.
I have two variables with their predefined values
And want to give them to be set by the coder who is developing a specific payment system.
So on my ascx page I have card type , card number , security code and expiration date.
along with that i need two properties which can be settled according to the application.
What should i do ?
Hi! Welcome to theScripts!
Just like you have public and private variables in your user controls, you can have public and private Properties.
For example:
-
Partial Class myCustomUserControl
-
Inherits System.Web.UI.UserControl
-
...
-
-
Private var1
-
Private var2
-
-
Public Property Var1sProperty()
-
Get
-
return var1
-
End Get
-
Set (ByVal value)
-
var1=value
-
End Set
-
End Property
-
-
...
-
-
Private Sub.....
-
-
End Class
-
-
Hope this was helpful! :)
-Frinny