<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Gestione eventi su repeater.]]></title><description><![CDATA[<p dir="auto">Ciao a tutti.<br />
Ho questo problema.<br />
Lavoro con <a href="http://vb.net" rel="nofollow ugc">vb.net</a> (fw 3.5) e sql sever.<br />
Ho un repeater con 4 textbox popolato collegandolo ad un SqlDataSource (DataSourceID="SqlDataSource1")</p>
<p dir="auto">Editando il contenuto di un text, dovrei ricalcolare il contenuto di un altro.<br />
Ad esempio: se scrivo 3 sul textbox1 e 5 sul textbox2 , sul textbox3 dovrebbe apparire la somma, 8.<br />
Dovrei poter gestire l'evento _Validate, o _LostFocus o anche _TextChanged ma non so come fare in un controllo inserito all'interno di un repeater.<br />
E' possibile?<br />
Qualcuno sa aiutarmi?<br />
Scusandomi per il disturbo vi ringrazio anticipatamente.<br />
Marco</p>
]]></description><link>https://dev.connect.gt/topic/154081/gestione-eventi-su-repeater</link><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 04:02:29 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/154081.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 28 Jun 2011 12:30:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Gestione eventi su repeater. on Fri, 20 Jan 2012 14:01:36 GMT]]></title><description><![CDATA[<pre><code class="language-html">&lt;asp:TextBox id="tb1" OnTextChanged="check" AutoPostBack="true" runat="server"/&gt; - &lt;asp:TextBox id="tb2" OnTextChanged="check" AutoPostBack="true" runat="server"/&gt; - &lt;asp:TextBox id="tb3" ReadOnly="true" OnTextChanged="check" runat="server"/&gt;
</code></pre>
<pre><code> Sub check(ByVal o As Object, ByVal e As EventArgs)
        
        If tb1.Text &lt;&gt; String.Empty And tb2.Text &lt;&gt; String.Empty Then
            Dim val1 As Double
            Dim val2 As Double
            
            If (Double.TryParse(tb1.Text, val1) And Double.TryParse(tb2.Text, val2)) Then
            
                tb3.Text = val1 + val2
                
            Else
                
                tb3.Text = String.Empty
                
            End If
            
        End If
        
    End Sub
</code></pre>
<p dir="auto">In questo caso userei l'updatepanel perchè il postback automatico è un bruttissimo effetto.</p>
]]></description><link>https://dev.connect.gt/post/1012246</link><guid isPermaLink="true">https://dev.connect.gt/post/1012246</guid><dc:creator><![CDATA[fusionman]]></dc:creator><pubDate>Fri, 20 Jan 2012 14:01:36 GMT</pubDate></item></channel></rss>