How to correctly load a dynamic control c#

J

JC

Hi,

This is best-practise question, I am very keen to hear your thoughts.

I have a method that accepts a DataSet. The method then builds a table
structure using data from the Dataset. As the table builds I add
linkButtons to certain cells and associate them with an onClick event.

If I place a call to the method in the onLoad() or init() events
(which I know I have to in order to have viewstate) all is well
ASSUMING the dataset that populates my original method is available
but if not obviously the call to the method will fail.

I assume that I just do a check to see if the dataset is there, and
then call the method from the page_load() - but maybe I'm missing
something.

I would be glad of some input

Many thanks

James
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top