Hi,
First, escuse me for my language, I'm french guy.
My UserControls Description:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Vignette.ascx.cs" Inherits="Vignette" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.SqlClient" %>
<%@ import Namespace="System.Drawing" %>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" >
<ContentTemplate>
<div style="border:solid 1px black; width:805px;">
<asp:Panel ID="entete" runat="server" BackColor="LightSkyBlue" Height="25px" Width="805px">
<asp:CheckBox ID="selection" runat="server" />
<asp:Label ID="titre" runat="server" Text=""></asp:Label>
<asp:Label ID="disponibilité" runat="server" CssClass="dispo" Text="Disponible" Font-Bold="True" ForeColor=""></asp:Label>
<asp:Button ID="Button1" runat="server" CssClass="v_boutton1" Text="Plier" OnClick="Button1_Click" />
<asp:Button ID="Button2" runat="server" CssClass="v_boutton2" Text="Deplier" OnClick="Button2_Click" /></asp:Panel>
<asp:Panel ID="corps" runat="server" BackColor="AliceBlue" Height="100%" Width="805px">
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate >
<table>
<tr>
<td> <%# DataBinder.Eval(Container.DataItem, "Creation")%> </td>
<td> <%# DataBinder.Eval(Container.DataItem, "Destruction") %> </td>
<td> <%# DataBinder.Eval(Container.DataItem, "Designation") %> </td>
<td> <asp:ImageButton ID="ajout" runat="server" ImageUrl="~/App_Themes/Default/Images/images.jpg" OnClick="ajout_Click"/></td>
</tr>
</table>
</ItemTemplate>
</asp:Repeater>
</asp:Panel>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<br />
I do Nhibernate request in my Page_Load(), and One result equals One UserControl. The page_load of UserControl do Nhibernate request too.
When I click on one of buttons, the application do all request contains in page_load of the page and in page_load of the user controls But I don't want this.
How to go directly in the Click Event of the button ??
Or if your are another suggestions tell me please.
Thanks
|