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.
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
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