Closed jnz-jahangir closed 6 months ago
Adding @danroth27 to confirm but I just ran the code and IntelliSense even suggests the quotes, even though I was able to run with or without quotes. Do you get an error if you run with quotes?
I did notice though a small formatting improvement I can make on this page though
HTML5 doesn't require the quotes if the attribute value doesn't have spaces in it, but stylistically we typically include them.
Closing since code is correct. But please let us now if anything is not working for you @jnz-jahangir.
@mairaw @danroth27 Actually I mean this code
When I do the same as the picture, I receive an error on the last line. But it works when I remove the quote to make <Counter IncrementAmount="10" />
be <Counter IncrementAmount=10 />.
If it is possible the quote make the IncrementAmount be a string varible rather than an integer varible?
When I do the same as the picture, I receive an error on the last line.
@jnz-jahangir Could you please share with us the exact error you are seeing? It would also help if you could share the contents of Counter.razor with us.
When I do the same as the picture, I receive an error on the last line.
@jnz-jahangir Could you please share with us the exact error you are seeing? It would also help if you could share the contents of Counter.razor with us. Sorry, unfortunately, I am not able to make that error show again. Maybe there were other weird errors happening at the time. I'm sorry to bother you and Thanks for your help.
I'm glad things are working normally now. No need to apologize.
URL
https://dotnet.microsoft.com/zh-cn/learn/aspnet/blazor-tutorial/modify
Operating system
windows
More information about your system
No response
Description
Counter IncrementAmount="10" is wrong it should be Counter IncrementAmount=10
dotnet --info
No response