M
mbailey
Hello-
I am failry new to asp.net but have been coding in general for a while.
I have a datalist whos templates are built on the fly.
In the Page_Init sub, based on a certain value, certain external
controls are assigned as the ItemTemplate and the EditTemplate.
1)If I only assign these templates if its not a post back, the datalist
is blank when I click on the edit button in the datalist.
2) If I let the page_init assign these templates everytime there is a
postback, the edit datalist renders correctly (a few drop downs and a
textbox).
But when I click my update button, I then try to a FindControl on my
datalist with a control I know is in the edit template but it gives me
this error:"Object reference not set to an instance of an object. "
Has anyone come across this?
Thanks in advanced!
MB
I am failry new to asp.net but have been coding in general for a while.
I have a datalist whos templates are built on the fly.
In the Page_Init sub, based on a certain value, certain external
controls are assigned as the ItemTemplate and the EditTemplate.
1)If I only assign these templates if its not a post back, the datalist
is blank when I click on the edit button in the datalist.
2) If I let the page_init assign these templates everytime there is a
postback, the edit datalist renders correctly (a few drop downs and a
textbox).
But when I click my update button, I then try to a FindControl on my
datalist with a control I know is in the edit template but it gives me
this error:"Object reference not set to an instance of an object. "
Has anyone come across this?
Thanks in advanced!
MB