Wednesday, August 11, 2010

Plz..Plz I need a quick answer for this question about Gridview control...it is very easy?

I have a gridview control and inside it's template content there is a label .


this label is databinded to a specific text from the database let's say comment text.





How can I change some words in this comment before it is displayed ....may be from an event or somewhere else?





There is no need for sourcecode it is very simple issue and many developers (not me) do it in there web apps.Plz..Plz I need a quick answer for this question about Gridview control...it is very easy?
Look at hooking into the RowDatabound event. This will allow you to affect the contents of the label programatically before it is displayed...





You can also call a method on the page such as:





%26lt;asp:label id=';lblMyText'; runat=';server'; Text='%26lt;%# GetLabelText() %%26gt;' /%26gt;

No comments:

Post a Comment