T
TT
Hello.
I'm working in asp.net and i need to disable the edit/delete
functionality from a frmview component.
help me.thang you!
my ACL sub:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim Content1 As ContentPlaceHolder =
Master.FindControl("ContentPlaceHolder1")
Dim Label1 As Label = Content1.FindControl("Label1")
Dim Control1 As Control
Dim Control2 As Control
For Each Control1 In Content1.Controls
If TypeOf Control1 Is FormView Then
'Label1.Text = Label1.Text & "<br/>" & CType(Control1,
FormView).DefaultMode
For Each Control2 In Control1.Controls
'If TypeOf Control2 Is LinkButton Then
'If CType(Control2, LinkButton).CommandName = "delete"
Then 'it's ok????
'CType(Control2, LinkButton).Enabled = False
'End If
'End If
Next
End If
Next
End Sub
i'm sorry,my english is poor!
I'm working in asp.net and i need to disable the edit/delete
functionality from a frmview component.
help me.thang you!
my ACL sub:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim Content1 As ContentPlaceHolder =
Master.FindControl("ContentPlaceHolder1")
Dim Label1 As Label = Content1.FindControl("Label1")
Dim Control1 As Control
Dim Control2 As Control
For Each Control1 In Content1.Controls
If TypeOf Control1 Is FormView Then
'Label1.Text = Label1.Text & "<br/>" & CType(Control1,
FormView).DefaultMode
For Each Control2 In Control1.Controls
'If TypeOf Control2 Is LinkButton Then
'If CType(Control2, LinkButton).CommandName = "delete"
Then 'it's ok????
'CType(Control2, LinkButton).Enabled = False
'End If
'End If
Next
End If
Next
End Sub
i'm sorry,my english is poor!