troubleshooting Question

Need a recommendation for ASPX code – a message to the user.

Avatar of dvplayltd
dvplayltdFlag for Bulgaria asked on
ASP.NET
5 Comments2 Solutions332 ViewsLast Modified:
Dear experts

I’m a professional programmer with 10+ years in business, but new to ASPX coding and need little help. When my user click on Submit button I do some check with such kind of code:
            if (byteState == 2)
            {
                Page.RegisterStartupScript("codice", "<script>alert('User with such email already extist! Probably this mean that this user is already register and do not need new registration!');</" + "script>");
                txtMail.Focus();
                return;
            }

It works, but I get warning that this metod is decprated. Could you recommended me what code I should use? Also, please give me example how I’m possible to show new line in the message.

 Other metod I use for message to the customer is with this code:
                    CustomMessage = "alert('Unexpected error in spUsers save record to local DB');";
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "CustomMessage", CustomMessage, true);

It is provided from this library:
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

Is this a good option? It look to me that it require to load a whole script library between 10 and 15 kb. In size, is that true???

 My primary dermands is
1)      To use a standart commands, which will be supported in next 5 years from all WEB brousers.
2)      To save internet traffic.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros