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:DetailsVie w ID="DetailsView 1" runat="server" AutoGenerateIns ertButton="true " HeaderText="REP ORTING PROBLEM:" AutoGenerateRow s="false" DataKeyNames="I D"
DataSourceID="A ccessDataSource 1" Height="50px" Width="125px">
<Fields>
<asp:BoundFie ld DataField="ID" HeaderText="ID" InsertVisible=" True" ReadOnly="False "
SortExpression= "ID" />
<asp:BoundFie ld DataField="Prob lemDescr" HeaderText="Pro blemDescr" SortExpression= "ProblemDes cr" />
<asp:BoundFie ld DataField="Equi pmentDescr" HeaderText="Equ ipmentDescr" SortExpression= "EquipmentDescr " />
<asp:BoundFie ld DataField="Seri al/EquipNumber" HeaderText="Ser ial/EquipNumber" SortExpression= "Serial/EquipNumber" />
<asp:BoundFie ld DataField="Date Reported" HeaderText="Dat eReported" SortExpression= "DateReport ed" />
<asp:BoundFie ld DataField="Pers onReporting" HeaderText="Per sonReporting" SortExpression= "PersonReportin g" />
</Fields>
</asp:DetailsView >
</div>
<asp:AccessData Source ID="AccessDataS ource1" runat="server" DataFile="C:\Do cuments and Settings\Harpre et Narula\My Documents\inviv o.mdb"
EnableCaching=" True"
SelectCommand=" SELECT * FROM [MaintenanceRepo rt]" InsertCommand=" INSERT INTO [MaintenanceRepo rt] ([ID], [ProblemDescr], [EquipmentDescr], [Serial/EquipNumber], [DateReported], [PersonReporting]) VALUES (?, ?, ?, ?, ?, ?)" UpdateCommand=" UPDATE [MaintenanceRepo rt] SET [ProblemDescr] = ?, [EquipmentDescr] = ?, [Serial/EquipNumber] = ?, [DateReported] = ?, [PersonReporting] = ? WHERE [ID] = ?">
<UpdateParamete rs>
<asp:Paramete r Name="ProblemDe scr" Type="String" />
<asp:Paramete r Name="Equipment Descr" Type="String" />
<asp:Paramete r Name="column1" Type="String" />
<asp:Paramete r Name="DateRepor ted" Type="DateTime" />
<asp:Paramete r Name="PersonRep orting" Type="String" />
<asp:Paramete r Name="ID" Type="Int32" />
</UpdateParameter s>
<InsertParamete rs>
<asp:Paramete r Name="ID" Type="Int32" />
<asp:Paramete r Name="ProblemDe scr" Type="String" />
<asp:Paramete r Name="Equipment Descr" Type="String" />
<asp:Paramete r Name="column1" Type="String" />
<asp:Paramete r Name="DateRepor ted" Type="DateTime" />
<asp:Paramete r Name="PersonRep orting" Type="String" />
</InsertParameter s>
</asp:AccessDataS ource>
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:DetailsVie w ID="DetailsView 1" runat="server" AutoGenerateIns ertButton="true " HeaderText="REP ORTING PROBLEM:" AutoGenerateRow s="false" DataKeyNames="I D"
DataSourceID="A ccessDataSource 1" Height="50px" Width="125px">
<Fields>
<asp:BoundFie ld DataField="ID" HeaderText="ID" InsertVisible=" True" ReadOnly="False "
SortExpression= "ID" />
<asp:BoundFie ld DataField="Prob lemDescr" HeaderText="Pro blemDescr" SortExpression= "ProblemDes cr" />
<asp:BoundFie ld DataField="Equi pmentDescr" HeaderText="Equ ipmentDescr" SortExpression= "EquipmentDescr " />
<asp:BoundFie ld DataField="Seri al/EquipNumber" HeaderText="Ser ial/EquipNumber" SortExpression= "Serial/EquipNumber" />
<asp:BoundFie ld DataField="Date Reported" HeaderText="Dat eReported" SortExpression= "DateReport ed" />
<asp:BoundFie ld DataField="Pers onReporting" HeaderText="Per sonReporting" SortExpression= "PersonReportin g" />
</Fields>
</asp:DetailsView >
</div>
<asp:AccessData Source ID="AccessDataS ource1" runat="server" DataFile="C:\Do cuments and Settings\Harpre et Narula\My Documents\inviv o.mdb"
EnableCaching=" True"
SelectCommand=" SELECT * FROM [MaintenanceRepo rt]" InsertCommand=" INSERT INTO [MaintenanceRepo rt] ([ID], [ProblemDescr], [EquipmentDescr], [Serial/EquipNumber], [DateReported], [PersonReporting]) VALUES (?, ?, ?, ?, ?, ?)" UpdateCommand=" UPDATE [MaintenanceRepo rt] SET [ProblemDescr] = ?, [EquipmentDescr] = ?, [Serial/EquipNumber] = ?, [DateReported] = ?, [PersonReporting] = ? WHERE [ID] = ?">
<UpdateParamete rs>
<asp:Paramete r Name="ProblemDe scr" Type="String" />
<asp:Paramete r Name="Equipment Descr" Type="String" />
<asp:Paramete r Name="column1" Type="String" />
<asp:Paramete r Name="DateRepor ted" Type="DateTime" />
<asp:Paramete r Name="PersonRep orting" Type="String" />
<asp:Paramete r Name="ID" Type="Int32" />
</UpdateParameter s>
<InsertParamete rs>
<asp:Paramete r Name="ID" Type="Int32" />
<asp:Paramete r Name="ProblemDe scr" Type="String" />
<asp:Paramete r Name="Equipment Descr" Type="String" />
<asp:Paramete r Name="column1" Type="String" />
<asp:Paramete r Name="DateRepor ted" Type="DateTime" />
<asp:Paramete r Name="PersonRep orting" Type="String" />
</InsertParameter s>
</asp:AccessDataS ource>