Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASPX page disappears

Status
Not open for further replies.

LoveOpnSrc

Programmer
Feb 6, 2008
14
US
Hi,

I am working on creating an .ASPX page,

* when the user clicks on my Submit button, it calls a validation function.

* if you are missing required information in the text boxes, you get a JavaScript pop-up window.

* but my .ASPX page goes blank when it appears, but then when you click on Ok in the pop-up box all the information comes back.

Is there a way to make the .ASPX information stay while the pop-up appears?

Thanks in advance...
 
you need to provide the code. asp.net provides the validation summary which is the prefered method for centralizing error messages.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Im going to stab at it being the position of the control that the alert gets written to, it is being rendered first, then the page causing your issue.

try moving the asp:Label or asp:Literal you are writing the error message to, to the bottom of the page.

Code:
<form runat="server">
 <div>
    <asp:StuffIsHere id="stf1" runat="server" CausesValidation="true" />
    <asp:RFV id="requiredFieldValidatorDooHickey" runat="server" />
 </div>
 <div>
    <asp:Label id="lblErrorMessage" runat="server" EnableViewState="false" />
 </div>
</form>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top