Click here to Skip to main content
15,884,176 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionto run asp.net 4.0 web application on VS 2005 Pin
sk_ko17-Nov-11 17:36
sk_ko17-Nov-11 17:36 
AnswerRe: to run asp.net 4.0 web application on VS 2005 Pin
Dennis E White17-Nov-11 20:02
professionalDennis E White17-Nov-11 20:02 
Questionbuilt in login control with sqlserver Pin
MalarGayu17-Nov-11 16:22
MalarGayu17-Nov-11 16:22 
AnswerRe: built in login control with sqlserver Pin
Not Active17-Nov-11 17:21
mentorNot Active17-Nov-11 17:21 
QuestionDataGrid Control Pin
Lavitiz17-Nov-11 12:00
Lavitiz17-Nov-11 12:00 
AnswerRe: DataGrid Control Pin
Not Active17-Nov-11 12:08
mentorNot Active17-Nov-11 12:08 
GeneralRe: DataGrid Control Pin
Lavitiz17-Nov-11 12:18
Lavitiz17-Nov-11 12:18 
Questionproblem update data in web control Pin
rachel_m17-Nov-11 4:41
rachel_m17-Nov-11 4: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 21:26
mat daus16-Nov-11 21:26 
AnswerRe: Need help...asp.net count sql.. Pin
Pete O'Hanlon17-Nov-11 0:36
mvePete O'Hanlon17-Nov-11 0:36 
AnswerRe: Need help...asp.net count sql.. Pin
Dennis E White17-Nov-11 10:32
professionalDennis E White17-Nov-11 10:32 
Questionnavigation between secure pages Pin
MalarGayu16-Nov-11 15:09
MalarGayu16-Nov-11 15:09 
AnswerRe: navigation between secure pages Pin
Not Active16-Nov-11 15:20
mentorNot Active16-Nov-11 15:20 
GeneralRe: navigation between secure pages Pin
MalarGayu16-Nov-11 16:15
MalarGayu16-Nov-11 16:15 
GeneralRe: navigation between secure pages Pin
Not Active16-Nov-11 16:37
mentorNot Active16-Nov-11 16:37 
GeneralRe: navigation between secure pages Pin
MalarGayu16-Nov-11 16:45
MalarGayu16-Nov-11 16:45 
GeneralRe: navigation between secure pages Pin
Not Active16-Nov-11 16:49
mentorNot Active16-Nov-11 16:49 
GeneralRe: navigation between secure pages Pin
MalarGayu16-Nov-11 17:07
MalarGayu16-Nov-11 17:07 
GeneralRe: navigation between secure pages Pin
Not Active16-Nov-11 17:25
mentorNot Active16-Nov-11 17:25 
GeneralRe: navigation between secure pages Pin
MalarGayu16-Nov-11 17:45
MalarGayu16-Nov-11 17:45 
GeneralRe: navigation between secure pages Pin
s_magus16-Nov-11 19:23
s_magus16-Nov-11 19:23 
QuestionOptions for creating simple PDF in ASP.NET Pin
RvrBndBrewer16-Nov-11 5:01
RvrBndBrewer16-Nov-11 5:01 
SuggestionRe: Options for creating simple PDF in ASP.NET Pin
Rojan Gh.16-Nov-11 15:03
professionalRojan Gh.16-Nov-11 15:03 
AnswerRe: Options for creating simple PDF in ASP.NET Pin
Andy_L_J17-Nov-11 0:11
Andy_L_J17-Nov-11 0:11 
Questionasp.net MVC3 unobtrusive validation causes IE8 to crash Pin
Madhu Kampurath15-Nov-11 20:26
Madhu Kampurath15-Nov-11 20: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.