Click here to Skip to main content
15,123,540 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionto run asp.net 4.0 web application on VS 2005 Pin
sk_ko17-Nov-11 18:36
Membersk_ko17-Nov-11 18:36 
AnswerRe: to run asp.net 4.0 web application on VS 2005 Pin
Dennis E White17-Nov-11 21:02
professionalDennis E White17-Nov-11 21:02 
Questionbuilt in login control with sqlserver Pin
MalarGayu17-Nov-11 17:22
MemberMalarGayu17-Nov-11 17:22 
AnswerRe: built in login control with sqlserver Pin
Not Active17-Nov-11 18:21
mentorNot Active17-Nov-11 18:21 
QuestionDataGrid Control Pin
Lavitiz17-Nov-11 13:00
MemberLavitiz17-Nov-11 13:00 
AnswerRe: DataGrid Control Pin
Not Active17-Nov-11 13:08
mentorNot Active17-Nov-11 13:08 
GeneralRe: DataGrid Control Pin
Lavitiz17-Nov-11 13:18
MemberLavitiz17-Nov-11 13:18 
Questionproblem update data in web control Pin
rachel_m17-Nov-11 5:41
Memberrachel_m17-Nov-11 5:41 
Right now I am trying to get a detailsview control to update one record in the database. I am using the smallest version of the code so I can make certain the update will work before I add more code. Right now in the new application, I have the first webform page entered by the user, they click the next button and they are directed to the second webform page. When the user is directed to the second webform page, the detailsview control for one record will be displayed.

I want the record to update a record when the user clicks a button not contained within the detailsview control. However the update has not occurred. I have tried lots of different options but nothing has worked so far. For example, I read lots of sources that said I should not have a 'new' statement in the select. However if I leave out the 'new' part of the select statements, I get an error.

What you do think I should do, have a update statement in the in the linq data source, use 2 different linq data sources, what do you think I should try to do to to make the code work.

The following is my code so far:
<pre>
<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="Support.AttDataContext"
Select="new (Att_id, Prior_Cutoff_Date)"
TableName="Attestations" 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>

protected void Button_Click(object sender, EventArgs e)
{
DetailsView1.DataBind();
}
</pre>

-- modified 17-Nov-11 17:19pm.
QuestionNeed help...asp.net count sql.. Pin
mat daus16-Nov-11 22:26
Membermat daus16-Nov-11 22:26 
AnswerRe: Need help...asp.net count sql.. Pin
Pete O'Hanlon17-Nov-11 1:36
mvePete O'Hanlon17-Nov-11 1:36 
AnswerRe: Need help...asp.net count sql.. Pin
Dennis E White17-Nov-11 11:32
professionalDennis E White17-Nov-11 11:32 
Questionnavigation between secure pages Pin
MalarGayu16-Nov-11 16:09
MemberMalarGayu16-Nov-11 16:09 
AnswerRe: navigation between secure pages Pin
Not Active16-Nov-11 16:20
mentorNot Active16-Nov-11 16:20 
GeneralRe: navigation between secure pages Pin
MalarGayu16-Nov-11 17:15
MemberMalarGayu16-Nov-11 17:15 
GeneralRe: navigation between secure pages Pin
Not Active16-Nov-11 17:37
mentorNot Active16-Nov-11 17:37 
GeneralRe: navigation between secure pages Pin
MalarGayu16-Nov-11 17:45
MemberMalarGayu16-Nov-11 17:45 
GeneralRe: navigation between secure pages Pin
Not Active16-Nov-11 17:49
mentorNot Active16-Nov-11 17:49 
GeneralRe: navigation between secure pages Pin
MalarGayu16-Nov-11 18:07
MemberMalarGayu16-Nov-11 18:07 
GeneralRe: navigation between secure pages Pin
Not Active16-Nov-11 18:25
mentorNot Active16-Nov-11 18:25 
GeneralRe: navigation between secure pages Pin
MalarGayu16-Nov-11 18:45
MemberMalarGayu16-Nov-11 18:45 
GeneralRe: navigation between secure pages Pin
s_magus16-Nov-11 20:23
Members_magus16-Nov-11 20:23 
QuestionOptions for creating simple PDF in ASP.NET Pin
RvrBndBrewer16-Nov-11 6:01
MemberRvrBndBrewer16-Nov-11 6:01 
SuggestionRe: Options for creating simple PDF in ASP.NET Pin
Rojan Gh.16-Nov-11 16:03
professionalRojan Gh.16-Nov-11 16:03 
AnswerRe: Options for creating simple PDF in ASP.NET Pin
Andy_L_J17-Nov-11 1:11
MemberAndy_L_J17-Nov-11 1:11 
Questionasp.net MVC3 unobtrusive validation causes IE8 to crash Pin
Madhu Kampurath15-Nov-11 21:26
MemberMadhu Kampurath15-Nov-11 21:26 

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.