I used hyperlinks in menu section in my asp.net application. I want to redirect user to the specific page based on the type of user. Here is the code I am using
<li>
<a id="store" href= "<%# (Session["Coupon"] == "Active") ? "url1.aspx": "url2.aspx" %>"></a>
</li>
If Session["Coupon"] == "Active" then user should redirect to "url1.aspx" else redirect to "url2.aspx".
Can anyone please help me how to give condition to hyperlink to get redirected?