This is the complete code that i am testing and as mentioned in the subject line it does not work as expected
I just tested the VERY SAME code in an older project which is not a "Web Aplication" like this one.
Rather it's a website project and the code from above worked like a charm showing the messagebox. Not sure if it's your libraries or i miss something on my end?
Thank you
P.S. the problem is that when i click the Send button with all fields empty it cause postback instead to show the msgbox on client-side :(
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="TestPage.aspx.vb" Inherits="TestDotNet45Site.TestPage" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
>Contact Us</
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
/>
<
div
class
=
"ContactPage"
>
<
h1
>Contact Us (Please Fill Out The Contact Form Below)</
h1
>
<
h2
><
b
>Important note:</
b
> Yahoo, Microsoft and other free email providers often class our emails as spam/junk, so please check your spam/junk folder if you do not hear from us in a timely manner.</
h2
>
<
p
>
<
telerik:RadTextBox
ID
=
"FullNameText"
runat
=
"server"
EmptyMessage
=
"Your Name"
Resize
=
"None"
Width
=
"400px"
Skin
=
"MetroTouch"
/>
</
p
>
<
p
>
<
telerik:RadTextBox
ID
=
"EmailText"
runat
=
"server"
EmptyMessage
=
"Your E-mail"
Resize
=
"None"
Width
=
"400px"
Skin
=
"MetroTouch"
/>
</
p
>
<
p
>
<
telerik:RadTextBox
ID
=
"SubjectText"
runat
=
"server"
EmptyMessage
=
"Subject"
Resize
=
"None"
Width
=
"400px"
Skin
=
"MetroTouch"
/>
</
p
>
<
p
>
<
telerik:RadTextBox
ID
=
"MessageText"
runat
=
"server"
EmptyMessage
=
"Your Message"
Resize
=
"None"
Width
=
"500px"
Skin
=
"MetroTouch"
TextMode
=
"MultiLine"
Height
=
"120px"
/>
</
p
>
<
p
>
<
telerik:RadButton
ID
=
"SendMessageButton"
runat
=
"server"
Text
=
"Send"
Skin
=
"MetroTouch"
Width
=
"110px"
CausesValidation
=
"true"
ValidationGroup
=
"MyInquiryForm"
></
telerik:RadButton
>
</
p
>
<
p
><
b
>All fields are mandatory!</
b
> <
asp:Label
ID
=
"TestLabel"
runat
=
"server"
/> </
p
>
<
div
>
<
asp:RequiredFieldValidator
ID
=
"RequiredFullNameText"
runat
=
"server"
ErrorMessage
=
"Full Name is mandatory!"
ControlToValidate
=
"FullNameText"
Display
=
"None"
ValidationGroup
=
"MyInquiryForm"
>*</
asp:RequiredFieldValidator
>
<
asp:RequiredFieldValidator
ID
=
"RequiredEmailText"
runat
=
"server"
ErrorMessage
=
"E-Mail is mandatory!"
ControlToValidate
=
"EmailText"
Display
=
"None"
ValidationGroup
=
"MyInquiryForm"
>*</
asp:RequiredFieldValidator
>
<
asp:RegularExpressionValidator
ID
=
"RegularEmailText"
runat
=
"server"
ErrorMessage
=
"Please enter a valid e-mail address!"
ControlToValidate
=
"EmailText"
Display
=
"None"
ValidationGroup
=
"MyInquiryForm"
ValidationExpression
=
"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
>*</
asp:RegularExpressionValidator
>
<
asp:RequiredFieldValidator
ID
=
"RequiredSubjectText"
runat
=
"server"
ErrorMessage
=
"Subject is mandatory!"
ControlToValidate
=
"SubjectText"
Display
=
"None"
ValidationGroup
=
"MyInquiryForm"
>*</
asp:RequiredFieldValidator
>
<
asp:RequiredFieldValidator
ID
=
"RequiredMessageText"
runat
=
"server"
ErrorMessage
=
"Message is mandatory!"
ControlToValidate
=
"MessageText"
Display
=
"None"
ValidationGroup
=
"MyInquiryForm"
>*</
asp:RequiredFieldValidator
>
<
asp:ValidationSummary
ID
=
"ContactValidationSummary"
runat
=
"server"
ShowSummary
=
"false"
ShowMessageBox
=
"true"
HeaderText
=
"Please notice that:"
ValidationGroup
=
"MyInquiryForm"
DisplayMode
=
"BulletList"
/>
</
div
>
</
div
>
</
form
>
</
body
>
</
html
>
I just tested the VERY SAME code in an older project which is not a "Web Aplication" like this one.
Rather it's a website project and the code from above worked like a charm showing the messagebox. Not sure if it's your libraries or i miss something on my end?
Thank you
P.S. the problem is that when i click the Send button with all fields empty it cause postback instead to show the msgbox on client-side :(