This is a migrated thread and some comments may be shown as answers.
Inconsistent Combo box operation
4 Answers 28 Views
This is a migrated thread and some comments may be shown as answers.
Lynn
Top achievements
Rank 2
Lynn asked on 21 Aug 2011, 01:04 AM
I am having multiple problems with the combo box control and event handling/population between Visual Studio 2010/Windows 7 and operation under Server 2008 site.

I am developing/supporting a web site under Visual Studio 2010 on Windows 7.  All of my combo boxes are working fine.  I have both cascading combo boxes that trigger javascript and combo boxes that utilize the SelectedIndexChanged.  In all cases, these combo boxes operate just fine when testing them on my development machine.

But when I upload the pages/site up to a Server 2008 machine, the combo boxes/events do not fire correctly or they do not operate correctly.  Cascading combo boxes show the "Loading..." text, but never populate.  A combo box that is supposed to trigger a SelectedIndexChanged event triggers the event, but then the combo box resets back to the value before the user selected a new one.

How can all of this be happening?  Why would a combo box would perfectly under Visual Studio/Windows 7 and not under Server 2008?

Can anybody offer an explanation?

Below is the code from one of the "SelectedIndexChanging" combo boxes.

<%@ Control Language="VB" AutoEventWireup="false" CodeFile="LanguageSelector.ascx.vb" Inherits="UserControls_LanguageSelector" %>
<telerik:RadComboBox
    ID="LanguageSelectorComboBox"
    AutoPostBack="true"
    EnableEmbeddedSkins="true"
    Skin="Sitefinity"
    runat="server"
    Height="200px"
    Width="215px"
    ZIndex="9000"
>
</telerik:RadComboBox>


Protected Sub LanguageSelectorComboBox_SelectedIndexChanged(ByVal sender As Object, ByVal e As RadComboBoxSelectedIndexChangedEventArgs) Handles LanguageSelectorComboBox.SelectedIndexChanged
    If Page.IsPostBack Then
        Dim KeyVal As String = e.Value
        Dim languageId As Integer = Convert.ToInt32(KeyVal)
        Dim conn1 As New SqlConnection(Convert.ToString(Application("SiteDBConnect")))
        Try
            conn1.Open()
        Catch ex As Exception
            Throw New ApplicationException("Error in connection=" & ex.Message & ". The requested list cannot be created.")
        Finally
        End Try
        Dim iRtn As Integer = 0
        Dim Languages_Data As New Languages_DDC()
        Dim Languages_Cmds As New Languages_DUC()
 
        Dim Currencies_Data As Currencies_DDC = New Currencies_DDC
        Dim Currencies_Cmds As Currencies_DUC = New Currencies_DUC
 
        Dim TransTextSort_Data As TransTextSort_DDC = New TransTextSort_DDC
        Dim TransTextSort_Cmds As TransTextSort_DUC = New TransTextSort_DUC
        Dim TransTextSort_Arry As ArrayList = New ArrayList
 
        Dim iUSDKey As Integer = 1
        Dim iForgnKey As Integer = 0
        Dim currencyId As Integer = Session("UserCurrencyKey")
 
        Dim iDebug As Int32 = -1
        Languages_Data.LanguageId = languageId
        iRtn = Languages_Cmds.GetSpecific(conn1, Languages_Data, iDebug, "HON")
        If iRtn = -1 Then
            If bSetSessionValue Then
                Session("UserLanguageKey") = Languages_Data.LanguageId
                Session("UserLanguageCulture") = Languages_Data.LanguageTransCulture
                Session("UserLanguageName") = Languages_Data.LanguageEnglishName
                Session("UserChangedLanguage") = "Yes"
                Session("UserLanguageNum") = GetNewLangKeyStringValue(Languages_Data.LanguageId)
 
                '   Now we need to change the names of the session currency info so it is in the newly selected language
                Dim sLangName As String = GetNewLangKeyStringValue(Session("UserLanguageKey"))
                Dim sFieldToPopulate As String = "TextSortLang" & sLangName
 
                iRtn = TransTextSort_Cmds.GetAllByTextSort_Currency(conn1, TransTextSort_Arry, currencyId, -1, "HON Currency Change")
                For Each TransTextSort_Data In TransTextSort_Arry
                    'Session("USDLanguageName") = "United States Dollar"
                    'Session("NativeCurrencyLanguageName") = "United States Dollar"
                    Session("NativeCurrencyLanguageName") = TransTextSort_Cmds.GetField(TransTextSort_Data, sFieldToPopulate)
                    '   There can only be one record in this array, so force an exit after processing the first record
                    '   to protect us from something squirrely happening
                    Exit For
                Next
                '   Now get the native language name for the USD, unless we already have it
                If currencyId = 1 Then
                    Session("USDLanguageName") = Session("NativeCurrencyLanguageName")
                Else
                    TransTextSort_Arry = New ArrayList
                    iRtn = TransTextSort_Cmds.GetAllByTextSort_Currency(conn1, TransTextSort_Arry, 1, -1, "HON Currency Change")
                    For Each TransTextSort_Data In TransTextSort_Arry
                        Session("USDLanguageName") = TransTextSort_Cmds.GetField(TransTextSort_Data, sFieldToPopulate)
                        '   There can only be one record in this array, so force an exit after processing the first record
                        '   to protect us from something squirrely happening
                        Exit For
                    Next
                End If
            End If
            If bReloadPage Then
                Response.Redirect(HttpContext.Current.Request.RawUrl, True)
            End If
        End If
        conn1.Close()
        conn1 = Nothing
    End If
