I have the dropdown list in the web page.When a value is selected from the drop down ,that value shud be sent to .ascx page and it shud populate the gridview and load that user control on web page.:mad:anybody plz help me.
Printable View
I have the dropdown list in the web page.When a value is selected from the drop down ,that value shud be sent to .ascx page and it shud populate the gridview and load that user control on web page.:mad:anybody plz help me.
Hi,
You can do that following steps below:
[LIST=1][*]Create a method in .ascx.cs file with input param as string[*]In this method populate grid by using input passed[*]From the main file on SelectedIndexChange event of drop down call function created in .ascx.cs file as [I]UserControlClassName.MethodName[/I]and pass the selected item as input param[/LIST]
I assume u r using C#.
Try this if u still have some problem then post ur problems.
---V V---
Vikas Vaidya
[I]Please mark this post as Thank if u found the answer useful[/I]
The solution above sounds good... Can we implement it using Event handler?
[QUOTE=vikasvaidya;30288]Hi,
You can do that following steps below:
[LIST=1][*]Create a method in .ascx.cs file with input param as string[*]In this method populate grid by using input passed[*]From the main file on SelectedIndexChange event of drop down call function created in .ascx.cs file as [I]UserControlClassName.MethodName[/I]and pass the selected item as input param[/LIST]
I assume u r using C#.
Try this if u still have some problem then post ur problems.
---V V---
Vikas Vaidya
[I]Please mark this post as Thank if u found the answer useful[/I][/QUOTE]
Yes i'm using c#.
Thanks lot its working for me.
[QUOTE=mrk_achary;30305]The solution above sounds good... Can we implement it using Event handler?[/QUOTE]
Yes of course, whatever is acted in response to an event that is basically a subroutine if u check it sharply. Whatever is acted upon an event can be called explicitly.
So, u can do that definitely.
---V V---
Vikas Vaidya