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

ASP.NET

 
GeneralRe: Hiding WSDL help page from a Web Service Pin
keyboard warrior20-May-08 17:58
keyboard warrior20-May-08 17:58 
GeneralRe: Hiding WSDL help page from a Web Service Pin
FyreWyrm21-May-08 15:33
FyreWyrm21-May-08 15:33 
QuestionGridView & SQLdatasourceproblems Pin
Jacob Dixon20-May-08 14:35
Jacob Dixon20-May-08 14:35 
AnswerRe: GridView & SQLdatasourceproblems Pin
keyboard warrior20-May-08 15:56
keyboard warrior20-May-08 15:56 
GeneralRe: GridView & SQLdatasourceproblems Pin
Jacob Dixon20-May-08 16:57
Jacob Dixon20-May-08 16:57 
GeneralRe: GridView & SQLdatasourceproblems Pin
Jacob Dixon20-May-08 17:07
Jacob Dixon20-May-08 17:07 
GeneralRe: GridView & SQLdatasourceproblems Pin
keyboard warrior20-May-08 17:19
keyboard warrior20-May-08 17:19 
GeneralRe: GridView & SQLdatasourceproblems Pin
keyboard warrior20-May-08 17:12
keyboard warrior20-May-08 17:12 
Well one way to do this is to in the asp:Gridview tag code you can add

DataKeyNames="[id column name here]"

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="lvl1_id"
DataSourceID="SqlDataSource1" CellPadding="4" ForeColor="#333333" GridLines="None">

This will make whatever you put in that for a column the way gridview identify records. So if you're records have an ID column, it should be that. This is probably the method I would use.

AND make sure your datasource has an update parameter set:

<UpdateParameters>
<asp:Parameter Name="lvl1_name" Type="String" />
<asp:Parameter Name="lvl1_id" Type="Int32" />
</UpdateParameters>

This is part of the DataSOURCE code. See the update parameters....in the SQLDataSource, this is where you can set it up. what this is saying it take the text box for lvl1_name and the lvl1_id for that record and perform a sql update. So if it's not updating, I would say it's because your datasource code in the .aspx is missing those update parameters. I will include a datasource next.

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:blahblah %>"
DeleteCommand="UPDATE [bmj_level1] SET [enabled] = 0 WHERE [lvl1_id] = @lvl1_id" InsertCommand="INSERT INTO [bmj_level1] ([lvl1_name]) VALUES (@lvl1_name)"
SelectCommand="SELECT [lvl1_id], [lvl1_name] FROM [bmj_level1] WHERE [enabled] = 1 ORDER BY [lvl1_name]" UpdateCommand="UPDATE [bmj_level1] SET [lvl1_name] = @lvl1_name WHERE [lvl1_id] = @lvl1_id">
<DeleteParameters>
<asp:Parameter Name="lvl1_id" Type="Int32" />
</DeleteParameters>

<UpdateParameters>
<asp:Parameter Name="lvl1_name" Type="String" />
<asp:Parameter Name="lvl1_id" Type="Int32" />
</UpdateParameters>

<InsertParameters>
<asp:Parameter Name="lvl1_name" Type="String" />
</InsertParameters>
</asp:SqlDataSource>

-----------------------------------------------------------
"When I first saw it, I just thought that you really, really enjoyed programming in java." - Leslie Sanford

GeneralRe: GridView & SQLdatasourceproblems [modified] Pin
Jacob Dixon20-May-08 17:38
Jacob Dixon20-May-08 17:38 
GeneralRe: GridView & SQLdatasourceproblems Pin
keyboard warrior20-May-08 17:51
keyboard warrior20-May-08 17:51 
GeneralRe: GridView & SQLdatasourceproblems Pin
Jacob Dixon20-May-08 18:04
Jacob Dixon20-May-08 18:04 
GeneralRe: GridView & SQLdatasourceproblems Pin
Jacob Dixon20-May-08 18:13
Jacob Dixon20-May-08 18:13 
GeneralRe: GridView & SQLdatasourceproblems [modified] Pin
keyboard warrior20-May-08 18:24
keyboard warrior20-May-08 18:24 
GeneralRe: GridView & SQLdatasourceproblems Pin
Jacob Dixon21-May-08 1:35
Jacob Dixon21-May-08 1:35 
GeneralRe: GridView & SQLdatasourceproblems Pin
keyboard warrior21-May-08 5:32
keyboard warrior21-May-08 5:32 
GeneralRe: GridView & SQLdatasourceproblems Pin
Jacob Dixon21-May-08 15:37
Jacob Dixon21-May-08 15:37 
AnswerRe: GridView & SQLdatasourceproblems Pin
kinnuP20-May-08 21:03
kinnuP20-May-08 21:03 
GeneralRe: GridView & SQLdatasourceproblems Pin
Jacob Dixon21-May-08 1:32
Jacob Dixon21-May-08 1:32 
QuestionTextBox.text not showing in code behind Pin
DerekFL20-May-08 11:05
DerekFL20-May-08 11:05 
AnswerRe: TextBox.text not showing in code behind Pin
led mike20-May-08 11:55
led mike20-May-08 11:55 
AnswerRe: TextBox.text not showing in code behind Pin
keyboard warrior20-May-08 12:15
keyboard warrior20-May-08 12:15 
GeneralRe: TextBox.text not showing in code behind Pin
DerekFL20-May-08 13:11
DerekFL20-May-08 13:11 
GeneralRe: TextBox.text not showing in code behind Pin
keyboard warrior20-May-08 13:37
keyboard warrior20-May-08 13:37 
GeneralRe: TextBox.text not showing in code behind Pin
DerekFL20-May-08 15:06
DerekFL20-May-08 15:06 
AnswerRe: TextBox.text not showing in code behind Pin
Christian Graus20-May-08 14:29
protectorChristian Graus20-May-08 14:29 

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.