Click here to Skip to main content
15,921,606 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionA control/script for image manipulation Pin
VictorSotnikov20-Nov-11 7:50
VictorSotnikov20-Nov-11 7:50 
QuestionHow to crypt my URL Pin
TRAORE cheickna20-Nov-11 5:15
TRAORE cheickna20-Nov-11 5:15 
AnswerRe: How to crypt my URL Pin
Morgs Morgan22-Nov-11 21:37
Morgs Morgan22-Nov-11 21:37 
Questionto import all tables Pin
sk_ko19-Nov-11 19:27
sk_ko19-Nov-11 19:27 
AnswerRe: to import all tables Pin
jkirkerx19-Nov-11 20:22
professionaljkirkerx19-Nov-11 20:22 
QuestionWorking with cached DataTables ? Pin
devboycpp19-Nov-11 6:47
devboycpp19-Nov-11 6:47 
AnswerRe: Working with cached DataTables ? Pin
jkirkerx19-Nov-11 19:16
professionaljkirkerx19-Nov-11 19:16 
Questiondata source problem with web control Pin
rachel_m19-Nov-11 6:05
rachel_m19-Nov-11 6:05 
I am having problem trying to use a linq to sql datasource on a detailsview control in a C# 2010 web form new application. What I want to be able to do is use the linq to sql datasource listed below to update records in the table called 'Atts". According to a Devexpress online tutorial that I looked at, it said to remove the ' new statement' in the select statement, and then you can do an edit.

The following is the select statement: Select="new (Att_id, Prior_Cutoff_Date)" statement.

However visual studio 2010 will not allow me to remove the 'new' statement. I am guessing the reason why is the column called 'Att_id' is an identity column.

Thus can you tell me what I can do so I can setup the edit feature to work? Is there something I can do with the linq to sql dataource to work around the identity column? Should I have a second linq to sql data source where I would have one linq to sql datasource for inserting and another dataource for updating? Let me know what your recommendation is and/or point me to a reference I can use to solve my problem

Here is the code I have so far:
<pre>
<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="Support.AttDataContext"
Select="new (Att_id, Prior_Cutoff_Date)"
TableName="Atts" Where="Att_id == @Att_id"
EnableUpdate="True">
<UpdateParameters>
<asp:SessionParameter Name="Att_id" SessionField="AttID" />
</UpdateParameters>
<WhereParameters>
<asp:SessionParameter Name="Att_id" SessionField="AttID" Type="Int32" />
</WhereParameters>
</asp:LinqDataSource>

<asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px" EnableModelValidation="False"
AutoGenerateRows="False" DataSourceID="LinqDataSource1" BorderStyle="Solid" HorizontalAlign="Center"
DefaultMode="Edit">
<Fields>
<asp:TemplateField HeaderText="Att ID">
<ItemTemplate>
<asp:TextBox ID="TextBoxAttid" runat="server" Text='<%# Eval("Att_id") %>'
BorderStyle="None"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>

<asp:TemplateField HeaderText="Prior Cutoff Date" SortExpression="Prior_Cutoff_Date">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("Prior_Cutoff_Date") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Prior_Cutoff_Date") %>'></asp:TextBox>
</EditItemTemplate>

</asp:TemplateField>
</Fields>
</asp:DetailsView>
</pre>
AnswerRe: data source problem with web control Pin
jkirkerx19-Nov-11 19:29
professionaljkirkerx19-Nov-11 19:29 
GeneralRe: data source problem with web control Pin
rachel_m20-Nov-11 8:43
rachel_m20-Nov-11 8:43 
GeneralRe: data source problem with web control Pin
jkirkerx20-Nov-11 9:10
professionaljkirkerx20-Nov-11 9:10 
GeneralRe: data source problem with web control Pin
rachel_m20-Nov-11 14:32
rachel_m20-Nov-11 14:32 
GeneralRe: data source problem with web control Pin
jkirkerx20-Nov-11 15:19
professionaljkirkerx20-Nov-11 15:19 
QuestionSite navigation link generation using sitemap Pin
Tridip Bhattacharjee18-Nov-11 23:46
professionalTridip Bhattacharjee18-Nov-11 23:46 
AnswerRe: Site navigation link generation using sitemap Pin
jkirkerx19-Nov-11 19:35
professionaljkirkerx19-Nov-11 19:35 
AnswerRe: Site navigation link generation using sitemap Pin
Bernhard Hiller20-Nov-11 19:52
Bernhard Hiller20-Nov-11 19:52 
QuestionURL routing issue asp.net 4.0 Pin
Tridip Bhattacharjee18-Nov-11 23:42
professionalTridip Bhattacharjee18-Nov-11 23:42 
AnswerRe: URL routing issue asp.net 4.0 Pin
jkirkerx19-Nov-11 19:44
professionaljkirkerx19-Nov-11 19:44 
QuestionI have some queires releated to DataCalendar Pin
Ostwal Aarti18-Nov-11 1:37
Ostwal Aarti18-Nov-11 1:37 
AnswerRe: I have some queires releated to DataCalendar Pin
Blue_Boy18-Nov-11 1:54
Blue_Boy18-Nov-11 1:54 
QuestionMultiple dll's Refrencing Asp.net Website Pin
vishnukamath17-Nov-11 20:14
vishnukamath17-Nov-11 20:14 
QuestionRe: Multiple dll's Refrencing Asp.net Website Pin
Pandya Anil17-Nov-11 22:25
Pandya Anil17-Nov-11 22:25 
AnswerRe: Multiple dll's Refrencing Asp.net Website Pin
Richard MacCutchan18-Nov-11 0:44
mveRichard MacCutchan18-Nov-11 0:44 
AnswerRe: Multiple dll's Refrencing Asp.net Website Pin
jkirkerx19-Nov-11 19:51
professionaljkirkerx19-Nov-11 19:51 
QuestionGet Regional Language settings. Pin
Mugdha_Aditya17-Nov-11 19:56
Mugdha_Aditya17-Nov-11 19:56 

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.