End Sub

This is just one example.  I have more. If you want to see the results on the server 2008 system, navigate to http:://www.homesonlinenetwork.com and try changing the language selected in the combo box in the far upper right-hand corner.  This same combo box works perfectly under Visual Studio 2010/Windows7.

Any thoughts/help would be greatly appreciated!  I am stumped!

Thanks in advance!

Lynn

4 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 24 Aug 2011, 11:55 AM
Hi Lynn,

The difference in the OSes should not affect any of the code. The most likely issues that could arise would be related to the configuration of the web server.

So, I saw the demo page and verified the the correct selected index is submitted back to the server when the language is changed. This means that the logic on the server is probably resetting the selected item back to the default. The next step is to verify whether this is true by debugging the server-side code and see when the selected index is reset.

Regarding the Load On Demand problems, both RadComboBoxes were loaded with the page, so I was unable to investigate. Please provide a link to a page, that exhibits these problems.

Regards,
Simon
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Lynn
Top achievements
Rank 2
answered on 24 Aug 2011, 05:58 PM
Simon,

I appreciate your assistance, but saying this is a "server configuration problem" doesn't particularly help much.  I'm not being critical, but can you possibly give me an idea where in IIS7 I can tell IIS to ignore events and not pass them through to my code-behind file and its event code?  I'm not aware of such a setting in IIS.

Lynn

0
Lynn
Top achievements
Rank 2
answered on 27 Aug 2011, 07:42 PM
Simon,
By adding this information, I am attempting to be helpful to Telerik...
I have opened an incident with Microsoft over this issue.  I can re-create the problem at will (and also can execute a work-around that eliminates the problem) on both the Windows Server 2008 at the public data center, and also on a Windows Server 2008 R2 here in our development offices.

I cannot attach a test website that I have to this incident because it is too large and you do not accept zip files.  As I said above, by providing this information I am simply trying to be helpful.  I am not trying to assume that the problem documented here is a Telerik problem.

On the other hand, Microsoft may do that on their own Monday or Tuesday when they perform their debugging of this problem using test site that I have provided them with.

Simon, because of how easy this problem is to encounter (and reproduce), I cannot believe I am the only person on the planet to have encountered this problem.  Even if it is not a Telerik problem, I would think that Telerik would want to know about it.

Lynn
0
Simon
Telerik team
answered on 29 Aug 2011, 04:30 PM
Hello Lynn,

No problem, this may as well be a problem in RadComboBox and we will investigate the sample project you have sent in a support ticket to confirm/deny this.

Regards,
Simon
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Asked by
Lynn
Top achievements
Rank 2
Answers by
Simon
Telerik team
Lynn
Top achievements
Rank 2
Share this question
or