if e.RowIndex<>-1 then

your code here

end if



On Wed, Nov 12, 2008 at 5:17 PM, Glenn <[EMAIL PROTECTED]> wrote:

> Have you checked the value of e.RowIndex to see what it is?
>
> ...Glenn
>
> On Wed, Nov 12, 2008 at 3:43 AM, nag <[EMAIL PROTECTED]> wrote:
>
>>
>> Index was out of range. Must be non-negative and less than the size of
>> the collection.
>> Parameter name: index
>>
>>
>> Line 38:     Protected Sub GridView1_RowDeleting(ByVal sender As
>> Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs)
>> Handles GridView1.RowDeleting
>> Line 39:         e.Cancel = True
>> Line 40:         Dim fileName As String = (CType(GridView1.Rows
>> (e.RowIndex).FindControl("FileLink"), HyperLink)).Text
>> Line 41:
>> Line 42:         fileName = Path.Combine(Server.MapPath("/
>> fileupload"), fileName)
>>
>


-- 
Muhammad Arif
Software Engineer
+923009347315

Reply via email to