Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello sir i response redirect use in repeater item command
i want to do right click on mouse then response redirect in new tab
C#
protected void dlcategory_ItemCommand(object source, DataListCommandEventArgs e)
{
    if (e.CommandName == "category")
    {
        LinkButton LinkButton1=(LinkButton)e.Item.FindControl("LinkButton1");

        Response.Redirect("~/subcategory.aspx?subcat=" + e.CommandArgument + "");
    }
}
Posted
Updated 7-Dec-15 22:36pm
v2
Comments
F-ES Sitecore 8-Dec-15 4:33am    
Rather than using a link button just use a normal asp:Hyperlink with a target url of

"~/subcategory.aspx?subcat=" + yourCategoryId

That will render a normal link people can right-click on.
[no name] 8-Dec-15 4:47am    
yes it's right thanks sir
Sinisa Hajnal 8-Dec-15 6:29am    
And you can still style it so it looks like a button
Anisuzzaman Sumon 9-Dec-15 4:57am    
Please mark this as solved

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