Note that there are some explanatory texts on larger screens.

plurals
  1. POHow I create a EventHandler for a Button in ASP.NET
    primarykey
    data
    text
    <p>My Problem: </p> <p>I have a ASP.NET Application and use a ListView. I get Datalines (eMail,Username,Firstname etc..) from the Active Directory and fill this in my ListView. Every Line has a Button "Show", with this Button I want to a other WebForm. With a Session I surrender the Data to the other WebForm. My Code: </p> <blockquote> <p></p> <pre><code> &lt;LayoutTemplate&gt; &lt;table id="UserTable" runat="server" border="0" cellspacing="10" cellpadding="5"&gt; &lt;tr id="Tr1" runat="server"&gt; &lt;th id="Th1" runat="server"&gt;Benutzer&lt;/th&gt; &lt;th id="Th2" runat="server"&gt;eMail&lt;/th&gt; &lt;th id="Th3" runat="server"&gt;Vorname&lt;/th&gt; &lt;th id="Th4" runat="server"&gt;Nachname&lt;/th&gt; &lt;th id="Th5" runat="server"&gt;Telefon&lt;/th&gt; &lt;/tr&gt; &lt;tr runat="server" id="ItemPlaceholder"&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/LayoutTemplate&gt; &lt;ItemTemplate&gt; &lt;tr runat="server"&gt; &lt;td align="left" &gt;&lt;asp:Label ID="Label1" Text='&lt;%# Eval("Benutzer") %&gt;' runat="server" /&gt;&lt;/td&gt; &lt;td align="left"&gt;&lt;asp:Label ID="Label2" Text='&lt;%# Eval("eMail") %&gt;' runat="server" /&gt;&lt;/td&gt; &lt;td align="left"&gt;&lt;asp:Label ID="Label3" Text='&lt;%# Eval("Vorname") %&gt;' runat="server" /&gt;&lt;/td&gt; &lt;td align="left"&gt;&lt;asp:Label ID="Label4" Text='&lt;%# Eval("Nachname") %&gt;' runat="server" /&gt;&lt;/td&gt; &lt;td align="left"&gt;&lt;asp:Label ID="Label5" Text='&lt;%# Eval("Telefon") %&gt;' runat="server" /&gt;&lt;/td&gt; //Every Line get a Button &lt;td align="left"&gt;&lt;asp:Button ID="Button1" Text ="Anzeigen" runat="server" /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/ItemTemplate&gt; &lt;/asp:ListView&gt; </code></pre> </blockquote> <p>The Button has a onClick= "..." Argument but how I make a Event for this and how I transfer to the other WebForm with the right Session Information. I think I must work with the Index from the Line :/ </p> <p>I need help :( </p> <p>tarasov</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload