Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
username feeback reply


when i click on reply button i have to display username in the label
Posted
Comments
Syed Salman Raza Zaidi 6-Apr-12 6:59am    
Is this your question or requirement?????
ZurdoDev 6-Apr-12 7:57am    
What is the question?
Reza Ahmadi 6-Apr-12 8:19am    
Add some of your code here and explain your question more
Sandeep Mewara 24-Apr-12 11:38am    
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.

1 solution

void Item_Command(Object sender, DataListCommandEventArgs e)
{
if(e.commnandname=="Reply")
{
Label lblUserName= e.Item.FindControl("lblUserName");
lblUserName.Text= Convert.ToString(e.CommandArgument);
}
}

<asp:datalist id="ItemsList" runat="server" onitemcommand="Item_Command" xmlns:asp="#unknown">
        <itemtemplate>
            <asp:linkbutton id="SelectButton" text="Reply">
                 CommandName="Reply" runat="Reply" CommandArgument='<%# Eval("Username") %>' />  
        </asp:linkbutton></itemtemplate>
 </asp:datalist>
 
Share this answer
 

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