hi
I have this unique problem that after i execute this code: it would automatically redirect to the login page which i do not want.
But before i place the delete directory code it was working fine, no redirection, just like a normal delete row operation you would see in page with radgrid. What is causing the redirection after delete? It is strange.
I have also set to automatic delete to true.
<telerik:GridButtonColumn CommandName="Delete" HeaderText="Delete"
Text="Delete" UniqueName="column1" ConfirmText="Are you sure?"
ConfirmTitle="Confirm">
</telerik:GridButtonColumn>
Protected Sub RadGrid1_DeleteCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.DeleteCommand
Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
Dim str As String = item("Document_ID").Text
Dim filepath As String = item("Document_Path").Text.Substring(5, 40)
Directory.Delete(Server.MapPath(filepath), True)
End Sub
I have this unique problem that after i execute this code: it would automatically redirect to the login page which i do not want.
But before i place the delete directory code it was working fine, no redirection, just like a normal delete row operation you would see in page with radgrid. What is causing the redirection after delete? It is strange.
I have also set to automatic delete to true.
<telerik:GridButtonColumn CommandName="Delete" HeaderText="Delete"
Text="Delete" UniqueName="column1" ConfirmText="Are you sure?"
ConfirmTitle="Confirm">
</telerik:GridButtonColumn>
Protected Sub RadGrid1_DeleteCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.DeleteCommand
Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
Dim str As String = item("Document_ID").Text
Dim filepath As String = item("Document_Path").Text.Substring(5, 40)
Directory.Delete(Server.MapPath(filepath), True)
End Sub