Quantcast
Channel: DataSource Controls - SqlDataSource, ObjectDataSource, etc.
Viewing all articles
Browse latest Browse all 956

ListView and Edit/Update command

$
0
0

Hi,

I have a ListView and I want to implement the insert and update functionality.
Insert works great! But the update procedure doesn't work because in the update procedure I cannot access my controls:

        protected void btn_Update_Click(object sender, EventArgs evt)
        {
            String typ = ((DropDownList)lvw_Zuordnung.EditItem.FindControl("lst_Typ")).SelectedValue;

            ---> NullReferenceException
        }

The same works great in the insert scenario (with ListView.InsertItem),

What can I do?

Thank you very much
Magnus


Viewing all articles
Browse latest Browse all 956

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>