Hilighting div tag in Masterpage on redirection to content page
Posted
by
user1713632
on Stack Overflow
See other posts from Stack Overflow
or by user1713632
Published on 2012-10-02T06:30:10Z
Indexed on
2012/10/02
9:37 UTC
Read the original article
Hit count: 91
I have a link in Master page within a div tag. I want to highlight the div when I am clicking the link, in order to redirect to some content page. I have written the following code:
<li>
<div id="div_test" runat="server">
<asp:LinkButton ID="lnk_test_menu" Font-Underline="false"
ForeColor="Black" runat="server" Text="Test Link"
CausesValidation="false" onclick="lnk_test_menu_Click1" >
</asp:LinkButton></div>
</li>
Code in the cs page:
protected void lnk_test_menu_Click1(object sender, EventArgs e)
{
div_test.Attributes.Add("class", "testSelected");
Response.Redirect(Test.aspx");
}
The div in the master page is not being selected on redirection. Could anybody help me on this?
© Stack Overflow or respective owner