PC Review


Reply
Thread Tools Rate Thread

AJAX TOOLKIT : Accordion (can't access controls)

 
 
googlegroup@desiboy.com
Guest
Posts: n/a
 
      26th Jan 2007
I have master pages , with MyAccordion and 2 panes.
I can veiw the controls within MyAccordion on pageLoad


Output of controls:

MyAccordion_AccordionExtender
AccordionPane1
AccordionPane2

However, with the code below, it fails

Try
Dim frm As Control =
Page.Master.FindControl("Main").FindControl("form1").FindControl("MyAccordion")
Dim acc As Control
acc = DirectCast(frm.FindControl("AccordionPane1"),
AjaxControlToolkit.AccordionPane)

Dim str As String = ""
Dim ctl As Control
For Each ctl In acc.Controls

str = str & ctl.ID.ToString & "<br>"

Next
Return str
Catch ex As Exception
Return ex.Message
End Try


Output : Object reference not set to an instance of an object.


How do you gain access to the controls (in my case radiobuttons) that
belong within the two panes in MyAccordion on PageLoad ?

 
Reply With Quote
 
 
 
 
MasterGaurav \(www.edujini-labs.com\)
Guest
Posts: n/a
 
      30th Jan 2007
> Dim frm As Control =
> Page.Master.FindControl("Main").FindControl("form1").FindControl("MyAccordion")


> Output : Object reference not set to an instance of an object.


Have you checked out which line is causing this exception?

IMHO, it should have been Page.FindControl("form1")
btw, what is "Main" control?


--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Accordion and Gridview in AJAX Control Toolkit Gregory A. Beamer Microsoft ASP .NET 0 29th Oct 2009 06:25 PM
Re: Accordion and Gridview in AJAX Control Toolkit Scott M. Microsoft ASP .NET 0 29th Oct 2009 03:07 PM
Accordion (Ajax Control Toolkit relelase 20820) problem after migration to .Net 3.5 Tomasz J Microsoft ASP .NET 9 30th Dec 2008 09:42 AM
ajax accordion control broken in ajax 1.0 Andy B Microsoft ASP .NET 0 28th Nov 2007 06:49 PM
Databound AjaxControlToolKit Accordion Control: How to access Controls anjali.lourda@gmail.com Microsoft ASP .NET 1 20th Jul 2007 09:33 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:03 AM.