Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Index was outside the bounds of the array.

$
0
0

Dear Sir/Madam,

Iam developing a website in which I have added search form.When I click on search button its redirect to viewdetails form.But when iam clicking view details button,its showing index out of bound error.

Here is the code,

   

protectedvoidListView1_ItemCommand(objectsender,ListViewCommandEventArgse)

    {

       

if(e.CommandName =="view")

        {

            Response.Redirect(

"~/viewdetails.aspx?val="+ ListView1.DataKeyNames[e.Item.DataItemIndex].ToString());

        }

    }


Viewing all articles
Browse latest Browse all 2535

Trending Articles



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