Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 16th, 2014, 03:15 AM
Registered User
 
Join Date: May 2014
Posts: 8
Thanks: 4
Thanked 0 Times in 0 Posts
Post Unable to Insert Image

hi there,

why i am not able to insert image into the picture table browser says connection was reset.

Code:
<%@ Page Title="New PhotoAlbum" Language="C#" MasterPageFile="~/MasterPages/Frontend.master" AutoEventWireup="true"
    CodeFile="NewPhotoAlbum.aspx.cs" Inherits="NewPhotoAlbim" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" runat="Server">
    <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="309px" DataSourceID="EntityDataSource1"
        DefaultMode="Insert" AutoGenerateRows="False" DataKeyNames="Id">
       
        <Fields>
            <asp:BoundField DataField="Id" HeaderText="Id" ReadOnly="True" 
                SortExpression="Id"  InsertVisible="false"/>
            <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
            <asp:CommandField ShowInsertButton="True" />
        </Fields>
    </asp:DetailsView>
    <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=PlanetWrox2Entities"
        DefaultContainerName="PlanetWrox2Entities" EnableFlattening="False" EnableInsert="True"
        EntitySetName="PhotoAlbums" oninserted="EntityDataSource1_Inserted">
    </asp:EntityDataSource>
    <br />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cpClientScript" runat="Server">
</asp:Content>
 
Old June 16th, 2014, 06:44 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

I don't see any reference to pictures from this code, so it's impossible to tell what's going on.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to load image ag201 XSLT 0 April 20th, 2010 11:07 PM
unable to insert comment thuyvncr BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 June 4th, 2007 11:57 PM
unable to insert records into database everest Classic ASP Databases 11 March 22nd, 2004 02:28 PM
unable to insert records into access DB bn_sree Access ASP 0 October 8th, 2003 08:38 AM
Unable to INSERT INTO db nvillare Classic ASP Databases 6 August 26th, 2003 10:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.