|
<SelectedItemTemplate> <tr style="background-color:#008A8C;font-weight: bold;color: #FFFFFF;"> <td> <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" Text="削除" /> <asp:Button ID="EditButton" runat="server" CommandName="Edit" Text="編集" /> </td> <td> <asp:Label ID="OrderIDLabel" runat="server" Text='<%# Eval("OrderID") %>' /> </td> <td> <asp:Label ID="CD" runat="server" Text='<%# Eval("CD") %>' /> </td> <td> <asp:Label ID="EmployeeIDLabel" runat="server" Text='<%# Eval("EmployeeID") %>' /> </td> <td> <asp:Label ID="ShipNameLabel" runat="server" Text='<%# Eval("ShipName") %>' /> </td> </tr> </SelectedItemTemplate> </asp:ListView> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </asp:ToolkitScriptManager> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\NwindSQL.mdf;Integrated Security=True;User Instance=True" DeleteCommand="DELETE FROM [Orders] WHERE [OrderID] = @OrderID" InsertCommand="INSERT INTO [Orders] ([OrderID], [CustomerID], [EmployeeID], [ShipName]) VALUES (@OrderID, @CD, @EmployeeID, @ShipName)" ProviderName="System.Data.SqlClient" SelectCommand="SELECT [OrderID], [CustomerID] AS CD, [EmployeeID], [ShipName] FROM [Orders]" UpdateCommand="UPDATE [Orders] SET [CustomerID] = @CD, [EmployeeID] = @EmployeeID, [ShipName] = @ShipName WHERE [OrderID] = @OrderID"> <DeleteParameters> <asp:Parameter Name="OrderID" Type="Int32" /> </DeleteParameters> <UpdateParameters> <asp:Parameter Name="CD" Type="Int32" /> <asp:Parameter Name="EmployeeID" Type="Int32" /> <asp:Parameter Name="ShipName" Type="String" /> <asp:Parameter Name="OrderID" Type="Int32" /> </UpdateParameters> <InsertParameters> <asp:Parameter Name="OrderID" Type="Int32" /> <asp:Parameter Name="CD" Type="Int32" /> <asp:Parameter Name="EmployeeID" Type="Int32" /> <asp:Parameter Name="ShipName" Type="String" /> </InsertParameters> </asp:SqlDataSource> </div> </form> </body> </html>
aspx.vb側
Partial Class _Default Inherits System.Web.UI.Page
Private Sub WebUserControl1_Selected(ByVal sender As Object, ByVal e As WebUserControlSelectedEventArgs) Handles WebUserControl1.Selected
DirectCast(ListView1.InsertItem.FindControl("CD"), Label).Text = Session("CD")
DirectCast(ListView1.InsertItem.FindControl("modal"), AjaxControlToolkit.ModalPopupExtender).Hide() End Sub
End Class
タブとか入れてるはずなんですが反映されませんね・・・ 見えにくくてすみません。
|