I have a datagrid in an updatepanel. Clicking on anyrow in the datagrid changes the style to bold so the user knows they have selected it. On my development machine, clicking on the row updates only the panel as you would expect. Once on live server, clicking on a row in the datagrid posts back the entire page. Does anybody have any ideas as to what I can do to fix this.
<asp:UpdatePanelID="updatePanel" runat="server">
<ContentTemplate>
<asp:GridViewID="reconGrid"runat="server"CssClass="gridTable"AutoGenerateColumns="false" AllowPaging="true"
PagerSettings-Mode="NumericFirstLast"PagerStyle-HorizontalAlign="right"PageSize="15"OnPageIndexChanging="reconGrid_PageIndexChanging"
OnRowDataBound="reconGrid_RowDataBound"CellPadding="2"Width="450px"OnRowCommand="reconGrid_RowCommand">
<AlternatingRowStyleCssClass="gridAltItemTr"/>
<RowStyleCssClass="gridItemTr"/>
<HeaderStyleCssClass="gridHeaderTr"ForeColor="white"/><Columns>
<asp:ButtonFieldText="SingleClick"CommandName="SingleClick"Visible="false"ButtonType="link"/>
<asp:TemplateFieldHeaderText="Clr">
<ItemTemplate>
<asp:CheckBoxID="cleared"runat="server"Enabled="false"Checked='<%# Convert.ToBoolean(Eval("CheckCleared")) %>'/>
</ItemTemplate></asp:TemplateField><asp:TemplateFieldHeaderText="Date">
<ItemTemplate>
<asp:LabelID="dateLbl"runat="server"CssClass="ssLabel"Text='<%# ((DateTime)Eval("TransactionDate")).ToShortDateString() %>'></asp:Label>
</ItemTemplate></asp:TemplateField><asp:TemplateFieldHeaderText="Chk #">
<ItemTemplate>
<asp:LabelID="chkLbl"runat="server"CssClass="ssLabel"Text='<%# Eval("CheckNumber") %>'></asp:Label>
</ItemTemplate></asp:TemplateField>
<asp:TemplateFieldHeaderText="Payee">
<ItemTemplate>
<asp:LabelID="payeeLbl"runat="server"CssClass="ssLabel"Text='<%# Eval("VendorName") %>'></asp:Label>
</ItemTemplate></asp:TemplateField>
<asp:TemplateFieldHeaderText="Amount">
<ItemTemplate>
<asp:LabelID="amountLbl"runat="server"CssClass="ssLabel"Text='<%# Eval("Amount") %>'></asp:Label>
</ItemTemplate>
<ItemStyleHorizontalAlign="right"/>
</asp:TemplateField>
<asp:TemplateFieldHeaderText="Type">
<ItemTemplate>
<asp:LabelID="typeLbl"runat="server"CssClass="ssLabel"Text='<%# Eval("Type") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateFieldHeaderText="FundTransactionsId"Visible="false">
<ItemTemplate>
<asp:LabelID="FundTransactionsId"runat="server"CssClass="ssLabel"Text='<%# Eval("Id") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateFieldHeaderText="AccountTransactionsId"Visible="false">
<ItemTemplate>
<asp:LabelID="AccountTransactionsId"runat="server"CssClass="ssLabel"Text='<%# Eval("AccountTransactionsId") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView></ContentTemplate>
</asp:UpdatePanel>
See this related post:http://forums.asp.net/p/1069974/1558261.aspx
-Damien
I did look at that post and it didn't help. All the other ajax on my site seems to work like they should.
You have aScriptManger control on your page, right?
-Damien
Yes I do have a script manager. All you have to do on the server is install the ajax framework right? That's all I did on the server. All my other ajax works fine.
For a server install, all you should need is the AJAX Framework, yes. For Visual Studio 2005, you need Visula Studio SP1.
-Damien
Here are the entire contents of my aspx page. Different parts are made hidden or visible as you go from top to bottom. I have 2 update panels on the page. When you click on any row in the datagrid, the amounts in the other updatepanel are updated. So they both post back at the same time, just that on server, the entire page posts back.
<%@.PageLanguage="C#"AutoEventWireup="true"EnableEventValidation="false"CodeBehind="AccountDetail.aspx.cs"Inherits="SchoolFunds.AccountDetail" %>
<%@.RegisterAssembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI"TagPrefix="asp" %><%@.RegisterAssembly="AjaxControlToolkit, Version=1.0.10618.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"
Namespace="AjaxControlToolkit"TagPrefix="ajax" %><%@.RegisterTagPrefix="uc1"TagName="Header"Src="../Share/controls/Header.ascx" %>
<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml">
<headrunat="server">
<title>Account Details</title><scriptlanguage="javascript"src="../Share/css/util.js"></script>
<linkhref="../Share/css/global.css"type="text/css"rel="STYLESHEET"><linkhref="../spreadsheet.css"rel="stylesheet"type="text/css"/>
</head>
<bodyclass="body"style="width: 100%"><formmethod="post"runat="server">
<asp:ScriptManagerID="scriptmanger1"runat="server"></asp:ScriptManager><divclass="headerDiv"id="headers"><uc1:Headerid="ucHeader"runat="server"></uc1:header></div>
<ajax:AlwaysVisibleControlExtenderrunat="server"id="AlwaysVisibleControlExtender1"TargetControlID="allwaysOnMessage"VerticalOffset="117"HorizontalOffset="0"ScrollEffectDuration=".1"></ajax:AlwaysVisibleControlExtender>
<asp:PanelID="allwaysOnMessage"runat="server"BackImageUrl="~/bar1.gif"Width="755px"BorderWidth="1px"BorderStyle="Solid"BorderColor="buttonshadow">
<tablealign="left"style="vertical-align: middle; text-align: center; font-weight: bold;">
<tr>
<tdclass="dateLabel">Date</td>
<tdclass="typeLabel">Type</td>
<tdclass="numberLabel">Number</td>
<tdclass="dropdownLabel">Payee</td>
<tdclass="dropdownLabel">Account</td>
<tdclass="memoLabel">Memo</td>
<tdclass="ssMoneyTextBox">Increase</td>
<tdalign="right"style="width: 38px;">
<asp:Imagerunat="server"ID="aasdf"ImageUrl="~/images/check.gif"/>
</td>
<tdclass="ssMoneyTextBox">Decrease</td>
</tr>
</table>
</asp:Panel>
<br>
<asp:ValidationSummaryID="valSummary3"runat="server"ValidationGroup="valEdit"/><br>
<asp:ValidationSummaryid="valSummary"runat="server"ValidationGroup="validAdd"/><br>
<asp:ValidationSummaryid="valSummary1"runat="server"ValidationGroup="validEdit"/>
<br><asp:ValidationSummaryid="valSummary2"runat="server"ValidationGroup="validAddEmpty"/>
<asp:GridViewID="GridView1"runat="server"BorderColor="#DEDFDE"Width="750px"ShowHeader="true"HeaderStyle-BackColor="#FAFFF9"
BorderStyle="solid"BorderWidth="1px"AllowPaging="true"PageSize="15"CellPadding="4"ForeColor="Black"GridLines="Vertical"ShowFooter="false"
OnRowDataBound="GridView1_RowDataBound"OnPageIndexChanging="GridView1_PageIndexChanging"OnRowCommand="GridView1_RowCommand"AutoGenerateColumns="False"OnRowUpdating="GridView1_RowUpdating"><RowStyleCssClass="row1"/>
<PagerStyleHorizontalAlign="right"BackColor="#E0F5E1"BorderStyle="solid"BorderWidth="1px"BorderColor="black"/><AlternatingRowStyleCssClass="row2"/>
<Columns>
<asp:ButtonFieldText="SingleClick"CommandName="SingleClick"Visible="false"FooterText="SingleClick"ButtonType="Link"CausesValidation="true"ValidationGroup="validEdit"/><asp:TemplateFieldVisible="false">
<HeaderTemplate></HeaderTemplate>
</asp:TemplateField>
<asp:TemplateFieldHeaderText="AccountTransactionsId"HeaderStyle-CssClass="ssHeader"Visible="false">
<ItemTemplate>
<asp:LabelID="AccountTransactionsIdLabel"runat="server"Text='<%# Eval("AccountTransactionsId") %>'CssClass="ssLabel"></asp:Label></ItemTemplate>
</asp:TemplateField>
<asp:TemplateFieldHeaderText="FundTransactionsId"HeaderStyle-CssClass="ssHeader"Visible="false">
<ItemTemplate>
<asp:LabelID="FundTransactionsIdLabel"runat="server"Text='<%# Eval("FundTransactionsId") %>'CssClass="ssLabel"></asp:Label>
</ItemTemplate><ItemStyleCssClass="ssCell"/>
</asp:TemplateField><asp:TemplateFieldHeaderText="TransferAccountId"HeaderStyle-CssClass="ssHeader"Visible="false">
<ItemTemplate>
<asp:LabelID="TransferAccountIdLabel"runat="server"Text='<%# Eval("TransferAccountId") %>'></asp:Label></ItemTemplate>
<ItemStyleCssClass="ssCell"/></asp:TemplateField>
<asp:TemplateField>
<HeaderStyleCssClass="ssHeader"HorizontalAlign="left"VerticalAlign="bottom"/>
<HeaderTemplate><asp:TextBoxID="DateAdd"runat="server"CssClass="ssDateTextBoxAdd"Visible="true"Width="70px"></asp:TextBox>
<ajax:TextBoxWatermarkExtenderID="DateAddWME"runat="server"TargetControlID="DateAdd"WatermarkText="Date"WatermarkCssClass="dateTextBoxWM"></ajax:TextBoxWatermarkExtender>
<asp:ImageButtonrunat="server"ID="dateAddImgBtn"CausesValidation="false"TabIndex="-1"ImageUrl="~/images/calendar button.bmp"Visible="true"/>
<asp:RequiredFieldValidatorID="reqDateAdd"runat="server"ErrorMessage="You must enter a transaction date."ControlToValidate="DateAdd"Display="static"ValidationGroup="validAdd">**</asp:RequiredFieldValidator>
<asp:rangevalidatorid="valDateAdd"runat="server"ErrorMessage="Transaction date is out of range or is incorrect format (mm/dd/yyyy)."
ControlToValidate="DateAdd"MaximumValue="12/31/9999"MinimumValue="1/1/1753"Type="Date"Display="Dynamic"ValidationGroup="validAdd">**</asp:rangevalidator><ajax:CalendarExtenderID="AddCalendar"runat="server"TargetControlID="DateAdd"Animated="true"PopupButtonID="dateAddImgBtn"></ajax:CalendarExtender>
</HeaderTemplate>
<ItemStyleCssClass="ssCell"VerticalAlign="bottom"/>
<ItemTemplate><asp:LabelID="DateLabel"runat="server"Text='<%# ((DateTime)Eval("TransactionDate")).ToShortDateString() %>'ToolTip='<%# ((DateTime)Eval("TransactionDate")).ToShortDateString() %>'CssClass="dateLabel"Width="70px"></asp:Label>
<asp:TextBoxID="DateText"TabIndex="1"runat="server"Text='<%# ((DateTime)Eval("TransactionDate")).ToShortDateString() %>'ToolTip='<%# ((DateTime)Eval("TransactionDate")).ToShortDateString() %>'Visible="false"CssClass="ssDateTextBox"Width="70px"></asp:TextBox><ajax:CalendarExtenderID="EditCalendar"runat="server"TargetControlID="DateText"Animated="true"PopupButtonID="dateEditImgBtn"></ajax:CalendarExtender>
<asp:RequiredFieldValidatorID="reqDate"runat="server"ErrorMessage="You must enter a transaction date."ControlToValidate="DateText"Display="dynamic"ValidationGroup="validEdit">**</asp:RequiredFieldValidator>
<asp:rangevalidatorid="valDate"runat="server"ErrorMessage="Transaction date is out of range or is incorrect format (mm/dd/yyyy)."
ControlToValidate="DateText"MaximumValue="12/31/9999"MinimumValue="1/1/1753"Type="Date"Display="Dynamic"ValidationGroup="validEdit">**</asp:rangevalidator><asp:ImageButtonrunat="server"ID="dateEditImgBtn"CausesValidation="false"TabIndex="-1"ImageUrl="~/images/calendar button.bmp"Visible="false"/>
</ItemTemplate></asp:TemplateField>
<asp:TemplateField>
<HeaderStyleCssClass="ssHeader"/>
<HeaderTemplate>
<asp:TextBoxID="typeAdd"CssClass="ssTypeTextBox"TabIndex="-1"runat="server"Width="33px"Enabled="false"></asp:TextBox>
</HeaderTemplate>
<ItemTemplate>
<asp:LabelID="TypeLabel"tabindex="-1"runat="server"Text='<%# Eval("TransactionType") %>'ToolTip='<%# Eval("TransactionType") %>'CssClass="typeLabel"Width="33px"></asp:Label>
<asp:TextBoxID="TypeText"TabIndex="-1"runat="server"Text='<%# Eval("TransactionType") %>'ToolTip='<%# Eval("TransactionType") %>'visible="false"CssClass="ssTypeTextBox"ReadOnly="true"></asp:TextBox>
</ItemTemplate>
<ItemStyleCssClass="ssCell"/>
</asp:TemplateField><asp:TemplateField>
<HeaderStyleCssClass="ssHeader"/>
<HeaderTemplate>
<asp:TextBoxID="CheckNumberAdd"runat="server"CssClass="ssNumberTextBoxAdd"Visible="true"Width="50px"></asp:TextBox>
<ajax:TextBoxWatermarkExtenderID="CheckNumberAddWME"runat="server"TargetControlID="CheckNumberAdd"WatermarkText="Number"WatermarkCssClass="numberTextBoxWM"></ajax:TextBoxWatermarkExtender>
</HeaderTemplate>
<ItemTemplate>
<asp:LabelID="CheckNumberLabel"runat="server"Text='<%# Eval("CheckNumber") %>'ToolTip='<%# Eval("CheckNumber") %>'CssClass="ssNumberTextBox"Width="50px"></asp:Label>
<asp:TextBoxTabIndex="2"ToolTip='<%# Eval("CheckNumber") %>'ID="CheckNumberText"runat="server"Text='<%# Eval("CheckNumber") %>'visible="false"CssClass="ssNumberTextBox"Width="50px"></asp:TextBox>
</ItemTemplate>
<ItemStyleCssClass="ssCell"/>
</asp:TemplateField><asp:TemplateField>
<HeaderStyleCssClass="ssHeader"/>
<HeaderTemplate>
<asp:DropDownListID="VendorNameAdd"runat="server"DataTextField="VendorName"DataValueField="Id"CssClass="ssDropDown"Visible="true"Width="150px"></asp:DropDownList></HeaderTemplate>
<ItemTemplate>
<asp:LabelID="VendorLabel"runat="server"Text='<%# Eval("VendorName") %>'ToolTip='<%# Eval("VendorName") %>'CssClass="dropdownLabel"Width="150px"></asp:Label>
<asp:DropDownListTabIndex="3"ID="VendorText"runat="server"Visible="false"DataTextField="VendorName"DataValueField="Id"CssClass="ssDropDown"Width="150px"></asp:DropDownList>
<asp:CustomValidatorrunat="server"ID="valVendor"ControlToValidate="VendorText"Display="dynamic">**</asp:CustomValidator></ItemTemplate>
<ItemStyleCssClass="ssCell"/>
</asp:TemplateField>
<asp:TemplateField>
<HeaderStyleCssClass="ssHeader"/>
<HeaderTemplate>
<br/>
<asp:DropDownListID="AccountNameAdd"runat="server"DataTextField="Account"DataValueField="Id"CssClass="ssDropDown"Visible="true"Width="150px"></asp:DropDownList>
<asp:RequiredFieldValidatorID="valAccountAdd"runat="server"InitialValue="-1"ControlToValidate="AccountNameAdd"ErrorMessage="You must select an account."ValidationGroup="validAdd">**</asp:RequiredFieldValidator>
<asp:CustomValidatorID="valAccountAddDDL"runat="server"Display="Dynamic"ControlToValidate="AccountNameAdd"ValidationGroup="validAdd">**</asp:CustomValidator>
</HeaderTemplate>
<ItemTemplate>
<asp:LabelID="AccountLabel"runat="server"Text='<%# Eval("Name") %>'ToolTip='<%# Eval("Name") %>'CssClass="dropdownLabel"Width="150px"></asp:Label>
<asp:DropDownListTabIndex="4"ID="AccountName"runat="server"Visible="false"DataTextField="Account"DataValueField="Id"CssClass="ssDropDown"Width="150px"></asp:DropDownList>
<asp:requiredfieldvalidatorid="RequiredfieldAccount"Display="Dynamic"ControlToValidate="AccountName"Runat="server"InitialValue="-1"ErrorMessage="You must select an account."ValidationGroup="validEdit">**</asp:requiredfieldvalidator><asp:CustomValidatorID="valAccountDDL"runat="server"Display="Dynamic"ControlToValidate="AccountName"ValidationGroup="valEdit">**</asp:CustomValidator>
</ItemTemplate>
<ItemStyleCssClass="ssCell"/>
</asp:TemplateField>
<asp:TemplateField>
<HeaderStyleCssClass="ssHeader"/>
<HeaderTemplate>
<asp:TextBoxID="MemmoAdd"runat="server"TextMode="multiline"CssClass="ssMemoTextBoxAdd"Visible="true"Width="110px"Height="50px"></asp:TextBox>
<ajax:TextBoxWatermarkExtenderID="MemoAddWME"runat="server"TargetControlID="MemmoAdd"WatermarkText="Memo"WatermarkCssClass="memoTextBoxWM"></ajax:TextBoxWatermarkExtender>
</HeaderTemplate>
<ItemTemplate>
<asp:LabelID="MemoLabel"runat="server"Text='<%# Eval("Memo") %>'ToolTip='<%# Eval("Memo") %>'CssClass="memoLabel"Width="110px"></asp:Label>
<asp:TextBoxTabIndex="5"ID="MemoText"runat="server"Text='<%# Eval("Memo") %>'ToolTip='<%# Eval("Memo") %>'visible="false"TextMode="multiline"CssClass="ssMemoTextBox"Width="110px"Height="50px"></asp:TextBox>
</ItemTemplate>
<ItemStyleCssClass="ssCell"/>
</asp:TemplateField>
<asp:TemplateField>
<HeaderStyleCssClass="ssHeader"/>
<HeaderTemplate>
<asp:TextBoxID="IncreaseAdd"runat="server"CssClass="ssMoneyTextBoxAdd"Visible="true"Width="65px"></asp:TextBox>
<ajax:TextBoxWatermarkExtenderID="IncreaseAddWME"runat="server"TargetControlID="IncreaseAdd"WatermarkText="Increase"WatermarkCssClass="moneyTextBoxWM"></ajax:TextBoxWatermarkExtender>
<asp:CustomValidatorrunat="server"ID="valIncreaseAdd"ControlToValidate="IncreaseAdd"Display="dynamic"ValidationGroup="validAdd">**</asp:CustomValidator>
<asp:RegularExpressionValidatorID="IncreaseAddRegExp"runat=serverDisplay="dynamic"ValidationExpression="\d*.?\d{2}"ControlToValidate="IncreaseAdd"ErrorMessage="Increase amount is not in a correct format. Enter all numbers without a '$' or commas."ValidationGroup="validAdd">**</asp:RegularExpressionValidator>
</HeaderTemplate>
<ItemTemplate>
<asp:LabelID="IncreaseLabel"runat="server"Text='<%# Eval("Increase") %>'ToolTip='<%# Eval("Increase") %>'CssClass="ssMoneyTextBox"Width="65px"></asp:Label>
<asp:TextBoxTabIndex="6"ID="IncreaseText"runat="server"Text='<%# Eval("Increase") %>'ToolTip='<%# Eval("Increase") %>'visible="false"CssClass="ssMoneyTextBox"Width="65px"></asp:TextBox>
<asp:RegularExpressionValidatorID="RegularExpressionValidator1"runat=serverDisplay="dynamic"ValidationExpression="^\d*?.\d{1,2}$"ControlToValidate="IncreaseText"ErrorMessage="Increase amount is not in a correct format. Enter all numbers without a '$' or commas."ValidationGroup="validEdit">**</asp:RegularExpressionValidator>
<asp:CustomValidatorrunat="server"ID="valIncrease"ControlToValidate="IncreaseText"Display="dynamic"ValidationGroup="validEdit">**</asp:CustomValidator>
</ItemTemplate>
<ItemStyleCssClass="ssCell"/>
</asp:TemplateField>
<asp:TemplateField>
<HeaderStyleCssClass="ssHeader"/>
<HeaderTemplate>
<asp:CheckBoxId="ClearedAdd"runat="server"CssClass="ssCheckBox"Visible="true"Width="28px"></asp:CheckBox>
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBoxId="ClearedDisplay"runat="server"Checked='<%# Eval("CheckCleared") %>'Enabled="false"Width="28px"></asp:CheckBox><asp:CheckBoxTabIndex="7"Id="ClearedEdit"runat="server"Checked='<%# Eval("CheckCleared") %>'Visible=falseCssClass="ssCheckBox"Width="28px"></asp:CheckBox>
</ItemTemplate>
<ItemStyleCssClass="ssCell"/>
</asp:TemplateField>
<asp:TemplateField>
<HeaderStyleCssClass="ssHeader"HorizontalAlign="left"VerticalAlign="bottom"/>
<HeaderTemplate><asp:TextBoxID="DecreaseAdd"runat="server"CssClass="ssMoneyTextBoxAdd"Visible="true"Width="65px"></asp:TextBox>
<ajax:TextBoxWatermarkExtenderID="DecreaseAddWME"runat="server"TargetControlID="DecreaseAdd"WatermarkText="Decrease"WatermarkCssClass="moneyTextBoxWM"></ajax:TextBoxWatermarkExtender>
<asp:ButtonCommandName="Add"Text="Add"ID="btnAdd"Runat="server"CssClass="addButton"Visible="true"CausesValidation="true"ValidationGroup="validAdd"/>
<asp:RegularExpressionValidatorID="DecreaseAddRegExp"runat=serverDisplay="dynamic"ValidationExpression="\d*.?\d{2}"ControlToValidate="DecreaseAdd"ErrorMessage="Decrease amount is not in a correct format. Enter all numbers without a '$' or commas."ValidationGroup="validAdd">**</asp:RegularExpressionValidator>
</HeaderTemplate>
<ItemTemplate>
<asp:LabelID="DecreaseLabel"runat="server"Text='<%# Eval("Decrease") %>'ToolTip='<%# Eval("Decrease") %>'CssClass="ssMoneyTextBox"Width="65px"></asp:Label><asp:TextBoxTabIndex="8"ID="DecreaseText"runat="server"Text='<%# Eval("Decrease") %>'ToolTip='<%# Eval("Decrease") %>'visible="false"CssClass="ssMoneyTextBox"ValidationGroup="validEdit"Width="65px"></asp:TextBox>
<asp:ButtonTabIndex="9"Text="Add"ID="btnAddGrid"Runat="server"CssClass="addButton"CausesValidation="true"ValidationGroup="validEdit"OnClick="btnAddGrid_Click"visible="false"/>
<asp:RegularExpressionValidatorID="DecreaseRegExp"runat=serverDisplay="dynamic"ValidationExpression="\d*.?\d{2}"ControlToValidate="DecreaseText"ErrorMessage="Decrease amount is not in a correct format. Enter all numbers without a '$' or commas."ValidationGroup="validEdit">**</asp:RegularExpressionValidator></ItemTemplate>
<ItemStyleCssClass="ssCell"/>
</asp:TemplateField>
<asp:TemplateFieldHeaderText="IsVoid"HeaderStyle-CssClass="ssHeader"Visible="false">
<ItemTemplate>
<asp:LabelID="IsVoidLabel"runat="server"Text='<%# Eval("IsVoid") %>'CssClass="ssLabel"></asp:Label></ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView><tableid="tblAddEmpty1"runat="server"Visible="false"width="750px"bgcolor="#FAFFF9"cellspacing="0">
<tr><tdclass="ssHeader"valign="baseline">
<asp:TextBoxID="DateAddEmpty"runat="server"CssClass="ssDateTextBoxAdd"Width="70px"></asp:TextBox>
<ajax:TextBoxWatermarkExtenderID="DateAddEmptyWM"runat="server"TargetControlID="DateAddEmpty"WatermarkText="Date"WatermarkCssClass="dateTextBoxWM"></ajax:TextBoxWatermarkExtender>
<asp:RequiredFieldValidatorID="reqDateEmpty"runat="server"ErrorMessage="You must enter a transaction date."ControlToValidate="DateAddEmpty"Display="dynamic"ValidationGroup="validAddEmpty">**</asp:RequiredFieldValidator>
<asp:rangevalidatorid="valDateEmpty"runat="server"ErrorMessage="Transaction date is out of range or is incorrect format (mm/dd/yyyy)."
ControlToValidate="DateAddEmpty"MaximumValue="12/31/9999"MinimumValue="1/1/1753"Type="Date"Display="Dynamic"ValidationGroup="validAddEmpty">**</asp:rangevalidator><asp:ImageButtonID="calendarImgBtnEmpty"runat="server"TabIndex="-1"CausesValidation="false"ImageUrl="~/images/calendar button.bmp"/>
<ajax:CalendarExtenderrunat="server"ID="DateAddEmtpyExtender"PopupButtonID="calendarImgBtnEmpty"TargetControlID="DateAddEmpty"Animated="true"></ajax:CalendarExtender>
</td>
<tdclass="ssHeader">
<asp:TextBoxID="typeAddEmpty"CssClass="ssTypeTextBox"TabIndex="-1"runat="server"visible="true"Width="33px"Enabled="false"></asp:TextBox></td>
<tdclass="ssHeader">
<asp:TextBoxID="CheckNumberAddEmpty"runat="server"CssClass="ssNumberTextBoxAdd"Width="50px"></asp:TextBox><ajax:TextBoxWatermarkExtenderID="CheckNumberAddEmptyWME"runat="server"TargetControlID="CheckNumberAddEmpty"WatermarkText="Number"WatermarkCssClass="numberTextBoxWM"></ajax:TextBoxWatermarkExtender>
</td>
<tdclass="ssHeader"><asp:DropDownListID="ddlVendorAddEmpty"runat="server"DataTextField="VendorName"DataValueField="Id"CssClass="ssDropDown"Width="150px"></asp:DropDownList>
</td>
<tdclass="ssHeader">
<br>
<asp:DropDownListID="ddlAccountAddEmpty"runat="server"DataTextField="Account"DataValueField="Id"CssClass="ssDropDown"Width="150px"></asp:DropDownList>
<asp:RequiredFieldValidatorID="valAccountAddEmpty"runat="server"InitialValue="-1"ControlToValidate="ddlAccountAddEmpty"ErrorMessage="You must select an account."ValidationGroup="validAddEmpty">**</asp:RequiredFieldValidator></td>
<tdclass="ssHeader">
<asp:TextBoxID="MemoAddEmpty"runat="server"TextMode="multiline"CssClass="ssMemoTextBoxAdd"Width="110px"Height="50px"></asp:TextBox>
<ajax:TextBoxWatermarkExtenderID="MemoAddEmptyWME"runat="server"TargetControlID="MemoAddEmpty"WatermarkText="Memo"WatermarkCssClass="memoTextBoxWM"></ajax:TextBoxWatermarkExtender>
</td>
<tdclass="ssHeader">
<asp:TextBoxID="IncreaseAddEmpty"runat="server"CssClass="ssMoneyTextBoxAdd"Width="65px"></asp:TextBox>
<ajax:TextBoxWatermarkExtenderID="IncreaseAddEmptyWME"runat="server"TargetControlID="IncreaseAddEmpty"WatermarkText="Increase"WatermarkCssClass="moneyTextBoxWM"></ajax:TextBoxWatermarkExtender>
<asp:RegularExpressionValidatorID="valIncreaseAddEmpty"runat=serverDisplay="dynamic"ValidationExpression="\d*.?\d{2}"ControlToValidate="IncreaseAddEmpty"ErrorMessage="Increase amount is not in a correct format. Enter all numbers without a '$' or commas."ValidationGroup="validAddEmpty">**</asp:RegularExpressionValidator>
<asp:CustomValidatorrunat="server"ID="valIncreaseAddEmpty1"ControlToValidate="IncreaseAddEmpty"Display="dynamic"ValidationGroup="validAddEmpty">**</asp:CustomValidator>
</td><tdclass="ssHeader">
<asp:CheckBoxId="ClearedAddEmpty"runat="server"CssClass="ssCheckBox"Width="28px"></asp:CheckBox>
</td><tdclass="ssHeader"valign="baseline">
<asp:TextBoxID="DecreaseAddEmpty"runat="server"CssClass="ssMoneyTextBoxAdd"Width="65px"></asp:TextBox><ajax:TextBoxWatermarkExtenderID="DecreaseAddEmtpyWME"runat="server"TargetControlID="DecreaseAddEmpty"WatermarkText="Decrease"WatermarkCssClass="moneyTextBoxWM"></ajax:TextBoxWatermarkExtender>
<asp:RegularExpressionValidatorID="valDecreaseAddEmpty"runat=serverDisplay="dynamic"ValidationExpression="\d*.?\d{2}"ControlToValidate="DecreaseAddEmpty"ErrorMessage="Decrease amount is not in a correct format. Enter all numbers without a '$' or commas."ValidationGroup="validAddEmpty">**</asp:RegularExpressionValidator>
<asp:ButtonText="Add"ID="btnAddEmpty"Runat="server"CssClass="addButton"CausesValidation="true"ValidationGroup="validAddEmpty"OnClick="btnAddEmpty_Click"/>
</td></tr>
</table>
<asp:PanelID="pageExtender"runat="server"Height="200px"></asp:Panel>
</form>
</body></html>
I finally got it to work. From this post: http://forums.asp.net/p/1095746/1653605.aspx#1653605
All I had to do was add<xhtmlConformancemode="Transitional"/>to web.config under system.web
No comments:
Post a Comment