Solved

check to see if datagrid exists in asp.net

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

737 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