?
Solved

check to see if datagrid exists in asp.net

Posted on 2006-11-08
2
Medium Priority
?
212 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
darkpriest earned 2000 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

762 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