I'm trying to fire the Click event of the linkbutton placed inside a datalist,and i'm using the following code
ASPX Page
<asp:LinkButton ID="LinkButton1" runat="server" Font-Names="Bertham" Font-Size="X-Large"
Font-Underline="False" CommandName = "answer">"<%#Eval ("Question") %>"</asp:LinkButton>
Code Behind Page
protected void DataList1_ItemCommand(object source,System.Web.UI.WebControls.DataListCommandEventArgs e)
{
if (e.CommandName == "answer")
{
Response.Write("<script language = 'javascript'>alert('U Clicked The Linkbutton'</script>)");
Response.Write("Hello");
//Response.Write("Hello");
}
}
but its not working....
Can Anyone help me. I think this is a big problem 2 many. Which I found on net while trying to sought out the problem by myself.
Thanks In Advance....