can anyone tell me why this is not working
below is my code:
OnItemCommand="Repeater1_ItemCommand">
| ||||||||||
codebehind:
protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
{
if (e.CommandName == "Like")
{
foreach (RepeaterItem item in Repeater1.Items)
{
}
}
else if (e.CommandName == "Comment")
{
foreach (RepeaterItem item in Repeater1.Items)
{
Button btn = item.FindControl("btnComment") as Button;
btn.PostBackUrl = "Comment.aspx";
}
}
else if (e.CommandName == "Share")
{
}
}
4 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Bhabani prasad DashPosted Jun 26, 2013, 4:43 AM
Iftikar HussainPosted Jun 26, 2013, 4:37 AM
and in the Comment button modify like below
Regards,
Iftikar
Remember to click "Mark as Answer" on the post, if it helps you.
Kavita PhardePosted Jun 26, 2013, 4:29 AM
so can u tell me how to do this
Iftikar HussainPosted Jun 26, 2013, 3:55 AM
Since you just want to redirect to another page after clicking Comment button. then it is better to do in Client side only. Please refer below code
Please let me know if you need more information.
Regards,
Iftikar
Remember to click "Mark as Answer" on the post, if it helps you.