简体   繁体   中英

Pop-up message breaking CSS

I am using the following C# to create a pop-up error message when data is not fully inputted and a button is pressed:

Page.ClientScript.RegisterStartupScript(typeof(Page), Guid.NewGuid().ToString(), "alert('Error Message')", true);

The pop-up is working, however, it appears to be breaking the CSS of the page.

Before: 在此处输入图片说明

After:

在此处输入图片说明

How do I fix this?

只需在javascript中而不是在ASP.net中创建按钮

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM