Results 1 to 5 of 5

Thread: GirdView in .ascx page(User Control)

  1. #1
    Junior Member
    Join Date
    Apr 2007
    Answers
    3

    GirdView in .ascx page(User Control)

    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.anybody plz help me.


  2. #2
    Contributing Member
    Join Date
    Jun 2007
    Answers
    65

    Re: GirdView in .ascx page(User Control)

    Hi,

    You can do that following steps below:
    1. Create a method in .ascx.cs file with input param as string
    2. In this method populate grid by using input passed
    3. From the main file on SelectedIndexChange event of drop down call function created in .ascx.cs file as UserControlClassName.MethodNameand pass the selected item as input param


    I assume u r using C#.

    Try this if u still have some problem then post ur problems.

    ---V V---
    Vikas Vaidya

    Please mark this post as Thank if u found the answer useful


  3. #3
    Junior Member
    Join Date
    Dec 2005
    Answers
    1

    Re: GirdView in .ascx page(User Control)

    The solution above sounds good... Can we implement it using Event handler?


  4. #4
    Junior Member
    Join Date
    Apr 2007
    Answers
    3

    Re: GirdView in .ascx page(User Control)

    Quote Originally Posted by vikasvaidya View Post
    Hi,

    You can do that following steps below:
    1. Create a method in .ascx.cs file with input param as string
    2. In this method populate grid by using input passed
    3. From the main file on SelectedIndexChange event of drop down call function created in .ascx.cs file as UserControlClassName.MethodNameand pass the selected item as input param


    I assume u r using C#.

    Try this if u still have some problem then post ur problems.

    ---V V---
    Vikas Vaidya

    Please mark this post as Thank if u found the answer useful
    Yes i'm using c#.
    Thanks lot its working for me.


  5. #5
    Contributing Member
    Join Date
    Jun 2007
    Answers
    65

    Re: GirdView in .ascx page(User Control)

    Quote Originally Posted by mrk_achary View Post
    The solution above sounds good... Can we implement it using Event handler?
    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


  6.  Sponsored Ads
    Ad


     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact