I'm getting a server error in .net 2.0

Discussion in '.NET' started by JMick, Jan 28, 2010.

  1. JMick

    JMick

    Joined:
    Jan 19, 2010
    Messages:
    2
    I'm new to programming in .Net 2.0. I'm getting an error and can't find anything wrong in my code. I've tried rewriting it from scratch but got the same error:
    Here is my code:
    Code:
    <table style="border-right: black thin solid; border-top: black thin solid; border-left: black thin solid; border-bottom: black thin solid;">
        <tr>
            <td>
            </td>
            <td style="text-align: center">
                <table>
                    <tr>
                        <td colspan="2" style="text-align: center; width: 407px;">Skapa skjutmatt</td>
                    </tr>
                    <tr>
    	                <td colspan="2" style="text-align: center; height: 26px; width: 407px;">
                            <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource1"
                                DataTextField="Skjutmatt" DataValueField="SkId" AutoPostBack="True" Width="400px">
                            </asp:DropDownList>&nbsp;</td>
                    </tr>
                    
                    <tr>
    	                <td colspan="2" style="text-align: center; width: 407px;">
                            &nbsp;<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="SqlDataSource1" Height="50px" Width="125px" AutoGenerateEditButton="True" DefaultMode="Insert" BorderColor="#999999" BackColor="White" BorderStyle="Solid" BorderWidth="1px" CellPadding="3" ForeColor="Black" GridLines="Vertical">
                                <Fields>
                                    <asp:BoundField DataField="Skjutmatt" HeaderText="Skjutmatt" SortExpression="Skjutmatt" />
                                    <asp:BoundField DataField="Serienr" HeaderText="Serienr" SortExpression="Serienr" />
                                    <asp:BoundField DataField="Upplosning" HeaderText="Upplosning" SortExpression="Upplosning" />
                                    <asp:BoundField DataField="Matprecision" HeaderText="Matprecision" SortExpression="Matprecision" />
                                    <asp:BoundField DataField="Matosakerhet" HeaderText="Matosakerhet"
                                        SortExpression="Matosakerhet" />
                                    <asp:CommandField ButtonType="Button" CancelText="Avbryt" InsertText="Inmatning"
                                        ShowInsertButton="True" />
                                    <asp:BoundField DataField="SkId" HeaderText="SkId" InsertVisible="False" ReadOnly="True"
                                        SortExpression="SkId" Visible="False" />
                                </Fields>
                                <FooterStyle BackColor="#CCCCCC" />
                                <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                                <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
                                <EditRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
                                <AlternatingRowStyle BackColor="#CCCCCC" />
                            </asp:DetailsView>
    	                </td>
                    </tr>
                </table>
                <asp:Label ID="Label1" runat="server" ForeColor="Red"></asp:Label></td>
        </tr>
    </table>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"
        SelectCommand="SELECT * FROM [Skjutm] WHERE [IsAktiv] " ConflictDetection="CompareAllValues" InsertCommand="INSERT INTO Skjutm([Skjutmatt], [Serienr], [Upplosning], [Matprecision], [Matosakerhet], [IsAktiv]) VALUES (@Skjutmatt, @Serienr, @Upplosning, @Matprecision, @Matosakerhet, True)">
    </asp:SqlDataSource>
    I can read from the table from another web page. (I added a post by hand into the access database.)
    JMick, Jan 28, 2010
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rod
    Replies:
    9
    Views:
    3,724
    Jim Cheshire [MSFT]
    Jul 26, 2004
  2. kuladeep.mohan@gmail.com
    Replies:
    5
    Views:
    79,905
    cpdarkman
    Aug 26, 2009
  3. juvi
    Replies:
    3
    Views:
    1,038
    Alexey Smirnov
    Jan 22, 2009
  4. sushmita kundu via .NET 247

    getting error :"Server Error in '/ReportServer' Application."

    sushmita kundu via .NET 247, Aug 7, 2004, in forum: ASP .Net Security
    Replies:
    0
    Views:
    358
    sushmita kundu via .NET 247
    Aug 7, 2004
  5. kuladeep.mohan@gmail.com
    Replies:
    0
    Views:
    701
    kuladeep.mohan@gmail.com
    Mar 24, 2006
Loading...

Share This Page