I am a beginner in C#, ASP.NET.
What i want is when clicks 'submit' button, need to display a message 'Your registration is succesful'.
But When i clicks here, nothing showing, but it showing message in other pc with same code.
Somebody can help me ? is there any configuration errors in my project ?
code here:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Windows.Forms;
public partial class Registration : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void submit_Click(object sender, EventArgs e)
{
Response.Write("Your registration is succesful"); // Not displaying
//MessageBox.Show("Test Display");
}
}
ASP.NET
<form id="form1" runat="server">
<div>
</div>
<table class="style1">
<tr>
<td class="style3">
Username</td>
<td class="style6">
<asp:TextBox ID="uname" runat="server" Width="180px"></asp:TextBox>
</td>
<td class="style8">
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="uname" ErrorMessage="Username is required" ForeColor="Red"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style3">
Email</td>
<td class="style6">
<asp:TextBox ID="email" runat="server" Width="180px"></asp:TextBox>
</td>
<td class="style8">
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="email" ErrorMessage="Email is required" ForeColor="Red"></asp:RequiredFieldValidator>
<br />
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
ControlToValidate="email" ErrorMessage="You must enter the valid email id"
ForeColor="Red"
ValidationExpression="\w+([-+.']\w+)*#\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="style3">
Password</td>
<td class="style6">
<asp:TextBox ID="pass" runat="server" TextMode="Password" Width="180px"></asp:TextBox>
</td>
<td class="style8">
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
ControlToValidate="pass" ErrorMessage="Password is required" ForeColor="Red"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style3">
Confirm Password</td>
<td class="style6">
<asp:TextBox ID="passr" runat="server" TextMode="Password" Width="180px"></asp:TextBox>
</td>
<td class="style8">
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
ControlToValidate="passr" ErrorMessage="Confirm password is required"
ForeColor="Red"></asp:RequiredFieldValidator>
<br />
<asp:CompareValidator ID="CompareValidator1" runat="server"
ControlToCompare="pass" ControlToValidate="passr"
ErrorMessage="Both passwords must be same" ForeColor="Red"></asp:CompareValidator>
</td>
</tr>
<tr>
<td class="style3">
Country</td>
<td class="style6">
<asp:DropDownList ID="country" runat="server" Width="180px">
<asp:ListItem>Select Country</asp:ListItem>
<asp:ListItem>USA</asp:ListItem>
<asp:ListItem>UK</asp:ListItem>
<asp:ListItem>GERMANY</asp:ListItem>
<asp:ListItem>FRANCE</asp:ListItem>
<asp:ListItem>INDIA</asp:ListItem>
</asp:DropDownList>
</td>
<td class="style8">
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
ControlToValidate="country" ErrorMessage="Select a country name"
ForeColor="Red" InitialValue="Select Country"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style4">
</td>
<td class="style7">
<asp:Button ID="submit" runat="server" Text="Submit" />
</td>
<td class="style5">
<input id="Reset1" type="reset" value="reset" /></td>
</tr>
<tr>
<td class="style2">
</td>
<td class="style6">
</td>
<td>
</td>
</tr>
</table>
</form>
You need to understand the difference between server-side and client-side.
Server-side is everything that happens on the server (e.g. ASP, ASP.NET, PHP) that is used to create the HTML that is sent to the browser. It also deals with the information that is returned by the browser when the user submits stuff back (the post-back).
Client-side is everything that happens on the browser once the HTML has been received, or when user does something on the page like clicking an element.
What you are doing is trying to run a Windows Application style MessageBox.Show on the server... that's not going to work.
If you want the browser to display an "alert" window (a bit like a MessageBox) then you need to send client-side script to the browser. Try this...
protected void submit_Click(object sender, EventArgs e)
{
Response.Write("Your registration is succesful");
var script = "window.alert('Test Display');";
ClientScript.RegisterStartupScript(this.GetType(), "message", script, true);
}
As per the comment by the OP...
My problem is Response.Write("Your registration is succesful"); is not working
Instead of using Response.Write use a <asp:Literal> control (which gives you the advantage of positioning the control exactly where you need it) and set the .Text property of it (remember that this will remain on post-back, so you might need to clear it).
You could also use a <asp:Label> which would not only allow you to position it, but you can also including .CssClass or .Style attributes for better formatting.
If you want to show confirmation message box try to use jquery on your .aspx page. You can add function like this
function confirmationAccept() {
return confirm("Accept?");
}
And than add properties onclientclick like this:
<asp:Button ID="addButton" runat="server" Text="Add" OnClientClick="return confirmationAccept()">
You can show javascript alert message by using ClientScript.RegisterStartupScript.
Related
I have a table with some information shown, but I would like to able to edit after I click the checkbox above.
<asp:Button ID="Backbtn" runat="server" Text="Back" Width="84px"
onclick="Backbtn_Click" />
<br /><br />
<asp:CheckBox ID="CheckBox1" runat="server" onclick="check" Text="Check"/>
<table class="T-Table" >
<tr>
<th colspan="6"><em>IT INTERNAL USE</em></th>
</tr>
<tr>
<td width="180px">Doc.No </td>
<td>:</td>
<td width="160px">
<asp:Label ID="DocNo" runat="server" Text="Label"></asp:Label>
</td>
<%-- <td width="180px">Job Complete Date </td>
<td>:</td>
<td width="160px">
</td> --%>
</tr>
<tr>
<td>Received Date :</td>
<td>:</td>
<td>
<asp:Label ID="RDate" runat="server" Text="Label"></asp:Label>
</td>
<td>Response Time (HR) :</td>
<td>:</td>
<td><asp:TextBox ID="Response_T" runat="server" TextMode="DateTimeLocal"></asp:TextBox>
</td>
</tr>
<tr>
<td>Remarks </td>
<td>:</td>
<td colspan="5"><asp:TextBox ID="Remarks" runat="server" Rows="5" TextMode="MultiLine"
Columns="80"></asp:TextBox></td>
</tr>
<tr>
<td>Cost charge to Department </td>
<td>:</td>
<td><asp:TextBox ID="Cost" runat="server" ></asp:TextBox></td>
<td>Status</td>
<td>:</td>
<td> <asp:DropDownList ID="Progress" runat="server">
<asp:ListItem Text="Done" Value="Done"></asp:ListItem>
<asp:ListItem Text="In Progress" Value="In Progress"></asp:ListItem>
<asp:ListItem Text="Pending" Value="Pending"></asp:ListItem>
</asp:DropDownList></td>
</tr>
Here are some html code. I would like to add a function so that all the information can be editable after I click the Checkbox.
Thank you
There is nothing to do with C# or Linq here (as you tagged).
Assuming you are working on an ASP.NET application
Enable the checkbox AutoPostback. ie, Set AutoPostback property of the checkbox to true.
Then on page load or checkbox checked change event, enable the textbox.
eg. name of text editor is txtRemarks and checkbox name to be chkRemarksEditor
on chkRemarksEditor Checked change event :-
txtRemarks.Enabled = chkRemarksEditor.Checked;
I'm using two contact forms in the same aspx page, one has 4 textbox controls (name- email- subject- body) and send button control.
The second form has 2 textbox controls and send button, all (except the second textbox of the second form) has validation controls (requiredFieldValidator).
This is the code inside the first button click event:
protected void ButtonSend_Click(object sender, EventArgs e)
{
if(Page.IsValid)
{
LabelIRespond.Visible = true;
.....
}
}
there is no code in the second button click event.
the problem is, when the first form validated successful and the second form not validated, the code inside click event not executed. and the error message of the second form appears. They act like they are one form!
The markup for both forms:
<section id="sendSection">
<div id="contactMe">
<h1>Contact me</h1>
</div>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<h4>Send me a message:</h4>
<table class="auto-style1">
<tr>
<td class="auto-style8">
<asp:TextBox ID="TextBoxEmail" placeholder="Your Email address" runat="server" BackColor="#D4D8DF" Font-Names="Century Gothic" CssClass="txtbxs" Height="25px" Width="250px"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidatorEmail" runat="server" ControlToValidate="TextBoxEmail" CssClass="ErrorMessage" Display="Dynamic" ErrorMessage="Please enter your Email address">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBoxEmail" CssClass="ErrorMessage" Display="Dynamic" ErrorMessage="RegularExpressionValidator" ValidationExpression="\w+([-+.']\w+)*#\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="auto-style8">
<asp:TextBox ID="TextBoxName" placeholder="Your name" runat="server" BackColor="#D4D8DF" Font-Names="Century Gothic" CssClass="txtbxs" Height="25px" Width="250px"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidatorName" runat="server" ControlToValidate="TextBoxName" CssClass="ErrorMessage" Display="Dynamic" ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="auto-style5">
<asp:TextBox ID="TextBoxSubject" placeholder="Subject" runat="server" BackColor="#D4D8DF" Font-Names="Century Gothic" CssClass="txtbxs" Height="25px" Width="250px"></asp:TextBox>
</td>
<td class="auto-style3">
<asp:RequiredFieldValidator ID="RequiredFieldValidatorSubject" runat="server" ControlToValidate="TextBoxSubject" CssClass="ErrorMessage" Display="Dynamic" ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="auto-style6">
<asp:TextBox ID="TextBoxBody" placeholder="What do you want to tell me?" runat="server" BackColor="#D4D8DF" TextMode="MultiLine" Font-Names="Century Gothic" CssClass="txtbxs" Height="180px" Width="370px"></asp:TextBox>
</td>
<td class="auto-style2">
<asp:RequiredFieldValidator ID="RequiredFieldValidatorBody" runat="server" ControlToValidate="TextBoxBody" CssClass="ErrorMessage" Display="Dynamic" ErrorMessage="Type your message">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="auto-style8">
<asp:Button ID="ButtonSend" runat="server" Text="Send" CssClass="btnSend" Width="80px" OnClick="ButtonSend_Click" UseSubmitBehavior="False" Font-Names="Century Gothic" />
</td>
<td>
</td>
</tr>
<tr>
<td class="auto-style8">
<asp:Label ID="LabelIRespond" runat="server" Text="Thanks, your message has been sent. I'll respond ASAP." Visible="False"></asp:Label>
</td>
<td>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
<ProgressTemplate>
<div class="wait">
</div>
</ProgressTemplate>
</asp:UpdateProgress>
</section>
<div class="split"></div>
<section id="viewCVSection">
<div id="check">
<h1>Check out my CV</h1>
</div>
<div class="cvForm">
<table class="auto-style1">
<tr>
<td class="auto-style4">
<asp:TextBox ID="TextBoxEmail2" placeholder="Company Email address" CssClass="txtbxs" runat="server" BackColor="#D4D8DF" Height="25px" Width="250px" Font-Names="Century Gothic"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBoxEmail2" CssClass="ErrorMessage" Display="Dynamic" ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="TextBoxEmail2" CssClass="ErrorMessage" Display="Dynamic" ErrorMessage="RegularExpressionValidator" ValidationExpression="\w+([-+.']\w+)*#\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="auto-style4">
<asp:TextBox ID="TextBoxCompany" placeholder="Company name" CssClass="txtbxs" runat="server" BackColor="#D4D8DF" Height="25px" Width="250px" Font-Names="Century Gothic"></asp:TextBox>
</td>
<td> </td>
</tr>
<tr>
<td class="auto-style4">
<asp:Button ID="Button1" CssClass="sendCV" runat="server" Text="Request CV" Font-Names="Century Gothic" OnClick="Button1_Click" />
</td>
<td> </td>
</tr>
</table>
</div>
</section>
You need to hook up validation controls with the correct button. Right now, button click in first form is causing validation in first contact form as well as second contact form, which is causing Page.IsValid to be false since second form fields are empty and therefore invalid.
So set the validation group of first contact form different from the second contact form as in code below. Then set the ValidationGroup on corresponding validation controls with the same value.
<asp:Button ID="ButtonSend" runat="server" Text="Send" CssClass="btnSend"
Width="80px" OnClick="ButtonSend_Click" UseSubmitBehavior="False"
Font-Names="Century Gothic" ValidationGroup="FirstGroup"/>
<asp:Button ID="Button1" CssClass="sendCV" runat="server"
Text="Request CV" Font-Names="Century Gothic" OnClick="Button1_Click"
ValidationGroup="SecondGroup"/>
NOTE: Make sure that all validation controls have their ValidationGroup also set to appropriate value after you make above code change.
just validating a web form and getting the following error
Everting was working fine until line 34 when I compiled and got this errors. there are no errors on my IDE
I have run a debug and cannot generate or see anything invalid
enter image description here
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Student Registration Form</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h3>Student Form</h3>
<table>
<tr>
<td>First Name</td>
<td>
<asp:TextBox ID="txtFirstName" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="rfvFirstName" runat="server" ErrorMessage="Enter your First Name" ControlToValidate="txtFirstName" ValidationGroup="Submit"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>Last Name</td>
<td>
<asp:TextBox ID="txtLastName" runat="server"></asp:TextBox></td>
<asp:RequiredFieldValidator ID="rfvTxtLastName" runat="server" ErrorMessage="please enter your surname" ControlToValidate=" txtLastName" ValidationGroup="submit"></asp:RequiredFieldValidator>
</tr>
<tr>
<td>Email</td>
<td>
<asp:TextBox ID="txtEmail" runat="server"></asp:TextBox></td>
<asp:RegularExpressionValidator ID="revtxtEmail" runat="server" ErrorMessage="invalid Email Format" ControlToValidate="txtEmail" ValidationGroup="submit" ValidationExpression="^([\w\.\-]+)#([\w\-]+)((\.(\w){2,3})+)$"></asp:RegularExpressionValidator>
</tr>
<tr>
<td>Subjects Available</td>
<td>
<asp:ListBox ID="ltbSubjectsAvailable" runat="server"></asp:ListBox>
</td>
</tr>
<tr>
<td>Subjects Selected</td>
<td>
<asp:ListBox ID="ltbSubjectsSelected" runat="server"></asp:ListBox></td>
</tr>
<tr>
<td>Password</td>
<td>
<asp:TextBox ID="txtPassword" TextMode="Password" runat="server"></asp:TextBox></td>
<asp:RequiredFieldValidator ID="rfvTxtPassword" runat="server" ErrorMessage="Please enter password" ControlToValidate="txtPassword" ValidationGroup="Submit"></asp:RequiredFieldValidator>
</tr>
<tr>
<td>Confirm Password</td>
<td>
<asp:TextBox ID="txtPasswordChange" TextMode="Password" runat="server"></asp:TextBox></td>
<asp:CompareValidator ID="cpvChangePassword" runat="server" ErrorMessage="Passwords do not match" ControlToValidate=" textPasswordChange" ControlToCompare="txtPassword"></asp:CompareValidator>
</tr>
<tr>
<td>
<asp:Button ID="btnSubmit" runat="server" ValidationGroup="Submit" Text="Button" /></td>
</tr>
</table>
</div>
</form>
</body>
</html>
maybe this is the solution: change the compiler version in the web.config
web config compiler version
If you see at the bottom of your error message
Asp.net version is 4.6
.net framework is 4.0
Make sure you're compiling in correct framework.
I have a problem getting an <asp:UpdatePanel..> to work inside a <table>.. <tr> </tr> structure and I don't know why. When the UpdatePanel is commented out everything works fine, but when I un-comment the UpdatePanel the contents of the <tr> </tr> tag doesn't even show up in Visual Studio 2010. This content does display when I run the web page but the UpdatePanel doesn't work. Non of my other web pages in this project have this problem but, then again, I use <div>s instead of <table>s in them.
One other thing. The is in my MasterPage.
Here is my script:
<asp:UpdatePanel ID="W9UpdatePanel" runat="server" UpdateMode="Always">
<ContentTemplate>
<tr>
<td colspan="6">
<div class="branchSetupSectionTitle">W-9 Information:</div>
</td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="btnDownloadW9Pdf" runat="server"
Text="Download W-9" onclick="btnDownloadW9Pdf_Click" AutoPostBack="True" />
<%--<asp:RegularExpressionValidator ID="RegularExpressionValidator24"
runat="server" ControlToValidate="txtFirstPaymentAmount" Display="Dynamic"
ErrorMessage="The dollar amount you entered is in the wrong format."
ForeColor="Red" ValidationExpression="^\d+(\.\d\d)?$">*</asp:RegularExpressionValidator>--%>
<asp:CheckBox ID="chkW9FormSubmitted" runat="server" AutoPostBack="True"
oncheckedchanged="chkW9FormSubmitted_CheckedChanged"
Text=" I have submitted this W-9 Form" />
</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</ContentTemplate>
</asp:UpdatePanel>
</tr>
The event fires for both the button and the checkbox but the entire page is refreshed.
Thanks for your help.
UpdatePanel needs to render a div or span in order to function correctly. Since neither of these elements can be rendered between table rows, UpdatePanel does not have a placeholder to render the postback response html, and thus it doesn't work.
A workaround in your case may be to see which part of your page does not need to be inside the update panel and leave it outside. You could leave just the contents of <td colspan="2"> inside the UpdatePanel.
<asp:ScriptManager ID="scm" runat="server">
</asp:ScriptManager>
<fieldset>
<legend>Truck Master Entry Form</legend>
<asp:UpdatePanel ID="upd1" runat="server">
<ContentTemplate>
<table cellpadding="2" cellspacing="1">
<tr>
<td align="right">
Truck no :
</td>
<td align="left">
<asp:TextBox ID="truckno" runat="server" Width="120px" Height="20px" />
</td>
</tr>
<tr>
<td align="right">
Size :
</td>
<td align="left">
<asp:DropDownList ID="drptrucksize" runat="server" Width="120px" Height="20px" DataValueField="WEIGHT"
DataTextField="SIZE" OnSelectedIndexChanged="drptrucksize_SelectedIndexChanged"
AutoPostBack="true" />
</td>
</tr>
<tr>
<td align="right">
Type :
</td>
<td align="left">
<asp:TextBox ID="txttrucktype" runat="server" Width="120px" Height="20px" />
</td>
</tr>
<tr>
<td align="right">
Weight :
</td>
<td align="left">
<asp:TextBox ID="txtweight" runat="server" Width="120px" Height="20px" />
</td>
</tr>
<tr>
<td align="right">
</td>
<td align="left">
<asp:Button ID="btnsave" runat="server" Text="Save" Width="100px" Height="50px" />
<asp:Button ID="btncancel" runat="server" Text="Cancel" Width="100px" Height="50px" />
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
The update panel need to be put outside the table. Look at
Mohammad Shahnawaz's code.
I have just created a website with a MasterPage. I have two conditions that will illustrate my problem:
Condition 1:
I have added a ModalPopupExtender on website.master. It has three fields and each field has a RequiredFieldValidator and a ValidatorCalloutExtender.
Condition 2:
I have a few different pages where you can click on a registration link. When you click the registration link, a registration form will appear. This form also has RequiredFieldValidators and ValidatorCalloutExtenders for each field.
Problem:
If I open a registration form and want to place my feedback, I click on the feedback button. The feedback modal popup displays. If I click on the submit button without filling the feedback form, it should give me the error in ValidatorCalloutExtender format on the ModalPopupExtender panel. However, it doesnt show me any error but the ValidatorCalloutExtender does show on the registation form along with respective validation.
<cc1:ModalPopupExtender CancelControlID="lnk_cancel" ID="popup_change_password" BackgroundCssClass="modalBackground"
runat="server" TargetControlID="ImageButton1" PopupControlID="panel_change_password">
</cc1:ModalPopupExtender>
<asp:Panel ID="panel_change_password" runat="server" Style="display: none; height: 400px;
width: 400px; padding-left:30px; background-repeat:no-repeat;" BackImageUrl="~/Images/background.gif">
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td colspan="3" valign="top">
<table cellpadding="0" cellspacing="0" width="400px">
<tr>
<td align="right">
<asp:ImageButton ID="lnk_cancel" runat="server" ImageUrl="Images/close.gif" Height="30px"
Width="30px" />
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<asp:Label ID="lbl_new_password" runat="server" Text="Your feedback is important to us."
CssClass="login_font1"></asp:Label>
</td>
</tr>
<tr>
<td colspan="3">
</td>
</tr>
<tr>
<td>
<asp:Label ID="lbl_name" runat="server" Text="Name" CssClass="Label_Styles"></asp:Label>
</td>
<td>
:
</td>
<td>
<asp:TextBox ID="txt_name" runat="server" CssClass="Textbox_Styles"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="3">
</td>
</tr>
<tr>
<td>
<asp:Label ID="lbl_email" runat="server" Text="Email Address" CssClass="Label_Styles"></asp:Label>
</td>
<td>
:
</td>
<td>
<asp:TextBox ID="txt_email" runat="server" CssClass="Textbox_Styles"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="3">
</td>
</tr>
<tr>
<td>
<asp:Label ID="lbl_comment" runat="server" Text="Comments" CssClass="Label_Styles"></asp:Label>
</td>
<td>
:
</td>
<td>
<asp:TextBox ID="txt_comment" runat="server" CssClass="Textbox_Styles" Height="120px"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="3">
</td>
</tr>
</table>
</asp:Panel>
Put the above code in an UpdatePanel with UpdateMode="Conditional" and ChildrenAsTriggers="False".
So it will look something like :
<asp:UpdatePanel ID="sbsModalExtenderUpdatePanel" runat="server" UpdateMode="Conditional"
Visible="False" ChildrenAsTriggers="False">
<ContentTemplate>
<asp:Panel ID="StepByStepBookingPanel" runat="server" Enabled="false" EnableViewState="false"
Style="display: block" CssClass="mediumModalPopup" ScrollBars="Auto" Width="800px"
Height="300px" ViewStateMode="Enabled">
<div id="clientCoordDiv" runat="server">
<table id="StepByStepTable" runat="server">
etc...
</table>
</div>
</asp:Panel>
<ajax:ModalPopupExtender ID="mpeStepByStepBooking" runat="server" BackgroundCssClass="modalBackground"
PopupControlID="StepByStepBookingPanel" CancelControlID="BtnCancel" OnCancelScript="ClearStepByStepPopup"
TargetControlID="hdnStepByStepButton" DropShadow="true" BehaviorID="modalwithinput" />
<asp:CompareValidator ID="ClientCoordinatorCompareValidator" runat="server" ErrorMessage="Please select a Client Coordinator"
ControlToValidate="ddlClientCoordinator" Display="None" Operator="NotEqual" SetFocusOnError="True"
Type="Integer" ValueToCompare="0" ValidationGroup="SelectionRequired">
</asp:CompareValidator>
<asp:CompareValidator ID="CVOCoordinatorCompareValidator" runat="server" ErrorMessage="Please select a CVO Coordinator"
ControlToValidate="ddlCVOCoordinator" Display="None" Operator="NotEqual" ValueToCompare="0"
Type="Integer" SetFocusOnError="True" ValidationGroup="SelectionRequired">
</asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="CompareClientCoordinatorExt" runat="server" Enabled="True"
TargetControlID="ClientCoordinatorCompareValidator" BehaviorID="ClientValidatorExt">
</ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="CVOCoordinatorCompareValidatorExt" BehaviorID="CVOValidatorExt"
runat="server" Enabled="True" TargetControlID="CVOCoordinatorCompareValidator">
</ajax:ValidatorCalloutExtender>
</ContentTemplate>
</asp:UpdatePanel>
This will keep the dialog up while you validate it. Unfortunately, I do not have the full solution since my validator messages are not displaying. So far, from what I am getting on the Net it is a problem with the Ajax library. Ugly!
Oh well, hope this helps someone...