|
|
 |
RE: FN-FORUM: ASP to ASP.NET
date posted 27th January 2006 15:05
Set up a private variable that will be set by the Page Load.
The property returns this value. Set the variable during Page Load
Private path As String
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
varPath = "test"
End Sub
Public Property varPath() As String
Get
Return path
End Get
Set(ByVal Value As String)
path = Value
End Set
End Property
HTH
-----Original Message-----
From: [EMAIL REMOVED] [EMAIL REMOVED] On Behalf Of Craig
Sent: 27 January 2006 15:28
To: FN-FORUM / [EMAIL REMOVED]
Subject: RE: FN-FORUM: ASP to ASP.NET
Hi Damon,
As I don't know C# I'm having to use an online translater to VB and it's
telling me there's something wrong with the code snippet you sent but I
don't know what it is.
Craig
-----Original Message-----
private path = null
private void Load_Page(object sender, EventArgs e)
{
// could set path variable directly but more correct to use the property
pathVar = "some text";
}
public string pathVar
{
get { return path; }
set { path = value; }
}
--
Freelancers, contractors earn more with Prosperity4
Call 0870 870 4414 or visit www.prosperity4.com
and benefit from Inland Revenue approved expenses today.
To advertise here: http://www.freelancers.net/advertising.html
|
 |
|