Hi frnds,
Some time we need to edit our items inside repeater. for this condition we can call a function that is being called at item bind inside repeater. This function will be called on every item.
Lets go for one example.
Suppose we are getting Customer name with their mail ID but our requirement is to display only Name .
abc@gmail.com, xyz@gmail.com, dums@gmail.com
These are the customer information but we need to display only
abc, xyz, dums
so in this condition we can call a function that will give our need , but important point where we will call that
function
So here is the solution
<asp:Label runat="server" id="lblUser" text='<%# userName(Eval("EmailID"))%>' ></asp:Label>
here i am calling one function that's name is "userName()" and passing value EmailID .
This function will return wat we need
Thanks
Shailendra
Some time we need to edit our items inside repeater. for this condition we can call a function that is being called at item bind inside repeater. This function will be called on every item.
Lets go for one example.
Suppose we are getting Customer name with their mail ID but our requirement is to display only Name .
abc@gmail.com, xyz@gmail.com, dums@gmail.com
These are the customer information but we need to display only
abc, xyz, dums
so in this condition we can call a function that will give our need , but important point where we will call that
function
So here is the solution
<asp:Label runat="server" id="lblUser" text='<%# userName(Eval("EmailID"))%>' ></asp:Label>
here i am calling one function that's name is "userName()" and passing value EmailID .
This function will return wat we need
Thanks
Shailendra
No comments:
Post a Comment