Passing parameter from one user control to another user control in an aspx page.
-
Hi I have two user controls on one aspx page. UC1 has a grid which contains a link button column which user clicks. Based on the value of clicked cell, I need to show some data into UC2. 1. How do I pass data from UC1 to UC2? 2. How do I invoke a function of UC2 from UC1? Please advise. Thanks AJ
Follow your goals, Means will follow you ---Gandhi---
-
Hi I have two user controls on one aspx page. UC1 has a grid which contains a link button column which user clicks. Based on the value of clicked cell, I need to show some data into UC2. 1. How do I pass data from UC1 to UC2? 2. How do I invoke a function of UC2 from UC1? Please advise. Thanks AJ
Follow your goals, Means will follow you ---Gandhi---
mittalpa wrote:
1. How do I pass data from UC1 to UC2?
You can make use of Session or Delegates here.
mittalpa wrote:
2. How do I invoke a function of UC2 from UC1?
If it is a method needed by both the user controls, place it in a separate class and have it public/internal. Then call it from both the user controls.