hi,
I am a beginner in asp.net. I am designing a page using details view control in asp.net using VB. The page is about inserting information and then sending it to the database. I want that the records shud be empty, nobody shud be able to view them, Only shud be able to insert information, but in the browser i can view one record. So kindly help me out.
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateInsertButton="true" HeaderText="REPORTING PROBLEM:" AutoGenerateRows="false" DataKeyNames="ID"
DataSourceID="AccessDataSource1" Height="50px" Width="125px">
<Fields>
<asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="True" ReadOnly="False"
SortExpression="ID" />
<asp:BoundField DataField="ProblemDescr" HeaderText="ProblemDescr" SortExpression="ProblemDescr" />
<asp:BoundField DataField="EquipmentDescr" HeaderText="EquipmentDescr" SortExpression="EquipmentDescr" />
<asp:BoundField DataField="Serial/EquipNumber" HeaderText="Serial/EquipNumber" SortExpression="Serial/EquipNumber" />
<asp:BoundField DataField="DateReported" HeaderText="DateReported" SortExpression="DateReported" />
<asp:BoundField DataField="PersonReporting" HeaderText="PersonReporting" SortExpression="PersonReporting" />
</Fields>
</asp:DetailsView>
</div>
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="C:\Documents and Settings\Harpreet Narula\My Documents\invivo.mdb"
EnableCaching="True"
SelectCommand="SELECT * FROM [MaintenanceReport]" InsertCommand="INSERT INTO [MaintenanceReport] ([ID], [ProblemDescr], [EquipmentDescr], [Serial/EquipNumber], [DateReported], [PersonReporting]) VALUES (?, ?, ?, ?, ?, ?)" UpdateCommand="UPDATE [MaintenanceReport] SET [ProblemDescr] = ?, [EquipmentDescr] = ?, [Serial/EquipNumber] = ?, [DateReported] = ?, [PersonReporting] = ? WHERE [ID] = ?">
<UpdateParameters>
<asp:Parameter Name="ProblemDescr" Type="String" />
<asp:Parameter Name="EquipmentDescr" Type="String" />
<asp:Parameter Name="column1" Type="String" />
<asp:Parameter Name="DateReported" Type="DateTime" />
<asp:Parameter Name="PersonReporting" Type="String" />
<asp:Parameter Name="ID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="ID" Type="Int32" />
<asp:Parameter Name="ProblemDescr" Type="String" />
<asp:Parameter Name="EquipmentDescr" Type="String" />
<asp:Parameter Name="column1" Type="String" />
<asp:Parameter Name="DateReported" Type="DateTime" />
<asp:Parameter Name="PersonReporting" Type="String" />
</InsertParameters>
</asp:AccessDataSource>