Disable edit/delete from formview in asp.net

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top