Let's say I have a web form that includes some user controls. The title tag for my "main" web form is generated in one of the user controls. Passing this data to the web form is currently done like this.
Public Sub SetPageValues(ByVal sTitle As String, ByVal sKeywords As String, ByVal sDesc As String)
MySystem.Web.UI.Main.PageSettings(sKeywords, sDesc, sTitle)
End Sub
Main is the name of the web form. Here's the sub that sets that values in Main.
Public Shared Sub PageSettings(ByVal strKeywords As String, ByVal strDesc As String, ByVal strTitle As String)
Dim _lblTitle As System.Web.UI.webcontrols.Literal = lblTitle
Dim _lblMetaDesc As System.Web.UI.webControls.Literal = lblMetaDesc
Dim _lblMetaKeywords As System.Web.UI.WebControls.Literal = lblMetaKeywords
Dim _lblMetatitle As System.Web.UI.WebControls.Literal = lblMetaTitle
_lblTitle.Text = strTitle
_lblMetaDesc.Text = "<meta name=""description"" content=""" + strDesc + """>"
_lblMetaKeywords.Text = "<meta name=""keywords"" content=""" + strKeywords + """>"
_lblMetatitle.Text = "<meta name=""title"" content=""" + strTitle + """>"
End Sub
After all of this we are running pooled memory and recycle it every 400 minutes, however, page titles get corrupted and display incorrectly. Does anyone have any ideas other than moving to a new version .net?
By making properties in the user control, the values can now be passed correctly.