In this .aspx file I am getting a warning saying "Unterminated string constant". I've looked into the error and found that it means there is an open single or double quote somewhere. However, I do not have an open single or double quote, but it is still throwing the warning. Why?
The warning underlines the bolded portion below. Notice the bolded single quote at the end.
<input type="button" name="buttonCancel" class="btn btn-warning btn-sm" value="Cancel" onclick="window.location='pagename.aspx?aid=<%=VariableName%>'">
Yeah pretty painful. I think it has to do with parsing priority.
Here's another way to write it that won't throw the error.
<input type="button" onclick="<%="window.location=PageName.aspx?aid=" + VariableName%>"/>
- Same function for independent element
- How to select context words/characters surrounding an <a> tag using BeautifulSoup?
- Compression/Decompression string with C#
- Can I enable the “Function doesn't return a value on all code paths” warning for “Value Type” functions?
- how to make an image responsive?
- Web scraping sith VBA - Erly Binding VS Late Binding of HTMLDocument Object
- EF Core add-migration Build Failed
- How to escape forwardslash character in HTML but have it passed correctly to Java web app?