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 (the page executes a validation code block in the codebehind), 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;
So this is my squence:
- User enters EmployeeID
- If user has NOT selected Alpha or Beta, then show messagebox
- If user HAS selected Alpha or Beta, then don't show messagebox
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?