Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2211
Blank image beeing added on postback.
posted

Hello again everyone,

 I have found another problem when using the imageviewer control:

Pressing the browser refresh button after page load causes a blank image to be inserted into the image viewer or one or more of the images does not render.

Case 2 images in the viewer.

Reresh page.

blank image in viewer, scroll left or right... wala the images show up and the control removes the blank space.  What is going on here?

Code

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

If Not IsPostBack Then

Dim dbl_GoalOne As Double

Dim dbl_MileStone As Double

Dim dbl_CurrentSales As Double

Dim str_GoalTitle As String = ""

Dim str_MileStoneTitle As String = ""

Dim dt_LastUpdate As DateTimeDim ds As DataSet = New DataSet

ds = get_CurentSalesTotalandGoals()

If Request.Browser.Type.ToString.Contains("Firefox") Then

wiv_Main.StyleSetName = "RubberBlack"

wiv_Main.StyleSetPath = "~/ig_res"

End If

If Not ds.Tables.Count = 0 Then

dbl_GoalOne = ds.Tables("TableName").Rows(0).Item("DataField")

str_GoalTitle = ds.Tables("TableName").Rows(0).Item("DataField")

set_GoalOne(dbl_GoalOne, str_GoalTitle, ds.Tables("TableName").Rows(0).Item("DataField"))

If Not ds.Tables("TableName").Rows(0).Item("DataField") Is System.DBNull.Value Then

dbl_MileStone = ds.Tables("TableName").Rows(0).Item("DataField")

str_MileStoneTitle = ds.Tables("TableName").Rows(0).Item("DataField")

set_MileStone(dbl_MileStone, str_MileStoneTitle, ds.Tables("TableName").Rows(0).Item("DataField"))

Else

Hide_MilestoneMarker()

End If

If Not ds.Tables("TableName").Rows(0).Item("DataField") Is System.DBNull.Value Then

dbl_CurrentSales = ds.Tables("TableName").Rows(0).Item("DataField")

set_CurrentSalesMonthly(dbl_CurrentSales, dbl_GoalOne)

set_CurrentSalesQuarterly(dbl_CurrentSales, dbl_MileStone)

Else

dbl_CurrentSales = ds.Tables("TableName").Rows(0).Item("DataField")

set_CurrentSalesMonthly(dbl_CurrentSales, dbl_GoalOne)

set_CurrentSalesQuarterly(dbl_CurrentSales, dbl_MileStone)

End If

If Not ds.Tables("TableName").Rows(0).Item("DataField") Is System.DBNull.Value Then

dt_LastUpdate = ds.Tables("TableName").Rows(0).Item("DataField")

End If

Else

lbl_User_Messages.Visible = True

lbl_User_Messages.Text += " :The data was not retrived from the DataBase."

End If

wiv_Main.Items.Add(New Infragistics.Web.UI.ListControls.ImageItem("~/GaugeImages/GuageMonthly.png", "SomeText", "SomeText"))

wiv_Main.Items.Add(New Infragistics.Web.UI.ListControls.ImageItem("~/GaugeImages/GuageQuarterly.png", "SomeText", "SomeText"))

'Else  'This code is not fixing the problem

' wiv_Main.Items.Add(New Infragistics.Web.UI.ListControls.ImageItem("~/GaugeImages/GuageMonthly.png", "Some Text", "Some Text"))

' wiv_Main.Items.Add(New Infragistics.Web.UI.ListControls.ImageItem("~/GaugeImages/GuageQuarterly.png", "Some Text", "Some Text"))

End If

End Sub

Any solutions?

Patrick