S
Showjumper
I have made a server control to display the average rating for content by
showing the number of stars. The problem i have is with the design time
display in vs 2005. It seems the problem with the design time rendering is
due to the calls to the databse helper class. Delete those lines and it
displasy fine in deign time. The code is below
Any ideas on how to make design time work?
Thanks Ashok
Dim dbutil As New DBHelper
Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)
dbutil.ProductID = _productid
Dim average As Single = dbutil.GetAverage
If average <> 0 Then
Select Case CInt(average * 4)
'load the right star image based on the rating
End Select
output.Write("Rating: ")
MyBase.Render(output)
showing the number of stars. The problem i have is with the design time
display in vs 2005. It seems the problem with the design time rendering is
due to the calls to the databse helper class. Delete those lines and it
displasy fine in deign time. The code is below
Any ideas on how to make design time work?
Thanks Ashok
Dim dbutil As New DBHelper
Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter)
dbutil.ProductID = _productid
Dim average As Single = dbutil.GetAverage
If average <> 0 Then
Select Case CInt(average * 4)
'load the right star image based on the rating
End Select
output.Write("Rating: ")
MyBase.Render(output)