Solved

check to see if datagrid exists in asp.net

Posted on 2006-11-08
2
186 Views
Last Modified: 2012-06-27
Hello,

 I want to group similar functions in a include file and I setting visible of certain controls and binding certain controls. How to check to see that if the control exists in page then bind the control so that the function is generic and can be included in all pages.

thanks,
0
Comment
Question by:tamilgirl77
2 Comments
 
LVL 4

Accepted Solution

by:
darkpriest earned 500 total points
ID: 17903839
Not really sure what your exactly trying to achieve but this is how to find a Control and use it so its accessible.

               Dim gridView1 As New GridView
            gridView1 = CType(Page.FindControl("addressBook"), GridView)


0
 

Author Comment

by:tamilgirl77
ID: 17906329
Thanks for your reply. What I want to check is:

 if dg_Records exists then
    get records from table


If I have multiple functions in a include file and I don't have the dg_Records in the page I am calling this include file it is giving error as "are you missing a class or namespace, dg_Records does not exist"

Thanks
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question