Hi Folks,
I would like to declare a variable in the code behind of my VB master page (strMyVariable) - Then give it a value in my content page (strMyVariable = "ABCD") - and then display the variable somewhere on my master page (response.write(strMyVariable)).
When I declare the variable in the Master page code behind like this: Public strMyVariable As String - I am able to give the variable a value and display it in my master page - but if I try to give it a value in the content page says it is not declared.
Could someone kindly help this newbie to work this out? Please don't leave out any details since I'm obviously a beginner :-) Here's what I have tried so far ..
In the masterpage.master.vb ...
Partial Class MasterPage2
Inherits System.Web.UI.MasterPage
Public Sub Page_Load(ByVal Sender As System.Object, ByVal e As System.EventArgs)
End Sub
Public strMyVariable ...
Go to the complete details ...