tags:

views:

96

answers:

3

hi guys, I have textboxes which is placed inside accordian (ajax control).In pageload event i have written the code to load values in textboxes. But onload event one error is coming as object not set to instance of a object. Values are not coming in textboxes. Then i tried to initialize controls in textboxes .Then the error cleared. But Values are not coming in textboxes. What may be the reason for this?

A: 

Have you set the properties of the Accordian properly?

If yes, check the values which you are assigning to the textbox. If they are blank, the values won't be visible.

Try giving a hardcoded value to your textbox and check if it appears or not -

textboxObject.Text = "Hello World!";
Kirtan
i have tried this.But error is coming as object not set to instance of an object .What property i have to set in accordian.
A: 

At a guess, as the Textbox is a child control of the accordian you possible have to use the AccordianObject.FindControl() method to find your textbox.

More information or posting some code would help, otherwise we are just going to be taking stabs in the dark.

DaRKoN_
A: 

please post your code to help you more,

but as DarKon suggested it will do.

in addition you can create a property or use, session, viewstate to populate your Textbox.

hope this helps,