473,473 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Disable edit/delete from formview in asp.net

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!
Jan 3 '07 #1
0 1486

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: P. Yanzick | last post by:
Hello, I am creating an edit template for a FormView control, changing one of the textboxes to a dropdown box. The dropdown will be populated from a simple table with the primary key, and a...
4
by: drakuu | last post by:
Hello there, I have DataGrid with some records and I would like to edit it right in the datagrid using the built in commands. I can't figure out a way to pass to the SQL query the record ID...
7
by: Lorenzino | last post by:
Hi, I have a problem with bindings in a formview. I have a formview; in the insert template i've created a wizard control and inside it i have an HTML table with some textboxes bound to the...
2
by: WebBuilder451 | last post by:
I'm working through an example of a formview cortrol. I have bound the control to edit, update, insert, delete stored procs. I have a grid view with a button on it that sets the formview to a...
1
by: rodchar | last post by:
hey all, if i want the user to only be able to add one record on the formview what's the best way to do this? they can edit current record but not add more than one. they can also delete that one...
1
by: Chris | last post by:
I have a treeview control, which I use to select a row in a table which will be used to populate a formview. Depending on what node is selected in the treeview I want the formview to be either in...
1
by: SteveT | last post by:
Before I pull out what little hair I have left, I'm swallowing my pride and asking the Oracles of .Net: I'm trying to set a property in a dropdown list control in a FormView, based on a session...
1
by: shapper | last post by:
Hello, I have a GridView where each row has an EDIT and a DELETE buttons. I also have a FormView with TextBoxes, DropDownLists, etc. When an EDIT button is pressed I make the...
1
by: mans | last post by:
Hello, I want to enable the edit template in a FormView from program. How can I do this? The FormView bound to a table and I don't want that it do the edit/add/delete but I control when it...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.