<div visible="false" runat="server"><a href='<%#string.Format("{0}removeAllItems=true", this.Page)%>' onclick="return confirm('Are you sure you want to remove all items?')">Remove all items</a></div>
when I run this, it doesn’t show the querystring portion, just the page.aspx. I don’t see why the rest of that string after {0} is being cut off.
The problem with the question mark probably has something to do with using data binding (
<%#...%>) instead of simple output (<%=...%>).String.Format is overkill, as you only want to concatenate two strings:
Or simply putting the second string in the markup: