Click here to Skip to main content
15,897,891 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear sir....

Here i've use link button for navigate and here am using two thinks first onclick event want to fire at the same time i want to navigate...

My prob is onclick event is not working while page redirect... my code is....

C#
protected void Hmenu_comp_Click(object sender, EventArgs e)
    {
        vmenu_home.Visible = false;
        vmenu_complaints.Visible = true;
        vmenu_invoice.Visible = false;
        vmenu_dc.Visible = false;
        Response.Redirect("ComplaintStatus.aspx",false);

    }



and asp code:

XML
<asp:Panel ID="vmenu_complaints" runat="server" CssClass="menu_div" Visible="false">
          <ul>
          <li id="Li1"><a href="#">complaints1</a></li>
          <li><a href="#">complaints1</a></li>
       <li><a href="#">complaints1</a></li>
          </ul></asp:Panel>



linkButton code:

<asp:LinkButton ID="Hmenu_home" runat="server" onclick="Hmenu_home_Click">Home



help me.....
Posted
Updated 12-Mar-14 1:14am
v4
Comments
AndrewCharlz 12-Mar-14 7:17am    
see prasanna when u redirect a page all the changes uve made will be changed and restored defaultt. that is why after redirect all the objects are visible.
can you describe the scenario why u need to do this kinda task.
prasanna.raj 12-Mar-14 8:25am    
Becoz i've Horizandal menu namely home if i click the home menu want to show home.aspx and same time want to show vertical menu in left side....
AndrewCharlz 12-Mar-14 8:28am    
use javascript for your task that will be good in this case
google how to hide and show a div using jquery or js
prasanna.raj 12-Mar-14 8:31am    
sure i ll try thanz for advice....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900