college_amy Posted July 18, 2005 Posted July 18, 2005 I have a user control that has a datagrid on it. From that datagrid I want the count of the rows - which I have. No problem... What I want to do is have that row count be displayed on the main page without having to set up a new stored procedure or datareader/grid on the main page. The datagrid is displayed on the main page (since it is a user control and all). How do I pass the values from a user control back into the main page????? Any help is appreciated. Thanks, Amy Quote
kahlua001 Posted July 18, 2005 Posted July 18, 2005 Set a Public Property of the user control, retrieve this from your main page. Quote
college_amy Posted July 18, 2005 Author Posted July 18, 2005 Can you provide an example... I tried that it it isn't working... So i must be doing something wrong... Quote
college_amy Posted July 18, 2005 Author Posted July 18, 2005 I would, however, I already deleted it and am trying other guesses... so what I originally put in to get the error won't be the same... I probably should mention... I am using a web tab from infragistics (headache alone) and the control is in the web tab and the tab is housed on the main page.... so referencing it is not fun... Quote
kahlua001 Posted July 18, 2005 Posted July 18, 2005 In your user control, have a property or a function like below Public Function GetCount() As Integer 'Bind datagrid Return myDatagrid.Items.Count End Function In your main page reference your control response.write(myControl.GetCount()) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.