Click here to Skip to main content
15,887,416 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: How to Store SWF files to SQL Server 2005 from C# WinForm Application and retrieve it and display in ASP.NET Web Page Pin
Colin Angus Mackay10-Apr-09 5:48
Colin Angus Mackay10-Apr-09 5:48 
QuestionExport a sheet of excel to a table Sql-Server Pin
Sandraa10-Apr-09 4:57
Sandraa10-Apr-09 4:57 
QuestionWhy Dim hpl As HyperLink = CType(acc.FindControl("hpl"), HyperLink) didn't find my control inAccordion? Pin
Saba0210-Apr-09 4:03
Saba0210-Apr-09 4:03 
AnswerRe: Why Dim hpl As HyperLink = CType(acc.FindControl("hpl"), HyperLink) didn't find my control inAccordion? Pin
Zia Ul Haq Soofi10-Apr-09 18:52
Zia Ul Haq Soofi10-Apr-09 18:52 
GeneralRe: Why Dim hpl As HyperLink = CType(acc.FindControl("hpl"), HyperLink) didn't find my control inAccordion? Pin
Saba0210-Apr-09 22:33
Saba0210-Apr-09 22:33 
GeneralRe: Why Dim hpl As HyperLink = CType(acc.FindControl("hpl"), HyperLink) didn't find my control inAccordion? Pin
Zia Ul Haq Soofi11-Apr-09 0:31
Zia Ul Haq Soofi11-Apr-09 0:31 
QuestionProblem...Problem.....???? Pin
ven32110-Apr-09 4:01
ven32110-Apr-09 4:01 
QuestionC# gridview edit/delete not working Pin
Janus32110-Apr-09 3:37
Janus32110-Apr-09 3:37 
I am a newbie at C#. Following code was generated mostly by the tool Visual Web Developer 2005 (with SQL Server 2008 express edition). It actually worked but now neither update nor delete work properly. There is no error message too. The database is very simple with a simple database table called 'Product'.

Any obvious gotchas - I have spent too much time on this already.

Thanks.

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
&nbsp;&nbsp;
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" DataKeyNames="ProductId" DataSourceID="ObjectDataSource1">
<Columns>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
<asp:BoundField DataField="ProductId" HeaderText="ProductId" InsertVisible="False"
ReadOnly="True" SortExpression="ProductId" />
<asp:BoundField DataField="ProductDescription" HeaderText="ProductDescription" SortExpression="ProductDescription" />
<asp:BoundField DataField="ProductFamilyId" HeaderText="ProductFamilyId" SortExpression="ProductFamilyId" />
<asp:BoundField DataField="UnitPrice" HeaderText="UnitPrice" SortExpression="UnitPrice" />
<asp:BoundField DataField="StartDate" HeaderText="StartDate" SortExpression="StartDate" />
<asp:BoundField DataField="ExpirationDate" HeaderText="ExpirationDate" SortExpression="ExpirationDate" />
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"
InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetData"
TypeName="ServiceDataSetTableAdapters.ProductTableAdapter" UpdateMethod="Update">
<DeleteParameters>
<asp:Parameter Name="Original_ProductId" Type="Int32" />
<asp:Parameter Name="Original_ProductDescription" Type="String" />
<asp:Parameter Name="Original_ProductFamilyId" Type="Decimal" />
<asp:Parameter Name="Original_UnitPrice" Type="Decimal" />
<asp:Parameter Name="Original_StartDate" Type="DateTime" />
<asp:Parameter Name="Original_ExpirationDate" Type="DateTime" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="ProductDescription" Type="String" />
<asp:Parameter Name="ProductFamilyId" Type="Decimal" />
<asp:Parameter Name="UnitPrice" Type="Decimal" />
<asp:Parameter Name="StartDate" Type="DateTime" />
<asp:Parameter Name="ExpirationDate" Type="DateTime" />
<asp:Parameter Name="Original_ProductId" Type="Int32" />
<asp:Parameter Name="Original_ProductDescription" Type="String" />
<asp:Parameter Name="Original_ProductFamilyId" Type="Decimal" />
<asp:Parameter Name="Original_UnitPrice" Type="Decimal" />
<asp:Parameter Name="Original_StartDate" Type="DateTime" />
<asp:Parameter Name="Original_ExpirationDate" Type="DateTime" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="ProductDescription" Type="String" />
<asp:Parameter Name="ProductFamilyId" Type="Decimal" />
<asp:Parameter Name="UnitPrice" Type="Decimal" />
<asp:Parameter Name="StartDate" Type="DateTime" />
<asp:Parameter Name="ExpirationDate" Type="DateTime" />
</InsertParameters>
</asp:ObjectDataSource>

</div>
</form>
</body>
</html>
AnswerRe: C# gridview edit/delete not working Pin
Zia Ul Haq Soofi10-Apr-09 18:59
Zia Ul Haq Soofi10-Apr-09 18:59 
GeneralRe: C# gridview edit/delete not working Pin
maheshsahini10-Apr-09 22:53
maheshsahini10-Apr-09 22:53 
QuestionPostedFile Is Nothing on DataGrid File Upload Pin
dstrube10-Apr-09 3:13
dstrube10-Apr-09 3:13 
QuestionSet Image as Desktop Background Pin
.NET- India 10-Apr-09 2:41
.NET- India 10-Apr-09 2:41 
AnswerRe: Set Image as Desktop Background Pin
Colin Angus Mackay10-Apr-09 2:47
Colin Angus Mackay10-Apr-09 2:47 
Questioncascading dropdownlist in ajax Pin
balekarsiddharth10-Apr-09 2:20
balekarsiddharth10-Apr-09 2:20 
QuestionCrystal Report in ASP.net2005-error is Load report failed Pin
gautamamit810-Apr-09 1:37
gautamamit810-Apr-09 1:37 
AnswerRe: Crystal Report in ASP.net2005-error is Load report failed Pin
ketan d patel16-Apr-09 23:18
ketan d patel16-Apr-09 23:18 
QuestionProblem with Ajax control (popUpControlExtender) Pin
dev sheoran10-Apr-09 0:38
dev sheoran10-Apr-09 0:38 
AnswerRe: Problem with Ajax control (popUpControlExtender) Pin
swati patel2396-Jan-11 0:22
swati patel2396-Jan-11 0:22 
GeneralRe: Problem with Ajax control (popUpControlExtender) Pin
deja_anbu28-Apr-11 22:48
deja_anbu28-Apr-11 22:48 
QuestionGridview Problem Pin
CrazyCoder2610-Apr-09 0:37
CrazyCoder2610-Apr-09 0:37 
AnswerRe: Gridview Problem Pin
Gaurav K Singh10-Apr-09 1:15
Gaurav K Singh10-Apr-09 1:15 
AnswerRe: Gridview Problem Pin
ketan d patel16-Apr-09 23:22
ketan d patel16-Apr-09 23:22 
QuestionVideo not found (FLV palyer error) Pin
vnsraj9-Apr-09 23:39
vnsraj9-Apr-09 23:39 
AnswerRe: Video not found (FLV palyer error) Pin
Gaurav K Singh10-Apr-09 1:20
Gaurav K Singh10-Apr-09 1:20 
AnswerRe: Video not found (FLV palyer error) Pin
gautamamit810-Apr-09 1:40
gautamamit810-Apr-09 1:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.