Solved

check to see if datagrid exists in asp.net

Posted on 2006-11-08
2
165 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now