Posted By

cardiffblogger on 01/05/10


Tagged

repeater nesting ObjectDataSource


Versions (?)

Set DefaultValue of ObjectDataSource parameter from within a child nested repeater


 / Published in: C#
 

  1. if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
  2. {
  3. ObjectDataSource ObjectDataSource2 = (ObjectDataSource) e.Item.FindControl("ObjectDataSource2");
  4. ObjectDataSource2.SelectParameters["XXXXXX"].DefaultValue = DataBinder.Eval(e.Item.DataItem, "XXXXXXXX").ToString();
  5. }

Report this snippet  

You need to login to post a comment.