Jun 22, 2020 05:16 AMfirstname.lastname@example.org|LINK
I want to assign the href link inside the code behind. In order to achieve this. I tried few things like so:
In aspx page:
<a href="#" runat="server" id="Test" onServerClick="MyFuncion_Click">Test1</a>
In .cs page, I have this. when I click on test link, nothing happens:
protected void MyFuncion_Click(object sender, System.EventArgs e)
Test.Attributes["href"] = "http://www.yahoo.com";
I want to assign the link only in code behind and define the href in aspx page.
any help will be greatly appreciated.