I tried to use below code in asp.net but there is error in html tags like and and say it could not find begin tag. but begin tag is in first if. the errors are in between line 44 to 52.
The markup in an if must have balanced and matching tags. So
@If (true){
<div>
}
is not legal markup. You need to restructure your ifs so the markup is balanced inside. Also a <tr> with a parent table is invalid. You just need break it into the zero case and the one case.
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
None
0 Points
1 Post
Problem for using Asp.net c# and html mixing code
May 02, 2020 11:08 PM|mehdi4467|LINK
I tried to use below code in asp.net but there is error in html tags like and and say it could not find begin tag. but begin tag is in first if. the errors are in between line 44 to 52.
All-Star
58484 Points
15809 Posts
Re: Problem for using Asp.net c# and html mixing code
May 03, 2020 12:03 AM|bruce (sqlwork.com)|LINK
The markup in an if must have balanced and matching tags. So
@If (true){
<div>
}
is not legal markup. You need to restructure your ifs so the markup is balanced inside. Also a <tr> with a parent table is invalid. You just need break it into the zero case and the one case.
Contributor
2720 Points
874 Posts
Re: Problem for using Asp.net c# and html mixing code
May 05, 2020 02:26 AM|Rena Ni|LINK
Hi mehdi4467,
It seems you want to add a `cancel` button when j=1 but j!=0.If so,I suggest that you could change like below:
Best Regards,
Rena