.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

In my listview LVPayments_ItemDataBound event,from here i want to get the item index of label contro

Posted By: sheeba     Posted Date: June 02, 2010    Points:2   Category :C#
Hi Friends


In my In my listview LVPayments_ItemDataBound event,from here i want to get the item index of label control...In repeater control we have a option itemindex..but listview hw can i get?following coding for sample:this is repeater control itemdatabound event(RepeaterPaymentsList_ItemDataBound) ..the same coding i need it in listview databound control....

if (e.Item.FindControl("LabelNumber") != null)
{
System.Web.UI.WebControls.Label label = (System.Web.UI.WebControls.Label)e.Item.FindControl("LabelNumber");
if (Session["admind.paymentshistory.list.page_number"] != null)
{
int i1 = System.Convert.ToInt32(Session["admin.paymentshistory.list.page_number"]);
int i2 = System.Convert.ToInt32(Session["admin.paymentshistory.list.row_count"]);
int i3 = e.Item.itemindex + 1 + (i1 * i2);
label.Text = i3.ToString();
return;
}
int i4 = e.Item.itemindex + 1;
label.Text = i4.ToString();

Responses

No response found. Be the first to respond this post
Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend