Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
215 views
in Technique[技术] by (71.8m points)

html - Text of Asp:button not visible

I am using asp.net core.

I have the following code:

<asp:Button ID="updateNotesBtn" Text="&#10004;" runat="server" OnClick="Click"/>

When I run the web app I can see that the button is visible within the HTML, however the text refuses to display. Hovering over the item reveals that a height is missing:

asp:button#updateNotesBtn 0 x 19

However when I add a height, I still can't see the text, which should display as: ?. That symbol is displayed elsewhere so that can't be the problem.

Is there something I'm missing?

question from:https://stackoverflow.com/questions/65861662/text-of-aspbutton-not-visible

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

asp:Button is an ASP.NET WebForms control. If you put this markup on a Razor page, it will simply render as an asp:Button element on your page without any WebForms functionality.

Options:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...