Hi,
I have a Asp.Net written in C#. It serve as information input form. The form encounters sort of
random problem with the email field and state field. I have validator attached with these 2 fields
as the following:
=====
<form id="creditcardf orm" method="post" runat="server">
Email: <asp:textbox id="txtBillEmai l" maxlength="50" width="200" runat="server" />
<asp:requiredfi eldvalidator id="vp10" runat="server" initialvalue=""
controltovalida te="txtBillEmai l" errormessage="B illing Email cannot be empty" />
<asp:regularexp ressionvalidato r id="vp11" runat="server" controltovalida te="txtBillEmai l"
errormessage="B illing Email must follow em***@host.domain"
validationexpre ssion="^.+\@.+\ ..+$" display="Dynami c" />
State: <asp:dropdownli st id="lstBillStat e" runat="server" />
<asp:requiredfi eldvalidator id="vp7" runat="server" initialvalue=""
controltovalida te="lstBillStat e"
errormessage="B illing State must select one" display="Dynami c" />
<asp:button id="btnSubmit" causesvalidatio n="True" text="Submit" runat="server" cssclass="butto n" />
</form>
=====
My understanding is that the <asp:requiredfi eldvalidator> should guarantee the value of the field when the value of
"causesvalidati on" sets to "True" in the submit button. But what happened was that no error was generated when "btnSubmit" was clicked, but the value of one of these 2 fields get lost in the codebehind file. I tried to catch it on our development server, but I've never caught it. It only occurs on our production server. This problem doesn't always occur.
It only happens once a while randomly.
Would you please help me to figure out the cause of such value loss?
Thank you
hb