Using HyperLink to pass values based on code behind variables
Posted on 2010-11-23
I have a hyperlink that links to the same page itself.
<asp:HyperLink ID="hyprNextMonth" runat="server" NavigateUrl="~/Calendar.aspx?M=" + <%=theCalendarDate.AddMonths(-1) %> ImageUrl="images/arrow_right.gif"/>
I'm trying to pass the next month int in the NavigateUrl but can't get the code right.
Is there a better way of posting back to the same form as in PostBackURL or viewstate if so please show me how.