I am calling the RadAlert function in my code behind when a user clicks on the "Login" button. This is a very simple page with very simple functionality and I am following the examples to a tee, but still nothing. I am thinking it is because I am calling the function within a catch block when the login is unsuccessful, meaning that I am trying to display the window when the execution isn't finished. Can someone help me with this as I am stumped as to how best to proceed? My HTML and C# code is below:
<
form
runat
=
"server"
id
=
"frmLogin"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
></
telerik:RadScriptManager
>
<
telerik:RadWindowManager
ID
=
"LoginWindowManager"
runat
=
"server"
EnableShadow
=
"true"
Skin
=
"Telerik"
/>
<
div
class
=
"loginDiv"
>
<
asp:Image
ID
=
"ivxLogo"
AlternateText
=
"iVidix Logo"
ImageUrl
=
"./img/ividix_logo.jpg"
Height
=
"150px"
Width
=
"110px"
runat
=
"server"
/>
<
p
>Welcome to the Instructional Video Exchange. Please login to access your videos.</
p
>
<
div
align
=
"center"
>
<
table
border
=
"0"
cellpadding
=
"0"
cellspacing
=
"10"
>
<
tr
>
<
td
>UserName:</
td
>
<
td
>
<
telerik:RadTextBox
ID
=
"txtUserName"
runat
=
"server"
Width
=
"150px"
TabIndex
=
"0"
Skin
=
"Vista"
/>
</
td
>
</
tr
>
<
tr
>
<
td
>Password:</
td
>
<
td
>
<
telerik:RadTextBox
ID
=
"txtPassword"
runat
=
"server"
Width
=
"150px"
TabIndex
=
"1"
TextMode
=
"Password"
Skin
=
"Vista"
>
</
telerik:RadTextBox
></
td
>
</
tr
>
<
tr
>
<
td
>Institution:</
td
>
<
td
>
<
telerik:RadComboBox
ID
=
"ddlInstitutions"
runat
=
"server"
DataSourceID
=
"srcInstitutions"
DataTextField
=
"Name"
DataValueField
=
"InstID"
TabIndex
=
"2"
Skin
=
"Vista"
AllowCustomText
=
"True"
>
</
telerik:RadComboBox
>
</
td
>
</
tr
>
<
tr
>
<
td
colspan
=
"2"
align
=
"right"
><
asp:Button
ID
=
"btnSubmit"
runat
=
"server"
Text
=
"Login"
onclick
=
"btnSubmit_Click"
TabIndex
=
"3"
/></
td
>
</
tr
>
</
table
>
</
div
>
</
div
>
</
form
>
try
{
String encryptPwd = CryptoHelper.Encrypt(password);
//log.Debug("Encrypted version of the password: " + password + " is " + encryptPwd);
userSession = SessionManager.CreateSession(userName, encryptPwd, instID);
}
catch
(IvidixException ex)
{
String ErrorMessage =
"UserName and/or Password in combination with the Institution were not valid. Please try again.\n"
;
ErrorMessage = ErrorMessage +
"Specifically, "
+ (String) ex.LocalMessages[0] +
"\n"
;
ErrorMessage = ErrorMessage +
"Please contact Ividix Support if you feel that this error is incorrect."
;
log.Error(
"UserDetail Session was not created properly and therefore not stored within the HttpSession."
);
log.Debug(
"End btnSubmit_Click"
);
LoginWindowManager.RadAlert(ErrorMessage, 350, 200,
"Error"
,
""
);
return
;
}