Refreshing the asp.net web page after validation
Posted
by user279521
on Stack Overflow
See other posts from Stack Overflow
or by user279521
Published on 2010-04-09T14:31:07Z
Indexed on
2010/04/09
14:33 UTC
Read the original article
Hit count: 126
Hi, I have an asp.net web page (C# 2008) where the user would enter an EmployeeID, and when they tab out of the textbox, they get a messagebox prompting them to select one of two values from a dropdown listbox.
The code for the message prompt in the codebehind is :
Response.Write("<script>window.alert('Please select Alpha or Beta')</script>");
After the prompt is displayed, and the user clicks "ok" and returns to the page, the text on the page appears distorted (the text in labels are a size larger, the labels get wrapped to another line etc)
I tried putting a Response.Redirect("UserProfileMaint.aspx");
after the messagebox in the codebehind, but now, the messagebox does not appear;
I want to display the messagebox validation, and ensure the appearance of the text on the page is not distorted. How can I do this?
© Stack Overflow or respective owner