Hi,
I'm working on this try it out and for some reason the title for the ViewDetails.aspx page is not being set programmatically and so my basepage template raises an error.
I have this code in the codebehind...
Code:
Partial Class ViewDetails
Inherits BasePage
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim reviewId As Integer = Convert.ToInt32(Request.QueryString.Get("ReviewId"))
Dim myReview As Review
Using db As New PlanetWroxDataContext()
myReview = (From r In db.Reviews _
Where r.Id = reviewId _
Select r).Single()
lblTitle.Text = myReview.Title
lblSummary.Text = myReview.Summary
lblBody.Text = myReview.Body
'Set the page title programmatically
Me.Title = myReview.Title
End Using
End Sub
End Class
Maybe I misspelled something and I'm not seeing it.
Update**
When I set the title to the ViewDetails.aspx in markup everything works fine. The title is changed to the proper one once the page loads. The error is being raised before the Page_Load event is triggered. Why is this happening?
Chuck